Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/presence
diff options
context:
space:
mode:
Diffstat (limited to 'src/sugar/presence')
-rw-r--r--src/sugar/presence/activity.py3
-rw-r--r--src/sugar/presence/buddy.py1
-rw-r--r--src/sugar/presence/connectionmanager.py4
-rw-r--r--src/sugar/presence/presenceservice.py2
4 files changed, 9 insertions, 1 deletions
diff --git a/src/sugar/presence/activity.py b/src/sugar/presence/activity.py
index aa6b396..a1b7a50 100644
--- a/src/sugar/presence/activity.py
+++ b/src/sugar/presence/activity.py
@@ -463,11 +463,13 @@ class Activity(gobject.GObject):
_logger.debug('%r: leaving', self)
self.telepathy_text_chan.Close()
+
class _BaseCommand(gobject.GObject):
__gsignals__ = {
'finished': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([object])),
}
+
def __init__(self):
gobject.GObject.__init__(self)
@@ -532,6 +534,7 @@ class _ShareCommand(_BaseCommand):
self._finished = True
self.emit('finished', error)
+
class _JoinCommand(_BaseCommand):
def __init__(self, connection, room_handle):
_BaseCommand.__init__(self)
diff --git a/src/sugar/presence/buddy.py b/src/sugar/presence/buddy.py
index 0a72a36..b83bc51 100644
--- a/src/sugar/presence/buddy.py
+++ b/src/sugar/presence/buddy.py
@@ -144,6 +144,7 @@ class BaseBuddy(gobject.GObject):
class Buddy(BaseBuddy):
__gtype_name__ = 'PresenceBuddy'
+
def __init__(self, account_path, contact_id):
_logger.debug('Buddy.__init__')
BaseBuddy.__init__(self)
diff --git a/src/sugar/presence/connectionmanager.py b/src/sugar/presence/connectionmanager.py
index e681eb6..6604d3f 100644
--- a/src/sugar/presence/connectionmanager.py
+++ b/src/sugar/presence/connectionmanager.py
@@ -31,12 +31,14 @@ from telepathy.constants import CONNECTION_STATUS_CONNECTED
ACCOUNT_MANAGER_SERVICE = 'org.freedesktop.Telepathy.AccountManager'
ACCOUNT_MANAGER_PATH = '/org/freedesktop/Telepathy/AccountManager'
+
class Connection(object):
def __init__(self, account_path, connection):
self.account_path = account_path
self.connection = connection
self.connected = False
+
class ConnectionManager(object):
"""Track available telepathy connections"""
@@ -108,8 +110,8 @@ class ConnectionManager(object):
return account_path
return None
-_connection_manager = None
+_connection_manager = None
def get_connection_manager():
global _connection_manager
if not _connection_manager:
diff --git a/src/sugar/presence/presenceservice.py b/src/sugar/presence/presenceservice.py
index 51d8625..fa5edcf 100644
--- a/src/sugar/presence/presenceservice.py
+++ b/src/sugar/presence/presenceservice.py
@@ -37,6 +37,7 @@ from telepathy.interfaces import ACCOUNT, \
CONNECTION
from telepathy.constants import HANDLE_TYPE_CONTACT
+
_logger = logging.getLogger('sugar.presence.presenceservice')
ACCOUNT_MANAGER_SERVICE = 'org.freedesktop.Telepathy.AccountManager'
@@ -44,6 +45,7 @@ ACCOUNT_MANAGER_PATH = '/org/freedesktop/Telepathy/AccountManager'
CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'
+
class PresenceService(gobject.GObject):
"""Provides simplified access to the Telepathy framework to activities"""
__gsignals__ = {