comparison sat_bridge/DBus.py @ 72:f271fff3a713

MUC implementation: first draft /!\ the experimental muc branche of wokkel must be used - bridge: new roomJoined signal - wix: contact list widget is now in a separate file, and manage different kinds of presentation - wix: chat window now manage group chat (first draft, not working yet) - wix: constants are now in a separate class, so then can be accessible from everywhere - wix: new menu to join room (do nothing yet, except entering in a test room) - new plugin for xep 0045 (MUC), use wokkel experimental MUC branch - plugins: the profile is now given for get_handler, cause it can be used internally by a plugin (e.g.: xep-0045 plugin)
author Goffi <goffi@goffi.org>
date Sun, 21 Mar 2010 10:28:55 +1100
parents 9b842086d915
children 9d113b5471e6
comparison
equal deleted inserted replaced
71:efe81b61673c 72:f271fff3a713
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):
69 debug("presence update signal (from:%s show:%s priority:%d statuses:%s profile:%s) sended" , entity, show, priority, statuses, profile) 69 debug("presence update signal (from:%s show:%s priority:%d statuses:%s profile:%s) sended" , entity, show, priority, statuses, profile)
70
71 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX,
72 signature='ssasss')
73 def roomJoined(self, room_id, room_service, room_nicks, user_nick, profile):
74 debug("room joined signal: id:%(room_id)s service:%(room_service)s nicks:%(room_nicks)s user:%(user_nick)s profile=%(profile)s" % {'room_id':room_id, 'room_service':room_service, 'room_nicks':room_nicks, 'user_nick':user_nick, 'profile':profile})
70 75
71 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, 76 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX,
72 signature='sss') 77 signature='sss')
73 def subscribe(self, type, entity, profile): 78 def subscribe(self, type, entity, profile):
74 debug("subscribe (type: [%s] from:[%s] profile:[%s])" , type, entity, profile) 79 debug("subscribe (type: [%s] from:[%s] profile:[%s])" , type, entity, profile)
305 self.dbus_bridge.newMessage(from_jid, msg, type, to, profile) 310 self.dbus_bridge.newMessage(from_jid, msg, type, to, profile)
306 311
307 def presenceUpdate(self, entity, show, priority, statuses, profile): 312 def presenceUpdate(self, entity, show, priority, statuses, profile):
308 debug("updating presence for %s",entity) 313 debug("updating presence for %s",entity)
309 self.dbus_bridge.presenceUpdate(entity, show, priority, statuses, profile) 314 self.dbus_bridge.presenceUpdate(entity, show, priority, statuses, profile)
315
316 def roomJoined(self, room_id, room_service, room_nicks, user_nick, profile):
317 self.dbus_bridge.roomJoined(room_id, room_service, room_nicks, user_nick, profile)
310 318
311 def subscribe(self, type, entity, profile): 319 def subscribe(self, type, entity, profile):
312 debug("subscribe request for %s",entity) 320 debug("subscribe request for %s",entity)
313 self.dbus_bridge.subscribe(type, entity, profile) 321 self.dbus_bridge.subscribe(type, entity, profile)
314 322