diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-06 13:52:43 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-06 13:52:43 +0000 |
commit | dd368f19884b9751a0f99ffebcd2c5520069f5db (patch) | |
tree | 60e3c73266dea9eb5c3d9bcf747a618bc6b05a1f /gdbus | |
parent | 8955dc1ce35be8c0ef70b0faa8846c2bf4b6de9f (diff) |
Remove object path creation and destroy helpers
Diffstat (limited to 'gdbus')
-rw-r--r-- | gdbus/gdbus.h | 7 | ||||
-rw-r--r-- | gdbus/object.c | 42 |
2 files changed, 3 insertions, 46 deletions
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index 9b95e2e5..5ddc4058 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h @@ -43,13 +43,6 @@ gboolean g_dbus_set_disconnect_function(DBusConnection *connection, #define DBUS_TYPE_STRING_ARRAY_AS_STRING (DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_STRING_AS_STRING) #define DBUS_TYPE_BYTE_ARRAY_AS_STRING (DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_BYTE_AS_STRING) -dbus_bool_t dbus_connection_create_object_path(DBusConnection *connection, - const char *path, void *user_data, - DBusObjectPathUnregisterFunction function); - -dbus_bool_t dbus_connection_destroy_object_path(DBusConnection *connection, - const char *path); - dbus_bool_t dbus_connection_get_object_user_data(DBusConnection *connection, const char *path, void **data_p); diff --git a/gdbus/object.c b/gdbus/object.c index 6e5e8aab..437659c7 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -38,11 +38,9 @@ #define debug(fmt...) struct generic_data { - void *user_data; - DBusObjectPathUnregisterFunction unregister_function; + unsigned int refcount; GSList *interfaces; char *introspect; - unsigned int refcount; }; struct interface_data { @@ -216,9 +214,6 @@ static void generic_unregister(DBusConnection *connection, void *user_data) { struct generic_data *data = user_data; - if (data->unregister_function) - data->unregister_function(connection, data->user_data); - g_free(data->introspect); g_free(data); } @@ -378,43 +373,11 @@ static void object_path_unref(DBusConnection *connection, const char *path) dbus_connection_unregister_object_path(connection, path); } -dbus_bool_t dbus_connection_create_object_path(DBusConnection *connection, - const char *path, void *user_data, - DBusObjectPathUnregisterFunction function) -{ - struct generic_data *data; - - data = object_path_ref(connection, path); - if (data == NULL) - return FALSE; - - data->user_data = user_data; - data->unregister_function = function; - - return TRUE; -} - -dbus_bool_t dbus_connection_destroy_object_path(DBusConnection *connection, - const char *path) -{ - object_path_unref(connection, path); - - return TRUE; -} - dbus_bool_t dbus_connection_get_object_user_data(DBusConnection *connection, const char *path, void **data_p) { - struct generic_data *data = NULL; - - if (!dbus_connection_get_object_path_data(connection, path, - (void *) &data) || !data) - return FALSE; - - *data_p = data->user_data; - - return TRUE; + return FALSE; } void dbus_message_iter_append_variant(DBusMessageIter *iter, @@ -599,6 +562,7 @@ dbus_bool_t dbus_connection_emit_signal_valist(DBusConnection *conn, } ret = dbus_connection_send(conn, signal, NULL); + fail: dbus_message_unref(signal); |