[Telepathy-commits] [telepathy-gabble/master] conn-olpc: use the auto-generated activity struct instead of our own
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:18 PDT 2008
20080609134154-7fe3f-2c8e9a8f31b5d0bdddab01dd89ac273335200a6f.gz
---
src/conn-olpc.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index fd0045a..70a5f92 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -38,10 +38,6 @@
#include "util.h"
#include "olpc-view.h"
-#define ACTIVITY_PAIR_TYPE \
- dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_UINT, \
- G_TYPE_INVALID)
-
static gboolean
update_activities_properties (GabbleConnection *conn, const gchar *contact,
LmMessage *msg);
@@ -843,9 +839,9 @@ get_buddy_activities (GabbleConnection *conn,
continue;
}
- g_value_init (&gvalue, ACTIVITY_PAIR_TYPE);
+ g_value_init (&gvalue, GABBLE_STRUCT_TYPE_ACTIVITY);
g_value_take_boxed (&gvalue, dbus_g_type_specialized_construct
- (ACTIVITY_PAIR_TYPE));
+ (GABBLE_STRUCT_TYPE_ACTIVITY));
dbus_g_type_struct_set (&gvalue,
0, info->id,
1, info->handle,
@@ -966,7 +962,7 @@ free_activities (GPtrArray *activities)
guint i;
for (i = 0; i < activities->len; i++)
- g_boxed_free (ACTIVITY_PAIR_TYPE, activities->pdata[i]);
+ g_boxed_free (GABBLE_STRUCT_TYPE_ACTIVITY, activities->pdata[i]);
g_ptr_array_free (activities, TRUE);
}
@@ -994,7 +990,7 @@ check_activity_properties (GabbleConnection *conn,
guint channel;
ActivityInfo *info;
- g_value_init (&pair, ACTIVITY_PAIR_TYPE);
+ g_value_init (&pair, GABBLE_STRUCT_TYPE_ACTIVITY);
g_value_set_static_boxed (&pair, g_ptr_array_index (activities, i));
dbus_g_type_struct_get (&pair,
0, &activity,
@@ -1198,7 +1194,7 @@ olpc_buddy_info_set_activities (GabbleSvcOLPCBuddyInfo *iface,
ActivityInfo *info;
GError *error = NULL;
- g_value_init (&pair, ACTIVITY_PAIR_TYPE);
+ g_value_init (&pair, GABBLE_STRUCT_TYPE_ACTIVITY);
g_value_set_static_boxed (&pair, g_ptr_array_index (activities, i));
dbus_g_type_struct_get (&pair,
0, &activity,
--
1.5.6.5
More information about the Telepathy-commits
mailing list