void __connman_profile_cleanup(void);
void __connman_profile_list(DBusMessageIter *iter);
-const char *__connman_profile_active(void);
+const char *__connman_profile_active_ident(void);
+const char *__connman_profile_active_path(void);
void __connman_profile_changed(void);
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
- str = __connman_profile_active();
+ str = __connman_profile_active_path();
if (str != NULL)
connman_dbus_dict_append_variant(&dict, "ActiveProfile",
DBUS_TYPE_OBJECT_PATH, &str);
#include "connman.h"
-#define PROFILE_DEFAULT "/profile/default"
+#define PROFILE_DEFAULT_IDENT "default"
static DBusConnection *connection = NULL;
-const char *__connman_profile_active(void)
+const char *__connman_profile_active_ident(void)
{
DBG("");
- return PROFILE_DEFAULT;
+ return PROFILE_DEFAULT_IDENT;
+}
+
+const char *__connman_profile_active_path(void)
+{
+ DBG("");
+
+ return "/profile/" PROFILE_DEFAULT_IDENT;
}
static void append_services(DBusMessageIter *entry)
void __connman_profile_changed(void)
{
- const char *path = __connman_profile_active();
+ const char *path = __connman_profile_active_path();
DBusMessage *signal;
DBusMessageIter entry;
void __connman_profile_list(DBusMessageIter *iter)
{
- const char *path = __connman_profile_active();
+ const char *path = __connman_profile_active_path();
DBG("");
int __connman_profile_init(DBusConnection *conn)
{
+ const char *path = __connman_profile_active_path();
+
DBG("conn %p", conn);
connection = dbus_connection_ref(conn);
if (connection == NULL)
return -1;
- g_dbus_register_interface(connection, PROFILE_DEFAULT,
+ g_dbus_register_interface(connection, path,
CONNMAN_PROFILE_INTERFACE,
profile_methods, profile_signals,
NULL, NULL, NULL);
void __connman_profile_cleanup(void)
{
+ const char *path = __connman_profile_active_path();
+
DBG("conn %p", connection);
- g_dbus_unregister_interface(connection, PROFILE_DEFAULT,
+ g_dbus_unregister_interface(connection, path,
CONNMAN_PROFILE_INTERFACE);
if (connection == NULL)