Mercurial > libervia-backend
comparison sat_bridge/DBus.py @ 67:0e50dd3a234a
message sending bug fixes + sortilege update
- sortilege now use default profile. /!\ sortilege is really buggy currently, need some attention
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 04 Feb 2010 01:06:36 +1100 |
parents | 8147b4f40809 |
children | 9b842086d915 |
comparison
equal
deleted
inserted
replaced
66:8147b4f40809 | 67:0e50dd3a234a |
---|---|
58 def newContact(self, contact, attributes, groups, profile): | 58 def newContact(self, contact, attributes, groups, profile): |
59 debug("new contact signal (%s) sended (profile: %s)", contact, profile) | 59 debug("new contact signal (%s) sended (profile: %s)", contact, profile) |
60 | 60 |
61 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, | 61 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, |
62 signature='sssss') | 62 signature='sssss') |
63 def newMessage(self, from_jid, msg, type='chat', to='', profile='@NONE@'): | 63 def newMessage(self, from_jid, msg, type, to, profile): |
64 debug("new message signal (from:%s msg:%s type:%s to:%s) sended", from_jid, msg, type, to) | 64 debug("new message signal (from:%s msg:%s type:%s to:%s) sended", from_jid, msg, type, to) |
65 | 65 |
66 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, | 66 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, |
67 signature='ssia{ss}s') | 67 signature='ssia{ss}s') |
68 def presenceUpdate(self, entity, show, priority, statuses, profile): | 68 def presenceUpdate(self, entity, show, priority, statuses, profile): |
163 def getWaitingSub(self, profile_key='@DEFAULT@'): | 163 def getWaitingSub(self, profile_key='@DEFAULT@'): |
164 debug("getWaitingSub...") | 164 debug("getWaitingSub...") |
165 return self.cb["getWaitingSub"](profile_key) | 165 return self.cb["getWaitingSub"](profile_key) |
166 | 166 |
167 @dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX, | 167 @dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX, |
168 in_signature='sss', out_signature='') | 168 in_signature='ssss', out_signature='') |
169 def sendMessage(self, to, message, profile_key='@DEFAULT@'): | 169 def sendMessage(self, to, message, type='chat', profile_key='@DEFAULT@'): |
170 debug("sendMessage...") | 170 debug("sendMessage...") |
171 self.cb["sendMessage"](to, message, profile_key) | 171 print "sendtype=", type #gof |
172 self.cb["sendMessage"](to, message, type, profile_key) | |
172 | 173 |
173 @dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX, | 174 @dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX, |
174 in_signature='ssia{ss}s', out_signature='') | 175 in_signature='ssia{ss}s', out_signature='') |
175 def setPresence(self, to="", show="", priority=0, statuses={}, profile_key='@DEFAULT@'): | 176 def setPresence(self, to="", show="", priority=0, statuses={}, profile_key='@DEFAULT@'): |
176 self.cb["setPresence"](to, show, priority, statuses, profile_key) | 177 self.cb["setPresence"](to, show, priority, statuses, profile_key) |
291 self.dbus_bridge.disconnected(profile) | 292 self.dbus_bridge.disconnected(profile) |
292 | 293 |
293 def newContact(self, contact, attributes, groups, profile): | 294 def newContact(self, contact, attributes, groups, profile): |
294 self.dbus_bridge.newContact(contact, attributes, groups, profile) | 295 self.dbus_bridge.newContact(contact, attributes, groups, profile) |
295 | 296 |
296 def newMessage(self,from_jid, msg, type, to, profile): | 297 def newMessage(self, from_jid, msg, type='chat', to='', profile='@NONE@'): |
297 debug("sending message...") | 298 debug("sending message...") |
298 self.dbus_bridge.newMessage(from_jid, msg, type, to, profile) | 299 self.dbus_bridge.newMessage(from_jid, msg, type, to, profile) |
299 | 300 |
300 def presenceUpdate(self, entity, show, priority, statuses, profile): | 301 def presenceUpdate(self, entity, show, priority, statuses, profile): |
301 debug("updating presence for %s",entity) | 302 debug("updating presence for %s",entity) |