diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-06-30 16:32:15 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-06-30 16:32:15 (GMT) |
commit | 0cd9d8631039847aab28512a7ca9cd278f327bcf (patch) | |
tree | 4949002ade098b4241ce20f7bbc9cfb59687247d /sugar/chat | |
parent | 23b6c1e98a0fcadbcfb26ee1d475e36bce67dc88 (diff) |
No need to use presence service if it's all well known
Diffstat (limited to 'sugar/chat')
-rw-r--r-- | sugar/chat/MeshChat.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/sugar/chat/MeshChat.py b/sugar/chat/MeshChat.py index d9f4b02..a9cb635 100644 --- a/sugar/chat/MeshChat.py +++ b/sugar/chat/MeshChat.py @@ -1,6 +1,3 @@ -import logging -import random - from sugar.chat.GroupChat import GroupChat from sugar.presence.Service import Service import sugar.env @@ -13,22 +10,6 @@ class MeshChat(GroupChat): def __init__(self): GroupChat.__init__(self) - self._pservice.connect('service-appeared', self._service_appeared_cb) - self._pservice.track_service_type(MeshChat.SERVICE_TYPE) - - self._publish() - - service = self._pservice.get_service(MeshChat.SERVICE_TYPE) - if service is not None: - self._service_appeared_cb(self._pservice, None, service) - - def _service_appeared_cb(self, pservice, buddy, service): - if self._group_stream == None: - if service.get_type() == MeshChat.SERVICE_TYPE: - logging.debug('Mesh chat service appeared, setup the stream.') - self._setup_stream(service) - - def _publish(self): service = Service(sugar.env.get_nick_name(), MeshChat.SERVICE_TYPE, 'local', MeshChat.SERVICE_ADDRESS, MeshChat.SERVICE_PORT) - self._pservice.register_service(service) + self._setup_stream(service) |