summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2010-09-23 13:09:53 +1000
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-09-23 13:09:53 +1000
commit9039634166dbc99076ead871186c7573b8bb6ac8 (patch)
tree00eac325198d72bf3ebfe03695050907ec84930a
parent21ca747953b93eed7d98effd8720477da13e1755 (diff)
Make all properties use TP_PROP_
-rw-r--r--docs/examples/glib_get_roster/example.c26
-rw-r--r--docs/examples/glib_mc5_dbus_tube_handler/example-handler.c12
-rw-r--r--docs/examples/glib_salut_ft/gnio-receiver.c22
-rw-r--r--docs/examples/glib_salut_ft/gnio-sender.c64
-rw-r--r--docs/examples/glib_salut_ft/receiver.c21
-rw-r--r--docs/examples/glib_salut_ft/sender.c60
-rw-r--r--docs/examples/glib_stream_tube/accept-tube.c30
-rw-r--r--docs/examples/glib_stream_tube/offer-tube.c52
-rw-r--r--docs/examples/glib_telepathy_properties/example.c15
9 files changed, 171 insertions, 131 deletions
diff --git a/docs/examples/glib_get_roster/example.c b/docs/examples/glib_get_roster/example.c
index 383a8ab..773570a 100644
--- a/docs/examples/glib_get_roster/example.c
+++ b/docs/examples/glib_get_roster/example.c
@@ -2,15 +2,7 @@
#include <glib.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
static GMainLoop *loop = NULL;
static TpDBusDaemon *bus_daemon = NULL;
@@ -134,7 +126,7 @@ new_channels_cb (TpConnection *conn,
/* begin ex.channel.requesting.glib.tpchannel */
const char *type = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".ChannelType");
+ TP_PROP_CHANNEL_CHANNEL_TYPE);
/* if this channel is a contact list, we want to know
* about it */
@@ -243,19 +235,25 @@ conn_ready (TpConnection *conn,
* to handle their callbacks (this does mean we also can't
* handle their errors) */
GHashTable *request = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
- TP_IFACE_CHANNEL ".TargetHandleType", TP_TYPE_HANDLE, TP_HANDLE_TYPE_LIST,
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_LIST,
+
NULL);
/* the 'publish' list */
tp_asv_set_string (request,
- TP_IFACE_CHANNEL ".TargetID", "publish");
+ TP_PROP_CHANNEL_TARGET_ID, "publish");
tp_cli_connection_interface_requests_call_ensure_channel (
conn, -1, request, NULL, NULL, NULL, NULL);
/* the 'subscribe' list */
tp_asv_set_string (request,
- TP_IFACE_CHANNEL ".TargetID", "subscribe");
+ TP_PROP_CHANNEL_TARGET_ID, "subscribe");
tp_cli_connection_interface_requests_call_ensure_channel (
conn, -1, request, NULL, NULL, NULL, NULL);
diff --git a/docs/examples/glib_mc5_dbus_tube_handler/example-handler.c b/docs/examples/glib_mc5_dbus_tube_handler/example-handler.c
index d45fcf3..a832f8d 100644
--- a/docs/examples/glib_mc5_dbus_tube_handler/example-handler.c
+++ b/docs/examples/glib_mc5_dbus_tube_handler/example-handler.c
@@ -196,9 +196,9 @@ example_handler_handle_channels (TpSvcClientHandler *self,
&map);
const char *type = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".ChannelType");
+ TP_PROP_CHANNEL_CHANNEL_TYPE);
const char *service = tp_asv_get_string (map,
- TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
+ TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME);
if (tp_strdiff (type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE) ||
tp_strdiff (service, SERVICE_NAME))
@@ -244,13 +244,13 @@ example_handler_get_property (GObject *self,
/* this is the same map as the Python handler example */
GPtrArray *array = g_ptr_array_new ();
GHashTable *map = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING,
+ TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE,
- TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT,
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_ROOM,
- TP_IFACE_CHANNEL ".Requested", G_TYPE_BOOLEAN,
+ TP_PROP_CHANNEL_REQUESTED, G_TYPE_BOOLEAN,
FALSE,
- TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName", G_TYPE_STRING,
+ TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME, G_TYPE_STRING,
SERVICE_NAME,
NULL
);
diff --git a/docs/examples/glib_salut_ft/gnio-receiver.c b/docs/examples/glib_salut_ft/gnio-receiver.c
index 123a161..bb8fda4 100644
--- a/docs/examples/glib_salut_ft/gnio-receiver.c
+++ b/docs/examples/glib_salut_ft/gnio-receiver.c
@@ -6,15 +6,7 @@
#include <gio/gio.h>
#include <gio/gunixoutputstream.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/gnio-util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
static GMainLoop *loop = NULL;
static TpDBusDaemon *bus_daemon = NULL;
@@ -132,9 +124,9 @@ file_transfer_channel_ready (TpChannel *channel,
GHashTable *map = tp_channel_borrow_immutable_properties (channel);
const char *filename = tp_asv_get_string (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename");
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME);
guint64 size = tp_asv_get_uint64 (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", NULL);
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE, NULL);
g_print ("New file transfer from %s -- `%s' (%llu bytes)\n",
tp_channel_get_identifier (channel),
@@ -144,7 +136,7 @@ file_transfer_channel_ready (TpChannel *channel,
* Connection Manager and streaming the file over that socket.
* Let's find out what manner of sockets are supported by this CM */
GHashTable *sockets = tp_asv_get_boxed (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".AvailableSocketTypes",
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_AVAILABLE_SOCKET_TYPES,
TP_HASH_TYPE_SUPPORTED_SOCKET_MAP);
struct ft_state *ftstate = g_slice_new (struct ft_state);
@@ -205,11 +197,11 @@ new_channels_cb (TpConnection *conn,
&map);
const char *type = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".ChannelType");
+ TP_PROP_CHANNEL_CHANNEL_TYPE);
int handle_type = tp_asv_get_uint32 (map,
- TP_IFACE_CHANNEL ".TargetHandleType", NULL);
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
const char *id = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".TargetID");
+ TP_PROP_CHANNEL_TARGET_ID);
g_print ("New channel: %s\n", type);
diff --git a/docs/examples/glib_salut_ft/gnio-sender.c b/docs/examples/glib_salut_ft/gnio-sender.c
index b0015ff..f33127c 100644
--- a/docs/examples/glib_salut_ft/gnio-sender.c
+++ b/docs/examples/glib_salut_ft/gnio-sender.c
@@ -5,15 +5,7 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/gnio-util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
static GMainLoop *loop = NULL;
static TpDBusDaemon *bus_daemon = NULL;
@@ -157,9 +149,9 @@ file_transfer_channel_ready (TpChannel *channel,
GHashTable *map = tp_channel_borrow_immutable_properties (channel);
const char *filename = tp_asv_get_string (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename");
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME);
guint64 size = tp_asv_get_uint64 (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", NULL);
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE, NULL);
g_print ("New file transfer to %s -- `%s' (%llu bytes)\n",
tp_channel_get_identifier (channel),
@@ -170,9 +162,9 @@ file_transfer_channel_ready (TpChannel *channel,
* Connection Manager and streaming the file over that socket.
* Let's find out what manner of sockets are supported by this CM */
GHashTable *sockets = tp_asv_get_boxed (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".AvailableSocketTypes",
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_AVAILABLE_SOCKET_TYPES,
TP_HASH_TYPE_SUPPORTED_SOCKET_MAP);
-
+
struct ft_state *ftstate = g_slice_new (struct ft_state);
ftstate->file = file;
guint access_control;
@@ -236,7 +228,7 @@ iterate_contacts (TpChannel *channel,
char **argv)
{
GError *error = NULL;
-
+
GFile *file = g_file_new_for_commandline_arg (argv[3]);
GFileInfo *info = g_file_query_info (file,
"standard::*",
@@ -245,11 +237,26 @@ iterate_contacts (TpChannel *channel,
handle_error (error);
GHashTable *props = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
- TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename", G_TYPE_STRING, g_file_info_get_display_name (info),
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType", G_TYPE_STRING, g_file_info_get_content_type (info),
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", G_TYPE_UINT64, g_file_info_get_size (info),
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_CONTACT,
+
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME,
+ G_TYPE_STRING,
+ g_file_info_get_display_name (info),
+
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_TYPE,
+ G_TYPE_STRING,
+ g_file_info_get_content_type (info),
+
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE,
+ G_TYPE_UINT64,
+ g_file_info_get_size (info),
+
NULL);
int i;
@@ -259,7 +266,7 @@ iterate_contacts (TpChannel *channel,
/* FIXME: we should check that our client has the
* FT capability */
- tp_asv_set_uint32 (props, TP_IFACE_CHANNEL ".TargetHandle",
+ tp_asv_set_uint32 (props, TP_PROP_CHANNEL_TARGET_HANDLE,
handle);
tp_cli_connection_interface_requests_call_create_channel (
@@ -267,7 +274,7 @@ iterate_contacts (TpChannel *channel,
create_ft_channel_cb,
g_object_ref (file), NULL, NULL);
}
-
+
g_hash_table_destroy (props);
g_object_unref (info);
g_object_unref (file);
@@ -352,9 +359,18 @@ conn_ready (TpConnection *conn,
{
/* we need to ensure a contact list */
GHashTable *props = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
- TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT, TP_HANDLE_TYPE_LIST,
- TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, "subscribe",
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_LIST,
+
+ TP_PROP_CHANNEL_TARGET_ID,
+ G_TYPE_STRING,
+ "subscribe",
+
NULL);
tp_cli_connection_interface_requests_call_ensure_channel (
diff --git a/docs/examples/glib_salut_ft/receiver.c b/docs/examples/glib_salut_ft/receiver.c
index 22e4c84..82e5038 100644
--- a/docs/examples/glib_salut_ft/receiver.c
+++ b/docs/examples/glib_salut_ft/receiver.c
@@ -8,14 +8,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
#define UNIX_PATH_MAX 108
@@ -143,9 +136,9 @@ file_transfer_channel_ready (TpChannel *channel,
tp_asv_dump (map);
const char *filename = tp_asv_get_string (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename");
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME);
guint64 size = tp_asv_get_uint64 (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", NULL);
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE, NULL);
g_print ("New file transfer from %s -- `%s' (%llu bytes)\n",
tp_channel_get_identifier (channel),
@@ -155,7 +148,7 @@ file_transfer_channel_ready (TpChannel *channel,
* Connection Manager and streaming the file over that socket.
* Let's find out what manner of sockets are supported by this CM */
GHashTable *sockets = tp_asv_get_boxed (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".AvailableSocketTypes",
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_AVAILABLE_SOCKET_TYPES,
TP_HASH_TYPE_SUPPORTED_SOCKET_MAP);
/* let's try for IPv4 */
@@ -216,11 +209,11 @@ new_channels_cb (TpConnection *conn,
&map);
const char *type = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".ChannelType");
+ TP_PROP_CHANNEL_CHANNEL_TYPE);
int handle_type = tp_asv_get_uint32 (map,
- TP_IFACE_CHANNEL ".TargetHandleType", NULL);
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
const char *id = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".TargetID");
+ TP_PROP_CHANNEL_TARGET_ID);
g_print ("New channel: %s\n", type);
diff --git a/docs/examples/glib_salut_ft/sender.c b/docs/examples/glib_salut_ft/sender.c
index 3d1efce..57fa609 100644
--- a/docs/examples/glib_salut_ft/sender.c
+++ b/docs/examples/glib_salut_ft/sender.c
@@ -9,14 +9,7 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
#define UNIX_PATH_MAX 108
@@ -146,9 +139,9 @@ file_transfer_channel_ready (TpChannel *channel,
GHashTable *map = tp_channel_borrow_immutable_properties (channel);
const char *filename = tp_asv_get_string (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename");
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME);
guint64 size = tp_asv_get_uint64 (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", NULL);
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE, NULL);
g_print ("New file transfer to %s -- `%s' (%llu bytes)\n",
tp_channel_get_identifier (channel),
@@ -158,7 +151,7 @@ file_transfer_channel_ready (TpChannel *channel,
* Connection Manager and streaming the file over that socket.
* Let's find out what manner of sockets are supported by this CM */
GHashTable *sockets = tp_asv_get_boxed (map,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".AvailableSocketTypes",
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_AVAILABLE_SOCKET_TYPES,
TP_HASH_TYPE_SUPPORTED_SOCKET_MAP);
/* let's try for IPv4 */
@@ -232,12 +225,30 @@ iterate_contacts (TpChannel *channel,
handle_error (error);
GHashTable *props = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
- TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
- TP_IFACE_CHANNEL ".TargetHandle", G_TYPE_UINT, handle,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename", G_TYPE_STRING, g_file_info_get_display_name (info),
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType", G_TYPE_STRING, g_file_info_get_content_type (info),
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", G_TYPE_UINT64, g_file_info_get_size (info),
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_CONTACT,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE,
+ G_TYPE_UINT,
+ handle,
+
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_FILENAME,
+ G_TYPE_STRING,
+ g_file_info_get_display_name (info),
+
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_TYPE,
+ G_TYPE_STRING,
+ g_file_info_get_content_type (info),
+
+ TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_SIZE,
+ G_TYPE_UINT64,
+ g_file_info_get_size (info),
+
NULL);
tp_cli_connection_interface_requests_call_create_channel (
@@ -331,9 +342,18 @@ conn_ready (TpConnection *conn,
{
/* we need to ensure a contact list */
GHashTable *props = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
- TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT, TP_HANDLE_TYPE_LIST,
- TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, "subscribe",
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_LIST,
+
+ TP_PROP_CHANNEL_TARGET_ID,
+ G_TYPE_STRING,
+ "subscribe",
+
NULL);
tp_cli_connection_interface_requests_call_ensure_channel (
diff --git a/docs/examples/glib_stream_tube/accept-tube.c b/docs/examples/glib_stream_tube/accept-tube.c
index 5240ca3..370b1de 100644
--- a/docs/examples/glib_stream_tube/accept-tube.c
+++ b/docs/examples/glib_stream_tube/accept-tube.c
@@ -2,16 +2,7 @@
#include <glib.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/gnio-util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
static GMainLoop *loop = NULL;
static TpDBusDaemon *bus_daemon = NULL;
@@ -122,9 +113,9 @@ new_channels_cb (TpConnection *conn,
&map);
const char *type = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".ChannelType");
+ TP_PROP_CHANNEL_CHANNEL_TYPE);
guint handle_type = tp_asv_get_uint32 (map,
- TP_IFACE_CHANNEL ".TargetHandleType", NULL);
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
/* if this channel is a contact list, we want to know
* about it */
@@ -173,9 +164,18 @@ conn_ready (TpConnection *conn,
char *targetid = argv[2];
GHashTable *request = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_IFACE_CHANNEL ".TargetHandleType", TP_TYPE_HANDLE, TP_HANDLE_TYPE_ROOM,
- TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, targetid,
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_TEXT,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_ROOM,
+
+ TP_PROP_CHANNEL_TARGET_ID,
+ G_TYPE_STRING,
+ targetid,
+
NULL);
tp_cli_connection_interface_requests_call_ensure_channel (
diff --git a/docs/examples/glib_stream_tube/offer-tube.c b/docs/examples/glib_stream_tube/offer-tube.c
index 89fb11f..950eff1 100644
--- a/docs/examples/glib_stream_tube/offer-tube.c
+++ b/docs/examples/glib_stream_tube/offer-tube.c
@@ -3,16 +3,7 @@
#include <glib.h>
#include <gio/gio.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/gnio-util.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
static GMainLoop *loop = NULL;
static TpDBusDaemon *bus_daemon = NULL;
@@ -122,11 +113,11 @@ new_channels_cb (TpConnection *conn,
&map);
const char *type = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".ChannelType");
+ TP_PROP_CHANNEL_CHANNEL_TYPE);
guint handle_type = tp_asv_get_uint32 (map,
- TP_IFACE_CHANNEL ".TargetHandleType", NULL);
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
const char *targetid = tp_asv_get_string (map,
- TP_IFACE_CHANNEL ".TargetID");
+ TP_PROP_CHANNEL_TARGET_ID);
/* if this channel is a contact list, we want to know
* about it */
@@ -148,10 +139,22 @@ new_channels_cb (TpConnection *conn,
/* Dial up a D-Bus Tube */
GHashTable *request = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
- TP_IFACE_CHANNEL ".TargetHandleType", TP_TYPE_HANDLE, handle_type,
- TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, targetid,
- TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service", G_TYPE_STRING, "badger",
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ handle_type,
+
+ TP_PROP_CHANNEL_TARGET_ID,
+ G_TYPE_STRING,
+ targetid,
+
+ TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE,
+ G_TYPE_STRING,
+ "badger",
+
NULL);
tp_cli_connection_interface_requests_call_create_channel (
@@ -189,9 +192,18 @@ conn_ready (TpConnection *conn,
#if 0
#endif
GHashTable *request = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_IFACE_CHANNEL ".TargetHandleType", TP_TYPE_HANDLE, TP_HANDLE_TYPE_ROOM,
- TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, targetid,
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_TEXT,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_ROOM,
+
+ TP_PROP_CHANNEL_TARGET_ID,
+ G_TYPE_STRING,
+ targetid,
+
NULL);
tp_cli_connection_interface_requests_call_ensure_channel (
diff --git a/docs/examples/glib_telepathy_properties/example.c b/docs/examples/glib_telepathy_properties/example.c
index c73c90a..c837440 100644
--- a/docs/examples/glib_telepathy_properties/example.c
+++ b/docs/examples/glib_telepathy_properties/example.c
@@ -417,9 +417,18 @@ conn_ready (TpConnection *conn,
{
/* make a connection to a MUC channel */
GHashTable *map = tp_asv_new (
- TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_UINT, TP_HANDLE_TYPE_ROOM,
- TP_IFACE_CHANNEL ".TargetID", G_TYPE_STRING, "#test",
+ TP_PROP_CHANNEL_CHANNEL_TYPE,
+ G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_TEXT,
+
+ TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ G_TYPE_UINT,
+ TP_HANDLE_TYPE_ROOM,
+
+ TP_PROP_CHANNEL_TARGET_ID,
+ G_TYPE_STRING,
+ "#test",
+
NULL);
tp_cli_connection_interface_requests_call_ensure_channel (