services/presence/server_plugin: reformat, document signal definitions

This commit is contained in:
Simon McVittie 2007-05-24 12:00:34 +01:00
parent 1026fce013
commit e11389d813

View File

@ -101,30 +101,62 @@ class ServerPlugin(gobject.GObject):
to implement the PresenceService. to implement the PresenceService.
""" """
__gsignals__ = { __gsignals__ = {
'contact-online': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, 'contact-online':
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])), # Contact has come online and we've discovered all their buddy
'contact-offline': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, # properties.
([gobject.TYPE_PYOBJECT])), # args: contact handle: int; dict {name: str => property: object}
'status': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.SIGNAL_RUN_FIRST, None, [object, object]),
([gobject.TYPE_INT, gobject.TYPE_INT])), 'contact-offline':
'avatar-updated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, # Contact has gone offline.
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])), # args: contact handle
'buddy-properties-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.SIGNAL_RUN_FIRST, None, [object]),
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])), 'status':
'buddy-activities-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, # Connection status changed.
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])), # args: status, reason as for Telepathy StatusChanged
'activity-invitation': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.SIGNAL_RUN_FIRST, None, [int, int]),
([gobject.TYPE_PYOBJECT])), 'avatar-updated':
'private-invitation': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, # Contact's avatar has changed
([gobject.TYPE_PYOBJECT])), # args: contact handle: int; icon data: str
'activity-properties-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.SIGNAL_RUN_FIRST, None, [object, object]),
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])), 'buddy-properties-changed':
'activity-shared': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, # OLPC buddy properties changed; as for PropertiesChanged
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT, # args:
gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])), # contact handle: int
'activity-joined': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, # properties: dict {name: str => property: object}
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT, # FIXME: are these all the properties or just those that changed?
gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])) (gobject.SIGNAL_RUN_FIRST, None, [object, object]),
'buddy-activities-changed':
# OLPC activities changed
# args:
# contact handle: int
# activity IDs: list of str
(gobject.SIGNAL_RUN_FIRST, None, [object, object]),
'activity-invitation':
# We were invited to join an activity
# args: activity ID: str
(gobject.SIGNAL_RUN_FIRST, None, [object]),
'private-invitation':
# We were invited to join a chat or a media call
# args: channel object path
(gobject.SIGNAL_RUN_FIRST, None, [object]),
'activity-properties-changed':
# An activity's properties changed; as for
# ActivityPropertiesChanged
# args: activity ID: str; properties: dict { str => object }
# FIXME: are these all the properties or just those that changed?
(gobject.SIGNAL_RUN_FIRST, None, [object, object]),
'activity-shared':
# share_activity() succeeded
# args:
# activity ID: str
# channel: telepathy.client.Channel, or None on failure
# error: None, or Exception on failure
# userdata as passed to share_activity
(gobject.SIGNAL_RUN_FIRST, None, [object, object, object, object]),
'activity-joined':
# join_activity() succeeded
# args: as for activity-shared
(gobject.SIGNAL_RUN_FIRST, None, [object, object, object, object]),
} }
def __init__(self, registry, owner): def __init__(self, registry, owner):