summaryrefslogtreecommitdiff
path: root/telepathy-glib/presence-mixin.h
diff options
context:
space:
mode:
authorOlli Salli <olli.salli@collabora.co.uk>2007-05-31 09:00:31 +0000
committerOlli Salli <olli.salli@collabora.co.uk>2007-05-31 09:00:31 +0000
commit7145471a20aec16412e461e4c23e96906480978b (patch)
tree748d1ac346a13a19e99b2aedd1ac5d32fa41214e /telepathy-glib/presence-mixin.h
parentcf6b906f9d2cf766dcd23ca0e87c52569eb078c7 (diff)
downloadtelepathy-glib-7145471a20aec16412e461e4c23e96906480978b.tar.gz
Implement ClearStatus, RemoveStatus and SetStatus in TpPresenceMixin
20070531090031-9db4d-d2c82f71f16f5fb548b44edb7ac39895675f125d.gz
Diffstat (limited to 'telepathy-glib/presence-mixin.h')
-rw-r--r--telepathy-glib/presence-mixin.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/telepathy-glib/presence-mixin.h b/telepathy-glib/presence-mixin.h
index 3d05460cb..a3b84301e 100644
--- a/telepathy-glib/presence-mixin.h
+++ b/telepathy-glib/presence-mixin.h
@@ -115,19 +115,35 @@ typedef gboolean (*TpPresenceMixinStatusAvailableFunc) (GObject *obj,
/**
* TpPresenceMixinGetContactStatusesFunc:
* @obj: An object with this mixin.
- * @contacts: A zero-terminated array of #TpHandle for the contacts to get
- * presence status for
- * @error: Used to return a Telepathy D-Bus error if NULL is returned
+ * @contacts: An array of #TpHandle for the contacts to get presence status for
+ * @error: Used to return a Telepathy D-Bus error if %NULL is returned
*
* Signature of the callback used to get the stored presence status of
* contacts. The returned hash table should have contact handles mapped to their
* respective presence statuses in #TpPresenceStatus structs.
*
- * Returns: The contact presence on success, NULL with error set on error
+ * Returns: The contact presence on success, %NULL with error set on error
*/
typedef GHashTable *(*TpPresenceMixinGetContactStatusesFunc) (GObject *obj,
const GArray *contacts, GError **error);
+/**
+ * TpPresenceMixinSetOwnStatusFunc:
+ * @obj: An object with this mixin.
+ * @status: The status to set, or NULL for whatever the protocol defines as a
+ * "default" status
+ * @error: Used to return a Telepathy D-Bus error if %FALSE is returned
+ *
+ * Signature of the callback used to commit changes to the user's own presence
+ * status in SetStatuses. It is also used in ClearStatus and RemoveStatus to
+ * reset the user's own status back to the "default" one with a %NULL status
+ * argument.
+ *
+ * Returns: %TRUE if the operation was successful, %FALSE if not.
+ */
+typedef gboolean (*TpPresenceMixinSetOwnStatusFunc) (GObject *obj,
+ const TpPresenceStatus *status, GError **error);
+
typedef struct _TpPresenceMixinClass TpPresenceMixinClass;
typedef struct _TpPresenceMixinClassPrivate TpPresenceMixinClassPrivate;
typedef struct _TpPresenceMixin TpPresenceMixin;
@@ -137,6 +153,10 @@ typedef struct _TpPresenceMixinPrivate TpPresenceMixinPrivate;
* TpPresenceMixinClass:
* @status_available: The status-available function that was passed to
* tp_presence_mixin_class_init()
+ * @get_contact_statuses: The get-contact-statuses function that was passed to
+ * tp_presence_mixin_class_init()
+ * @set_own_status: The set-own-status function that was passed to
+ * tp_presence_mixin_class_init()
* @statuses: The presence statuses array that was passed to
* tp_presence_mixin_class_init()
*
@@ -148,6 +168,7 @@ typedef struct _TpPresenceMixinPrivate TpPresenceMixinPrivate;
struct _TpPresenceMixinClass {
TpPresenceMixinStatusAvailableFunc status_available;
TpPresenceMixinGetContactStatusesFunc get_contact_statuses;
+ TpPresenceMixinSetOwnStatusFunc set_own_status;
const TpPresenceStatusSpec *statuses;
@@ -191,6 +212,7 @@ GQuark tp_presence_mixin_get_offset_quark (void);
void tp_presence_mixin_class_init (GObjectClass *obj_cls, glong offset,
TpPresenceMixinStatusAvailableFunc status_available,
TpPresenceMixinGetContactStatusesFunc get_contact_statuses,
+ TpPresenceMixinSetOwnStatusFunc set_own_status,
const TpPresenceStatusSpec *statuses);
void tp_presence_mixin_init (GObject *obj, glong offset);