[next] telepathy-glib: Mixins: require to use our base classes
Xavier Claessens
xclaesse at kemper.freedesktop.org
Thu Jun 28 08:12:56 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 85ec43f22939590022f31647374765e1ebbe529e
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=85ec43f22939590022f31647374765e1ebbe529e
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Tue Jun 26 14:04:59 2012 +0200
Mixins: require to use our base classes
TpGroupMixin and TpMessageMixin now require TpBaseChannel.
TpPresenceMixin now require TpBaseConnection.
---
telepathy-glib/group-mixin.c | 5 ++++-
telepathy-glib/message-mixin.c | 5 ++++-
telepathy-glib/presence-mixin.c | 4 +++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c
index 7c85615..cd29c51 100644
--- a/telepathy-glib/group-mixin.c
+++ b/telepathy-glib/group-mixin.c
@@ -64,6 +64,7 @@
#include <stdio.h>
#include <string.h>
+#include <telepathy-glib/base-channel.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/errors.h>
#include <telepathy-glib/gtypes.h>
@@ -308,6 +309,8 @@ tp_group_mixin_class_allow_self_removal (GObjectClass *obj_cls)
* @self_handle: The handle of the local user in this group, if any
*
* Initialize the mixin.
+ *
+ * Since 0.UNRELEASED @obj must be a #TpBaseChannel subclass.
*/
void
tp_group_mixin_init (GObject *obj,
@@ -317,7 +320,7 @@ tp_group_mixin_init (GObject *obj,
{
TpGroupMixin *mixin;
- g_assert (G_IS_OBJECT (obj));
+ g_assert (TP_IS_BASE_CHANNEL (obj));
g_type_set_qdata (G_OBJECT_TYPE (obj),
TP_GROUP_MIXIN_OFFSET_QUARK,
diff --git a/telepathy-glib/message-mixin.c b/telepathy-glib/message-mixin.c
index 64ada91..cf0e5d2 100644
--- a/telepathy-glib/message-mixin.c
+++ b/telepathy-glib/message-mixin.c
@@ -66,6 +66,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <string.h>
+#include <telepathy-glib/base-channel.h>
#include <telepathy-glib/cm-message.h>
#include <telepathy-glib/cm-message-internal.h>
#include <telepathy-glib/dbus.h>
@@ -467,6 +468,8 @@ error:
* self->connection);
* </programlisting></informalexample>
*
+ * Since 0.UNRELEASED @obj must be a #TpBaseChannel subclass.
+ *
* Since: 0.7.21
*/
void
@@ -476,7 +479,7 @@ tp_message_mixin_init (GObject *obj,
{
TpMessageMixin *mixin;
- g_assert (G_IS_OBJECT (obj));
+ g_assert (TP_IS_BASE_CHANNEL (obj));
g_type_set_qdata (G_OBJECT_TYPE (obj),
TP_MESSAGE_MIXIN_OFFSET_QUARK,
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c
index 95d8d52..e481903 100644
--- a/telepathy-glib/presence-mixin.c
+++ b/telepathy-glib/presence-mixin.c
@@ -458,6 +458,8 @@ tp_presence_mixin_class_init (GObjectClass *obj_cls,
* tp_presence_mixin_init ((GObject *) self,
* G_STRUCT_OFFSET (SomeObject, presence_mixin));
* </programlisting></informalexample>
+ *
+ * Since 0.UNRELEASED @obj must be a #TpBaseConnection subclass.
*/
void
tp_presence_mixin_init (GObject *obj,
@@ -465,7 +467,7 @@ tp_presence_mixin_init (GObject *obj,
{
DEBUG ("called.");
- g_assert (G_IS_OBJECT (obj));
+ g_assert (TP_IS_BASE_CONNECTION (obj));
g_type_set_qdata (G_OBJECT_TYPE (obj),
TP_PRESENCE_MIXIN_OFFSET_QUARK,
More information about the telepathy-commits
mailing list