diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-16 14:20:18 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-16 14:20:18 +0200 |
commit | 3026439222b19dce8d58f069071eec3055889bf3 (patch) | |
tree | 8e9e98ca55a2a3ceaa50bc2d84f08e4bf7d0265c /src/idle-im-channel.c | |
parent | 8cfa0ce2f08324bb6884d7c1ed533e87074c1338 (diff) |
use G_N_ELEMENTS instead of NUM_SUPPORTED_MESSAGE_TYPES
Diffstat (limited to 'src/idle-im-channel.c')
-rw-r--r-- | src/idle-im-channel.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/idle-im-channel.c b/src/idle-im-channel.c index de09a46..9ffa90e 100644 --- a/src/idle-im-channel.c +++ b/src/idle-im-channel.c @@ -51,8 +51,6 @@ G_DEFINE_TYPE_WITH_CODE(IdleIMChannel, idle_im_channel, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(TP_TYPE_EXPORTABLE_CHANNEL, NULL); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE, _destroyable_iface_init);) -#define NUM_SUPPORTED_MESSAGE_TYPES 3 - /* property enum */ enum { PROP_CONNECTION = 1, @@ -100,7 +98,7 @@ static GObject *idle_im_channel_constructor(GType type, guint n_props, GObjectCo DBusGConnection *bus; TpHandleRepoIface *handles; TpBaseConnection *conn; - TpChannelTextMessageType types[NUM_SUPPORTED_MESSAGE_TYPES] = { + TpChannelTextMessageType types[] = { TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, @@ -127,7 +125,7 @@ static GObject *idle_im_channel_constructor(GType type, guint n_props, GObjectCo tp_message_mixin_init (obj, G_STRUCT_OFFSET (IdleIMChannel, message_mixin), conn); tp_message_mixin_implement_sending (obj, idle_im_channel_send, - NUM_SUPPORTED_MESSAGE_TYPES, types, 0, + G_N_ELEMENTS (types), types, 0, TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES, supported_content_types); |