diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-20 08:42:13 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-20 08:42:13 +0100 |
commit | 72c28aa582fccf616092b3baed5a0964a98a09d7 (patch) | |
tree | 7b6658b7fed13394a60ae45b8a6a2148e7666e06 /src/dbus.c | |
parent | c586908e887ba0f25efb682e0f835755d36077b8 (diff) | |
download | connman-72c28aa582fccf616092b3baed5a0964a98a09d7.tar.gz connman-72c28aa582fccf616092b3baed5a0964a98a09d7.tar.bz2 connman-72c28aa582fccf616092b3baed5a0964a98a09d7.zip |
Add generic reference to the global D-Bus connection
Diffstat (limited to 'src/dbus.c')
-rw-r--r-- | src/dbus.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -114,3 +114,25 @@ void connman_dbus_dict_append_variant(DBusMessageIter *dict, dbus_message_iter_close_container(dict, &entry); } + +static DBusConnection *connection = NULL; + +DBusConnection *connman_dbus_get_connection(void) +{ + if (connection == NULL) + return NULL; + + return dbus_connection_ref(connection); +} + +int __connman_dbus_init(DBusConnection *conn) +{ + connection = conn; + + return 0; +} + +void __connman_dbus_cleanup(void) +{ + connection = NULL; +} |