comparison src/bridge/DBus.py @ 387:e66d300c5d42

frontends, bridge: sendFile method signature change + jid parameters in bridge now use _jid suffix
author Goffi <goffi@goffi.org>
date Thu, 29 Sep 2011 12:13:22 +0200
parents 3ea41a199b36
children 3ed53803b3b3
comparison
equal deleted inserted replaced
386:deeebf697d9a 387:e66d300c5d42
76 def connectionError(self, error_type, profile): 76 def connectionError(self, error_type, profile):
77 pass 77 pass
78 78
79 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 79 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
80 signature='ss') 80 signature='ss')
81 def contactDeleted(self, entity, profile): 81 def contactDeleted(self, entity_jid, profile):
82 pass 82 pass
83 83
84 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 84 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
85 signature='s') 85 signature='s')
86 def disconnected(self, profile): 86 def disconnected(self, profile):
91 def newAlert(self, message, title, alert_type, profile): 91 def newAlert(self, message, title, alert_type, profile):
92 pass 92 pass
93 93
94 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 94 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
95 signature='sa{ss}ass') 95 signature='sa{ss}ass')
96 def newContact(self, contact, attributes, groups, profile): 96 def newContact(self, contact_jid, attributes, groups, profile):
97 pass 97 pass
98 98
99 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 99 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
100 signature='sssss') 100 signature='sssss')
101 def newMessage(self, from_jid, message, mess_type, to_jid, profile): 101 def newMessage(self, from_jid, message, mess_type, to_jid, profile):
106 def paramUpdate(self, name, value, category, profile): 106 def paramUpdate(self, name, value, category, profile):
107 pass 107 pass
108 108
109 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 109 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
110 signature='ssia{ss}s') 110 signature='ssia{ss}s')
111 def presenceUpdate(self, entity, show, priority, statuses, profile): 111 def presenceUpdate(self, entity_jid, show, priority, statuses, profile):
112 pass 112 pass
113 113
114 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 114 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
115 signature='sss') 115 signature='sss')
116 def subscribe(self, sub_type, entity, profile): 116 def subscribe(self, sub_type, entity_jid, profile):
117 pass 117 pass
118 118
119 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX, 119 @dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
120 signature='sa{ss}s') 120 signature='sa{ss}s')
121 def updatedValue(self, name, value, profile): 121 def updatedValue(self, name, value, profile):
125 ### methods ### 125 ### methods ###
126 126
127 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 127 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
128 in_signature='ss', out_signature='', 128 in_signature='ss', out_signature='',
129 async_callbacks=None) 129 async_callbacks=None)
130 def addContact(self, entity, profile_key="@DEFAULT@"): 130 def addContact(self, entity_jid, profile_key="@DEFAULT@"):
131 return self.cb["addContact"](unicode(entity), unicode(profile_key)) 131 return self.cb["addContact"](unicode(entity_jid), unicode(profile_key))
132 132
133 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 133 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
134 in_signature='s', out_signature='', 134 in_signature='s', out_signature='',
135 async_callbacks=('callback', 'errback')) 135 async_callbacks=('callback', 'errback'))
136 def asyncConnect(self, profile_key="@DEFAULT@", callback=None, errback=None): 136 def asyncConnect(self, profile_key="@DEFAULT@", callback=None, errback=None):
161 return self.cb["createProfile"](unicode(profile)) 161 return self.cb["createProfile"](unicode(profile))
162 162
163 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 163 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
164 in_signature='ss', out_signature='', 164 in_signature='ss', out_signature='',
165 async_callbacks=None) 165 async_callbacks=None)
166 def delContact(self, entity, profile_key="@DEFAULT@"): 166 def delContact(self, entity_jid, profile_key="@DEFAULT@"):
167 return self.cb["delContact"](unicode(entity), unicode(profile_key)) 167 return self.cb["delContact"](unicode(entity_jid), unicode(profile_key))
168 168
169 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 169 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
170 in_signature='s', out_signature='i', 170 in_signature='s', out_signature='i',
171 async_callbacks=None) 171 async_callbacks=None)
172 def deleteProfile(self, profile): 172 def deleteProfile(self, profile):
317 return self.cb["subscription"](unicode(sub_type), unicode(entity), unicode(profile_key)) 317 return self.cb["subscription"](unicode(sub_type), unicode(entity), unicode(profile_key))
318 318
319 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 319 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
320 in_signature='ssass', out_signature='', 320 in_signature='ssass', out_signature='',
321 async_callbacks=None) 321 async_callbacks=None)
322 def updateContact(self, entity, name, groups, profile_key="@DEFAULT@"): 322 def updateContact(self, entity_jid, name, groups, profile_key="@DEFAULT@"):
323 return self.cb["updateContact"](unicode(entity), unicode(name), groups, unicode(profile_key)) 323 return self.cb["updateContact"](unicode(entity_jid), unicode(name), groups, unicode(profile_key))
324 324
325 325
326 def __attributes(self, in_sign): 326 def __attributes(self, in_sign):
327 """Return arguments to user given a in_sign 327 """Return arguments to user given a in_sign
328 @param in_sign: in_sign in the short form (using s,a,i,b etc) 328 @param in_sign: in_sign in the short form (using s,a,i,b etc)
415 self.dbus_bridge.connected(profile) 415 self.dbus_bridge.connected(profile)
416 416
417 def connectionError(self, error_type, profile): 417 def connectionError(self, error_type, profile):
418 self.dbus_bridge.connectionError(error_type, profile) 418 self.dbus_bridge.connectionError(error_type, profile)
419 419
420 def contactDeleted(self, entity, profile): 420 def contactDeleted(self, entity_jid, profile):
421 self.dbus_bridge.contactDeleted(entity, profile) 421 self.dbus_bridge.contactDeleted(entity_jid, profile)
422 422
423 def disconnected(self, profile): 423 def disconnected(self, profile):
424 self.dbus_bridge.disconnected(profile) 424 self.dbus_bridge.disconnected(profile)
425 425
426 def newAlert(self, message, title, alert_type, profile): 426 def newAlert(self, message, title, alert_type, profile):
427 self.dbus_bridge.newAlert(message, title, alert_type, profile) 427 self.dbus_bridge.newAlert(message, title, alert_type, profile)
428 428
429 def newContact(self, contact, attributes, groups, profile): 429 def newContact(self, contact_jid, attributes, groups, profile):
430 self.dbus_bridge.newContact(contact, attributes, groups, profile) 430 self.dbus_bridge.newContact(contact_jid, attributes, groups, profile)
431 431
432 def newMessage(self, from_jid, message, mess_type, to_jid, profile): 432 def newMessage(self, from_jid, message, mess_type, to_jid, profile):
433 self.dbus_bridge.newMessage(from_jid, message, mess_type, to_jid, profile) 433 self.dbus_bridge.newMessage(from_jid, message, mess_type, to_jid, profile)
434 434
435 def paramUpdate(self, name, value, category, profile): 435 def paramUpdate(self, name, value, category, profile):
436 self.dbus_bridge.paramUpdate(name, value, category, profile) 436 self.dbus_bridge.paramUpdate(name, value, category, profile)
437 437
438 def presenceUpdate(self, entity, show, priority, statuses, profile): 438 def presenceUpdate(self, entity_jid, show, priority, statuses, profile):
439 self.dbus_bridge.presenceUpdate(entity, show, priority, statuses, profile) 439 self.dbus_bridge.presenceUpdate(entity_jid, show, priority, statuses, profile)
440 440
441 def subscribe(self, sub_type, entity, profile): 441 def subscribe(self, sub_type, entity_jid, profile):
442 self.dbus_bridge.subscribe(sub_type, entity, profile) 442 self.dbus_bridge.subscribe(sub_type, entity_jid, profile)
443 443
444 def updatedValue(self, name, value, profile): 444 def updatedValue(self, name, value, profile):
445 self.dbus_bridge.updatedValue(name, value, profile) 445 self.dbus_bridge.updatedValue(name, value, profile)
446 446
447 447