[glib] menu/action exporter docs fixup
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] menu/action exporter docs fixup
- Date: Thu, 8 Dec 2011 23:14:32 +0000 (UTC)
commit 4f2c2077457bcd59ff09b2829b9f25b45e37a515
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Dec 2 16:50:09 2011 -0500
menu/action exporter docs fixup
docs/reference/gio/gio-sections.txt | 10 +++-----
gio/gactiongroupexporter.c | 36 +++++++++++++++++++++++----------
gio/gactiongroupexporter.h | 2 +-
gio/gmenuexporter.c | 38 ++++++++++++++++++++++------------
gio/gmenuexporter.h | 2 +-
5 files changed, 55 insertions(+), 33 deletions(-)
---
diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt
index cb0e3ba..2b83a51 100644
--- a/docs/reference/gio/gio-sections.txt
+++ b/docs/reference/gio/gio-sections.txt
@@ -2911,9 +2911,8 @@ G_ACTION_GROUP
<SECTION>
<FILE>gactiongroupexporter</FILE>
-g_action_group_dbus_export_start
-g_action_group_dbus_export_stop
-g_action_group_dbus_export_query
+g_dbus_connection_export_action_group
+g_dbus_connection_unexport_action_group
</SECTION>
<SECTION>
@@ -3567,9 +3566,8 @@ G_NETWORK_MONITOR_GET_INTERFACE
<SECTION>
<FILE>gmenuexporter</FILE>
-g_menu_model_dbus_export_start
-g_menu_model_dbus_export_stop
-g_menu_model_dbus_export_query
+g_dbus_connection_export_menu_model
+g_dbus_connection_unexport_menu_model
</SECTION>
<SECTION>
diff --git a/gio/gactiongroupexporter.c b/gio/gactiongroupexporter.c
index d0601a9..9c78487 100644
--- a/gio/gactiongroupexporter.c
+++ b/gio/gactiongroupexporter.c
@@ -561,7 +561,7 @@ g_action_group_exporter_free (gpointer user_data)
}
/**
- * g_action_group_dbus_export_start:
+ * g_dbus_connection_export_action_group:
* @connection: a #GDBusConnection
* @object_path: a D-Bus object path
* @action_group: a #GActionGroup
@@ -572,17 +572,17 @@ g_action_group_exporter_free (gpointer user_data)
* The implemented D-Bus API should be considered private. It is
* subject to change in the future.
*
- * A given action group can only be exported on one object path and an
- * object path can only have one action group exported on it. If either
- * constraint is violated, the export will fail and %FALSE will be
+ * A given * object path can only have one action group exported on it.
+ * If this constraint is violated, the export will fail and 0 will be
* returned (with @error set accordingly).
*
- * Use g_action_group_dbus_export_stop() to stop exporting @action_group,
- * or g_action_group_dbus_export_query() to find out if and where a given
- * action group is exported.
+ * You can unexport the action group using
+ * g_dbus_connection_unexport_action_group() with the return value of
+ * this function.
*
- * Returns: %TRUE if the export is successful, or %FALSE (with @error
- * set) in the event of a failure.
+ * Returns: the ID of the export (never zero), or 0 in case of failure
+ *
+ * Since: 2.32
**/
guint
g_dbus_connection_export_action_group (GDBusConnection *connection,
@@ -642,9 +642,23 @@ g_dbus_connection_export_action_group (GDBusConnection *connection,
return id;
}
-gboolean
+/**
+ * g_dbus_connection_unexport_action_group:
+ * @connection: a #GDBusConnection
+ * @export_id: the ID from g_dbus_connection_export_action_group()
+ *
+ * Reverses the effect of a previous call to
+ * g_dbus_connection_export_action_group().
+ *
+ * It is an error to call this function with an ID that wasn't returned
+ * from g_dbus_connection_export_action_group() or to call it with the
+ * same ID more than once.
+ *
+ * Since: 2.32
+ **/
+void
g_dbus_connection_unexport_action_group (GDBusConnection *connection,
guint export_id)
{
- return g_dbus_connection_unregister_object (connection, export_id);
+ g_dbus_connection_unregister_object (connection, export_id);
}
diff --git a/gio/gactiongroupexporter.h b/gio/gactiongroupexporter.h
index d7d2a81..2ff4d0b 100644
--- a/gio/gactiongroupexporter.h
+++ b/gio/gactiongroupexporter.h
@@ -37,7 +37,7 @@ guint g_dbus_connection_export_action_group (GDBusCo
GActionGroup *action_group,
GError **error);
-gboolean g_dbus_connection_unexport_action_group (GDBusConnection *connection,
+void g_dbus_connection_unexport_action_group (GDBusConnection *connection,
guint export_id);
G_END_DECLS
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c
index 3934f20..791ce6e 100644
--- a/gio/gmenuexporter.c
+++ b/gio/gmenuexporter.c
@@ -832,7 +832,7 @@ g_menu_exporter_method_call (GDBusConnection *connection,
/* {{{1 Public API */
/**
- * g_menu_model_dbus_export_start:
+ * g_dbus_connection_export_menu_model:
* @connection: a #GDBusConnection
* @object_path: a D-Bus object path
* @menu: a #GMenuModel
@@ -843,17 +843,15 @@ g_menu_exporter_method_call (GDBusConnection *connection,
* The implemented D-Bus API should be considered private.
* It is subject to change in the future.
*
- * A given menu model can only be exported on one object path
- * and an object path can only have one action group exported
- * on it. If either constraint is violated, the export will
- * fail and %FALSE will be returned (with @error set accordingly).
+ * An object path can only have one action group exported on it. If this
+ * constraint is violated, the export will fail and 0 will be
+ * returned (with @error set accordingly).
*
- * Use g_menu_model_dbus_export_stop() to stop exporting @menu
- * or g_menu_model_dbus_export_query() to find out if and where
- * a given menu model is exported.
+ * You can unexport the menu model using
+ * g_dbus_connection_unexport_menu_model() with the return value of
+ * this function.
*
- * Returns: %TRUE if the export is successful, or %FALSE (with
- * @error set) in the event of a failure.
+ * Returns: the ID of the export (never zero), or 0 in case of failure
*/
guint
g_dbus_connection_export_menu_model (GDBusConnection *connection,
@@ -887,18 +885,30 @@ g_dbus_connection_export_menu_model (GDBusConnection *connection,
return id;
}
-gboolean
+/**
+ * g_dbus_connection_unexport_menu_model:
+ * @connection: a #GDBusConnection
+ * @export_id: the ID from g_dbus_connection_export_menu_model()
+ *
+ * Reverses the effect of a previous call to
+ * g_dbus_connection_export_menu_model().
+ *
+ * It is an error to call this function with an ID that wasn't returned
+ * from g_dbus_connection_export_menu_model() or to call it with the
+ * same ID more than once.
+ *
+ * Since: 2.32
+ **/
+void
g_dbus_connection_unexport_menu_model (GDBusConnection *connection,
guint export_id)
{
if (!g_dbus_connection_unregister_object (connection, export_id))
- return FALSE;
+ return;
g_assert (g_menu_exporter_to_free != NULL);
g_menu_exporter_actually_free (g_menu_exporter_to_free);
g_menu_exporter_to_free = NULL;
-
- return TRUE;
}
/* {{{1 Epilogue */
diff --git a/gio/gmenuexporter.h b/gio/gmenuexporter.h
index f9eb513..b555c4f 100644
--- a/gio/gmenuexporter.h
+++ b/gio/gmenuexporter.h
@@ -32,7 +32,7 @@ guint g_dbus_connection_export_menu_model (GDBusCo
GMenuModel *menu,
GError **error);
-gboolean g_dbus_connection_unexport_menu_model (GDBusConnection *connection,
+void g_dbus_connection_unexport_menu_model (GDBusConnection *connection,
guint export_id);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]