#define CONNMAN_ELEMENT_INTERFACE CONNMAN_SERVICE ".Element"
+#define CONNMAN_PROFILE_INTERFACE CONNMAN_SERVICE ".Profile"
+
#define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE ".Manager"
#define CONNMAN_MANAGER_PATH "/"
int __connman_agent_register(const char *sender, const char *path);
int __connman_agent_unregister(const char *sender, const char *path);
+int __connman_profile_init(DBusConnection *conn);
+void __connman_profile_cleanup(void);
+
void __connman_profile_list(DBusMessageIter *iter);
#include <connman/log.h>
__connman_manager_init(conn, option_compat);
+ __connman_profile_init(conn);
+
__connman_plugin_init();
g_free(option_device);
__connman_element_cleanup();
+ __connman_profile_cleanup();
+
__connman_manager_cleanup();
__connman_storage_cleanup();
dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path);
}
+
+static GDBusMethodTable profile_methods[] = {
+ { },
+};
+
+static DBusConnection *connection = NULL;
+
+int __connman_profile_init(DBusConnection *conn)
+{
+ DBG("conn %p", conn);
+
+ connection = dbus_connection_ref(conn);
+ if (connection == NULL)
+ return -1;
+
+ g_dbus_register_interface(connection, "/profile/default",
+ CONNMAN_PROFILE_INTERFACE,
+ profile_methods,
+ NULL, NULL, NULL, NULL);
+
+ return 0;
+}
+
+void __connman_profile_cleanup(void)
+{
+ DBG("conn %p", connection);
+
+ g_dbus_unregister_interface(connection, "/profile/default",
+ CONNMAN_PROFILE_INTERFACE);
+
+ if (connection == NULL)
+ return;
+
+ dbus_connection_unref(connection);
+}