#define CONNMAN_NETWORK_INTERFACE CONNMAN_SERVICE ".Network"
#define CONNMAN_CONNECTION_INTERFACE CONNMAN_SERVICE ".Connection"
+extern DBusConnection *connman_dbus_get_connection(void);
+
extern void connman_dbus_property_append_variant(DBusMessageIter *property,
const char *key, int type, void *val);
#define NM_PATH "/org/freedesktop/NetworkManager"
#define NM_INTERFACE NM_SERVICE
+int __connman_dbus_init(DBusConnection *conn);
+void __connman_dbus_cleanup(void);
+
DBusMessage *__connman_error_failed(DBusMessage *msg);
DBusMessage *__connman_error_invalid_arguments(DBusMessage *msg);
DBusMessage *__connman_error_permission_denied(DBusMessage *msg);
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;
+}
}
}
+ __connman_dbus_init(conn);
+
__connman_storage_init();
__connman_element_init(conn, option_device);
__connman_storage_cleanup();
+ __connman_dbus_cleanup();
+
selftest:
__connman_log_cleanup();