Mercurial > libervia-backend
comparison src/bridge/DBus.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 | 862c0d6ab974 |
comparison
equal
deleted
inserted
replaced
503:10119c2a9d33 | 504:65ecbb473cbb |
---|---|
139 def disconnected(self, profile): | 139 def disconnected(self, profile): |
140 pass | 140 pass |
141 | 141 |
142 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, | 142 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, |
143 signature='ssss') | 143 signature='ssss') |
144 def entityDataUpdated(self, jid, name, value, profile): | |
145 pass | |
146 | |
147 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, | |
148 signature='ssss') | |
144 def newAlert(self, message, title, alert_type, profile): | 149 def newAlert(self, message, title, alert_type, profile): |
145 pass | 150 pass |
146 | 151 |
147 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, | 152 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, |
148 signature='sa{ss}ass') | 153 signature='sa{ss}ass') |
167 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, | 172 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, |
168 signature='sss') | 173 signature='sss') |
169 def subscribe(self, sub_type, entity_jid, profile): | 174 def subscribe(self, sub_type, entity_jid, profile): |
170 pass | 175 pass |
171 | 176 |
172 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, | |
173 signature='sa{ss}s') | |
174 def updatedValue(self, name, value, profile): | |
175 pass | |
176 | |
177 | 177 |
178 ### methods ### | 178 ### methods ### |
179 | 179 |
180 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, | 180 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, |
181 in_signature='ss', out_signature='', | 181 in_signature='ss', out_signature='', |
258 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, | 258 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, |
259 in_signature='ss', out_signature='as', | 259 in_signature='ss', out_signature='as', |
260 async_callbacks=None) | 260 async_callbacks=None) |
261 def getContactsFromGroup(self, group, profile_key="@DEFAULT@"): | 261 def getContactsFromGroup(self, group, profile_key="@DEFAULT@"): |
262 return self._callback("getContactsFromGroup", unicode(group), unicode(profile_key)) | 262 return self._callback("getContactsFromGroup", unicode(group), unicode(profile_key)) |
263 | |
264 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, | |
265 in_signature='sass', out_signature='a{ss}', | |
266 async_callbacks=None) | |
267 def getEntityData(self, jid, keys, profile): | |
268 return self._callback("getEntityData", unicode(jid), keys, unicode(profile)) | |
263 | 269 |
264 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, | 270 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, |
265 in_signature='ssib', out_signature='a(dsss)', | 271 in_signature='ssib', out_signature='a(dsss)', |
266 async_callbacks=('callback', 'errback')) | 272 async_callbacks=('callback', 'errback')) |
267 def getHistory(self, from_jid, to_jid, limit, between=True, callback=None, errback=None): | 273 def getHistory(self, from_jid, to_jid, limit, between=True, callback=None, errback=None): |
516 self.dbus_bridge.contactDeleted(entity_jid, profile) | 522 self.dbus_bridge.contactDeleted(entity_jid, profile) |
517 | 523 |
518 def disconnected(self, profile): | 524 def disconnected(self, profile): |
519 self.dbus_bridge.disconnected(profile) | 525 self.dbus_bridge.disconnected(profile) |
520 | 526 |
527 def entityDataUpdated(self, jid, name, value, profile): | |
528 self.dbus_bridge.entityDataUpdated(jid, name, value, profile) | |
529 | |
521 def newAlert(self, message, title, alert_type, profile): | 530 def newAlert(self, message, title, alert_type, profile): |
522 self.dbus_bridge.newAlert(message, title, alert_type, profile) | 531 self.dbus_bridge.newAlert(message, title, alert_type, profile) |
523 | 532 |
524 def newContact(self, contact_jid, attributes, groups, profile): | 533 def newContact(self, contact_jid, attributes, groups, profile): |
525 self.dbus_bridge.newContact(contact_jid, attributes, groups, profile) | 534 self.dbus_bridge.newContact(contact_jid, attributes, groups, profile) |
533 def presenceUpdate(self, entity_jid, show, priority, statuses, profile): | 542 def presenceUpdate(self, entity_jid, show, priority, statuses, profile): |
534 self.dbus_bridge.presenceUpdate(entity_jid, show, priority, statuses, profile) | 543 self.dbus_bridge.presenceUpdate(entity_jid, show, priority, statuses, profile) |
535 | 544 |
536 def subscribe(self, sub_type, entity_jid, profile): | 545 def subscribe(self, sub_type, entity_jid, profile): |
537 self.dbus_bridge.subscribe(sub_type, entity_jid, profile) | 546 self.dbus_bridge.subscribe(sub_type, entity_jid, profile) |
538 | |
539 def updatedValue(self, name, value, profile): | |
540 self.dbus_bridge.updatedValue(name, value, profile) | |
541 | 547 |
542 | 548 |
543 def register(self, name, callback): | 549 def register(self, name, callback): |
544 debug("registering DBus bridge method [%s]", name) | 550 debug("registering DBus bridge method [%s]", name) |
545 self.dbus_bridge.register(name, callback) | 551 self.dbus_bridge.register(name, callback) |