Mercurial > libervia-backend
comparison src/core/sat_main.py @ 504:65ecbb473cbb
core, quick frontend, plugin xep-0054, bridge: use of memory's entities data for vcard:
- bridge: new bridge method getEntityData and signal entityDataUpdated
- core: entityDataUpdated signal sent on new string data
- quick frontend: fixed avatars/vcard infos, fixed _replace in quick_contact_list
- plugin xep-0054: dropped updatedValue signal, use entities data instead
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Sep 2012 01:23:56 +0200 |
parents | e9634d2e7b38 |
children | 2e43c74815ad |
comparison
equal
deleted
inserted
replaced
503:10119c2a9d33 | 504:65ecbb473cbb |
---|---|
116 | 116 |
117 self.bridge=DBusBridge() | 117 self.bridge=DBusBridge() |
118 self.bridge.register("getVersion", lambda: self.get_const('client_version')) | 118 self.bridge.register("getVersion", lambda: self.get_const('client_version')) |
119 self.bridge.register("getProfileName", self.memory.getProfileName) | 119 self.bridge.register("getProfileName", self.memory.getProfileName) |
120 self.bridge.register("getProfilesList", self.memory.getProfilesList) | 120 self.bridge.register("getProfilesList", self.memory.getProfilesList) |
121 self.bridge.register("getEntityData", lambda _jid, keys, profile: self.memory.getEntityData(jid.JID(_jid),keys, profile)) | |
121 self.bridge.register("createProfile", self.memory.createProfile) | 122 self.bridge.register("createProfile", self.memory.createProfile) |
122 self.bridge.register("asyncCreateProfile", self.memory.asyncCreateProfile) | 123 self.bridge.register("asyncCreateProfile", self.memory.asyncCreateProfile) |
123 self.bridge.register("deleteProfile", self.memory.deleteProfile) | 124 self.bridge.register("deleteProfile", self.memory.deleteProfile) |
124 self.bridge.register("registerNewAccount", self.registerNewAccount) | 125 self.bridge.register("registerNewAccount", self.registerNewAccount) |
125 self.bridge.register("connect", self.connect) | 126 self.bridge.register("connect", self.connect) |
277 def getContacts(self, profile_key): | 278 def getContacts(self, profile_key): |
278 client = self.getClient(profile_key) | 279 client = self.getClient(profile_key) |
279 if not client: | 280 if not client: |
280 raise ProfileUnknownError(_('Asking contacts for a non-existant profile')) | 281 raise ProfileUnknownError(_('Asking contacts for a non-existant profile')) |
281 ret = [] | 282 ret = [] |
282 for item in client.roster.getItems(): #we get all item for client's roster | 283 for item in client.roster.getItems(): #we get all items for client's roster |
283 #and convert them to expected format | 284 #and convert them to expected format |
284 attr = client.roster.getAttributes(item) | 285 attr = client.roster.getAttributes(item) |
285 ret.append([item.jid.userhost(), attr, item.groups]) | 286 ret.append([item.jid.userhost(), attr, item.groups]) |
286 return ret | 287 return ret |
287 | 288 |