Mercurial > libervia-backend
comparison plugins/plugin_xep_0054.py @ 66:8147b4f40809
SàT: multi-profile: DBus signals and frontend adaptation (first draft)
- Quick App: new single_profile parameter in __init__ (default: yes), used to tell if the application use only one profile at the time or not
- Quick App: new __check_profile method, tell if the profile is used by the current frontend
- Quick App: new methods plug_profile, unplug_profile and clear_profile, must be called by the frontend to tell which profiles to use
- DBus Bridge: new methods getProfileName, getProfilesList and createProfile
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 03 Feb 2010 23:35:57 +1100 |
parents | d46f849664aa |
children | 86f1f7f6d332 |
comparison
equal
deleted
inserted
replaced
65:d35c5edab53f | 66:8147b4f40809 |
---|---|
89 cache = self.vcard_cache[jid.userhost()] | 89 cache = self.vcard_cache[jid.userhost()] |
90 old_value = cache[name] if cache.has_key(name) else None | 90 old_value = cache[name] if cache.has_key(name) else None |
91 if not old_value or value != old_value: | 91 if not old_value or value != old_value: |
92 cache[name] = value | 92 cache[name] = value |
93 self.host.memory.setPrivate("vcard_cache", self.vcard_cache) | 93 self.host.memory.setPrivate("vcard_cache", self.vcard_cache) |
94 self.host.bridge.updatedValue('profile_'+name, {'jid':jid.userhost(), name:value}) | 94 self.host.bridge.updatedValue('card_'+name, {'jid':jid.userhost(), name:value}) |
95 | 95 |
96 def get_cache(self, jid, name): | 96 def get_cache(self, jid, name): |
97 """return cached value for jid | 97 """return cached value for jid |
98 @param jid: target contact | 98 @param jid: target contact |
99 @param name: name of the value ('nick' or 'avatar') | 99 @param name: name of the value ('nick' or 'avatar') |