summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-04-02 16:43:31 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2012-04-02 16:43:31 +0100
commit126261cf295622c659238bf51d85d8e39c8eaf2c (patch)
tree6c958ab7baf16bb071690c3787e190fb26902047
parent86216b62cd607b94bf837b4052f1f1e6cbfab819 (diff)
downloadtelepathy-glib-126261cf295622c659238bf51d85d8e39c8eaf2c.tar.gz
DBusTubeChannel: write a better preamble maybe?
-rw-r--r--telepathy-glib/dbus-tube-channel.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index 70055e232..998cb9957 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -21,10 +21,44 @@
/**
* SECTION:dbus-tube-channel
* @title: TpDBusTubeChannel
- * @short_description: proxy object for a dbus tube channel
+ * @short_description: proxy object for D-Bus tube channels
*
- * #TpDBusTubeChannel is a sub-class of #TpChannel providing convenient API
- * to offer and accept a dbus tube.
+ * #TpDBusTubeChannel provides API for working with D-Bus tube channels, which
+ * allow applications to open D-Bus connections to a contact or chat room.
+ *
+ * To create a new outgoing D-Bus tube channel, do something like:
+ *
+ * |[
+ * GHashTable *request_properties = tp_asv_new (
+ * TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE,
+ * TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT,
+ * TP_PROP_CHANNEL_TARGET_ID, G_TYPE_STRING, tp_contact_get_identifier (contact),
+ * TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME, G_TYPE_STRING, "com.example.walrus",
+ * NULL);
+ * TpAccountChannelRequest *req = tp_account_channel_request_new (account,
+ * request_properties, TP_USER_ACTION_TIME_NOT_USER_ACTION);
+ * tp_account_channel_request_create_and_handle_channel_async (req, NULL, callback, NULL);
+ *
+ * // ...
+ *
+ * static void
+ * callback (
+ * GObject *source,
+ * GAsyncResult *result,
+ * gpointer user_data)
+ * {
+ * TpAccountChannelRequest *req = TP_ACCOUNT_CHANNEL_REQUEST (source);
+ * TpChannel *channel;
+ * GError *error = NULL;
+ *
+ * channel = tp_account_channel_request_create_and_handle_channel_finish (req, result, &error);
+ * tp_dbus_tube_channel_offer_async (TP_DBUS_TUBE_CHANNEL (channel), NULL, offer_callback, NULL);
+ * }
+ * ]|
+ *
+ * You can find a fuller example in the <ulink
+ * url="http://cgit.freedesktop.org/telepathy/telepathy-glib/tree/examples/client/dbus-tubes/">examples/client/dbus-tubes</ulink>
+ * directory.
*
* Since: 0.15.6
*/