From 2058744376e4feb345e1a515eee014620ae44da5 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 29 Mar 2011 16:34:38 +0100 Subject: [PATCH 05/14] Clean up docs for DBusGConnection * introductory doc-comment for the (pseudo-)class * attach the doc-comment for the GType to the macro, not the internal function * rename function parameters to match what the header file says --- dbus/dbus-glib.c | 26 +++++++++++++++++--------- doc/reference/dbus-glib-sections.txt | 2 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/dbus/dbus-glib.c b/dbus/dbus-glib.c index 40ec23c..5375bb3 100644 --- a/dbus/dbus-glib.c +++ b/dbus/dbus-glib.c @@ -44,6 +44,13 @@ */ /** + * DBusGConnection: + * + * A #DBusGConnection is a boxed type abstracting a DBusConnection from + * libdbus. + */ + +/** * dbus_g_connection_flush: * @connection: the #DBusGConnection to flush * @@ -57,35 +64,35 @@ dbus_g_connection_flush (DBusGConnection *connection) /** * dbus_g_connection_ref: - * @gconnection the #DBusGConnection to ref + * @connection: the #DBusGConnection to ref * * Increment refcount on a #DBusGConnection * * Returns: the connection that was ref'd */ DBusGConnection* -dbus_g_connection_ref (DBusGConnection *gconnection) +dbus_g_connection_ref (DBusGConnection *connection) { DBusConnection *c; - c = DBUS_CONNECTION_FROM_G_CONNECTION (gconnection); + c = DBUS_CONNECTION_FROM_G_CONNECTION (connection); dbus_connection_ref (c); - return gconnection; + return connection; } /** * dbus_g_connection_unref: - * @gconnection: the connection to unref + * @connection: the connection to unref * * Decrement refcount on a #DBusGConnection */ void -dbus_g_connection_unref (DBusGConnection *gconnection) +dbus_g_connection_unref (DBusGConnection *connection) { DBusConnection *c; - c = DBUS_CONNECTION_FROM_G_CONNECTION (gconnection); + c = DBUS_CONNECTION_FROM_G_CONNECTION (connection); dbus_connection_unref (c); } @@ -248,8 +255,9 @@ dbus_message_get_g_type (void) } /** - * dbus_g_connection_get_g_type: - * Get the GLib type ID for a DBusGConnection boxed type. + * DBUS_TYPE_G_CONNECTION: + * + * Expands to a function call returning the boxed #GType of a #DBusGConnection. * * Returns: the GLib type */ diff --git a/doc/reference/dbus-glib-sections.txt b/doc/reference/dbus-glib-sections.txt index 4ec6760..25c02b7 100644 --- a/doc/reference/dbus-glib-sections.txt +++ b/doc/reference/dbus-glib-sections.txt @@ -3,6 +3,7 @@ DBusGConnection dbus/dbus-glib.h DBusGConnection +DBUS_TYPE_G_CONNECTION dbus_g_bus_get dbus_g_bus_get_private dbus_g_thread_init @@ -15,7 +16,6 @@ dbus_g_connection_register_g_object dbus_g_connection_unregister_g_object dbus_g_connection_lookup_g_object -DBUS_TYPE_G_CONNECTION dbus_g_connection_get_g_type -- 1.7.5.3