diff options
author | Havoc Pennington <hp@redhat.com> | 2005-01-30 23:06:32 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2005-01-30 23:06:32 +0000 |
commit | 1dcacffc325e50754d4cc3338822d1f03c8b6e45 (patch) | |
tree | 2e41d02141bf61be249ee6a9f8df6bd891a7d1e1 /glib/dbus-gmain.c | |
parent | 4d985d98906577e3344fc1107d341b8ac969db1e (diff) |
2005-01-30 Havoc Pennington <hp@redhat.com>
* glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
(dbus_g_pending_call_cancel): new function
* dbus/dbus-glib.h: move GType decls for connection/message here;
* dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
here, just kind of rationalizing how we handle all that
* tools/dbus-names-model.c: new file for a tree model listing the
services on a bus
* tools/dbus-tree-view.c (model_new): use proper typing on the
model rows
Diffstat (limited to 'glib/dbus-gmain.c')
-rw-r--r-- | glib/dbus-gmain.c | 172 |
1 files changed, 0 insertions, 172 deletions
diff --git a/glib/dbus-gmain.c b/glib/dbus-gmain.c index 63e1d79e..4057482e 100644 --- a/glib/dbus-gmain.c +++ b/glib/dbus-gmain.c @@ -731,178 +731,6 @@ dbus_g_bus_get (DBusBusType type, return DBUS_G_CONNECTION_FROM_CONNECTION (connection); } -/** - * The implementation of DBUS_GERROR error domain. See documentation - * for GError in GLib reference manual. - * - * @returns the error domain quark for use with GError - */ -GQuark -dbus_g_error_quark (void) -{ - static GQuark quark = 0; - if (quark == 0) - quark = g_quark_from_static_string ("g-exec-error-quark"); - return quark; -} - - -/** - * Set a GError return location from a DBusError. - * - * @todo expand the DBUS_GERROR enum and take advantage of it here - * - * @param gerror location to store a GError, or #NULL - * @param derror the DBusError - */ -void -dbus_set_g_error (GError **gerror, - DBusError *derror) -{ - g_return_if_fail (derror != NULL); - g_return_if_fail (dbus_error_is_set (derror)); - - g_set_error (gerror, DBUS_GERROR, - DBUS_GERROR_FAILED, - _("D-BUS error %s: %s"), - derror->name, derror->message); -} - -/** - * Get the GLib type ID for a DBusConnection boxed type. - * - * @returns GLib type - */ -GType -dbus_connection_get_g_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static ("DBusConnection", - (GBoxedCopyFunc) dbus_connection_ref, - (GBoxedFreeFunc) dbus_connection_unref); - - return our_type; -} - -/** - * Get the GLib type ID for a DBusMessage boxed type. - * - * @returns GLib type - */ -GType -dbus_message_get_g_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static ("DBusMessage", - (GBoxedCopyFunc) dbus_message_ref, - (GBoxedFreeFunc) dbus_message_unref); - - return our_type; -} - -static DBusGConnection* -dbus_g_connection_ref (DBusGConnection *gconnection) -{ - DBusConnection *c; - - c = DBUS_CONNECTION_FROM_G_CONNECTION (gconnection); - dbus_connection_ref (c); - return gconnection; -} - -static void -dbus_g_connection_unref (DBusGConnection *gconnection) -{ - DBusConnection *c; - - c = DBUS_CONNECTION_FROM_G_CONNECTION (gconnection); - dbus_connection_unref (c); -} - - -static DBusGMessage* -dbus_g_message_ref (DBusGMessage *gmessage) -{ - DBusMessage *c; - - c = DBUS_MESSAGE_FROM_G_MESSAGE (gmessage); - dbus_message_ref (c); - return gmessage; -} - -static void -dbus_g_message_unref (DBusGMessage *gmessage) -{ - DBusMessage *c; - - c = DBUS_MESSAGE_FROM_G_MESSAGE (gmessage); - dbus_message_unref (c); -} - -/** - * Get the GLib type ID for a DBusGConnection boxed type. - * - * @returns GLib type - */ -GType -dbus_g_connection_get_g_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static ("DBusGConnection", - (GBoxedCopyFunc) dbus_g_connection_ref, - (GBoxedFreeFunc) dbus_g_connection_unref); - - return our_type; -} - -/** - * Get the GLib type ID for a DBusGMessage boxed type. - * - * @returns GLib type - */ -GType -dbus_g_message_get_g_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static ("DBusGMessage", - (GBoxedCopyFunc) dbus_g_message_ref, - (GBoxedFreeFunc) dbus_g_message_unref); - - return our_type; -} - -/** - * Get the DBusConnection corresponding to this DBusGConnection. - * The return value does not have its refcount incremented. - * - * @returns DBusConnection - */ -DBusConnection* -dbus_g_connection_get_connection (DBusGConnection *gconnection) -{ - return DBUS_CONNECTION_FROM_G_CONNECTION (gconnection); -} - -/** - * Get the DBusMessage corresponding to this DBusGMessage. - * The return value does not have its refcount incremented. - * - * @returns DBusMessage - */ -DBusMessage* -dbus_g_message_get_message (DBusGMessage *gmessage) -{ - return DBUS_MESSAGE_FROM_G_MESSAGE (gmessage); -} - /** @} */ /* end of public API */ #ifdef DBUS_BUILD_TESTS |