summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-05-30 13:34:17 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-06-05 12:13:17 +0200
commit6342f7890a21ac245bed5c90e957eaa4b73af4a3 (patch)
tree3be6fbefc7aceedefb9556412c53629d315f19c3 /examples
parentf91d0476422666818bc2a61521406e9006b60eca (diff)
Examples: do no use message-internal.h
https://bugs.freedesktop.org/show_bug.cgi?id=49384
Diffstat (limited to 'examples')
-rw-r--r--examples/cm/echo-message-parts/chan.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/cm/echo-message-parts/chan.c b/examples/cm/echo-message-parts/chan.c
index 3d1d85392..b37019ad7 100644
--- a/examples/cm/echo-message-parts/chan.c
+++ b/examples/cm/echo-message-parts/chan.c
@@ -18,9 +18,6 @@
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/telepathy-glib-dbus.h>
-/* FIXME: example code should not be doing this! */
-#include <telepathy-glib/message-internal.h>
-
static void destroyable_iface_init (gpointer iface, gpointer data);
static void sms_iface_init (gpointer iface, gpointer data);
@@ -416,10 +413,15 @@ sms_get_sms_length (TpSvcChannelInterfaceSMS *self,
for (i = 0; i < parts->len; i++)
{
- tp_g_hash_table_update (g_ptr_array_index (message->parts, i),
- g_ptr_array_index (parts, i),
- (GBoxedCopyFunc) g_strdup,
- (GBoxedCopyFunc) tp_g_value_slice_dup);
+ GHashTableIter iter;
+ gpointer key, value;
+
+ tp_message_append_part (message);
+ g_hash_table_iter_init (&iter, g_ptr_array_index (parts, i));
+ while (g_hash_table_iter_next (&iter, &key, &value))
+ {
+ tp_message_set (message, i, key, value);
+ }
}
txt = tp_message_to_text (message, NULL);