sbin_PROGRAMS = connmand
-connmand_SOURCES = main.c connman.h log.c plugin.c element.c \
- storage.c manager.c agent.c
+connmand_SOURCES = main.c connman.h log.c plugin.c profile.c element.c \
+ storage.c manager.c agent.c
connmand_LDADD = @SQLITE_LIBS@ @GDBUS_LIBS@ @GMODULE_LIBS@ @GTHREAD_LIBS@
int __connman_agent_register(const char *sender, const char *path);
int __connman_agent_unregister(const char *sender, const char *path);
+void __connman_profile_list(DBusMessageIter *iter);
+
#include <connman/log.h>
int __connman_log_init(gboolean detach, gboolean debug);
return reply;
}
+static DBusMessage *list_profiles(DBusConnection *conn,
+ DBusMessage *msg, void *data)
+{
+ DBusMessage *reply;
+ DBusMessageIter array, iter;
+
+ DBG("conn %p", conn);
+
+ reply = dbus_message_new_method_return(msg);
+ if (reply == NULL)
+ return NULL;
+
+ dbus_message_iter_init_append(reply, &array);
+
+ dbus_message_iter_open_container(&array, DBUS_TYPE_ARRAY,
+ DBUS_TYPE_OBJECT_PATH_AS_STRING, &iter);
+
+ __connman_profile_list(&iter);
+
+ dbus_message_iter_close_container(&array, &iter);
+
+ return reply;
+}
+
static DBusMessage *list_elements(DBusConnection *conn,
DBusMessage *msg, void *data)
{
{ "RegisterAgent", "o", "", register_agent },
{ "UnregisterAgent", "o", "", unregister_agent },
+ { "ListProfiles", "", "ao", list_profiles },
+
{ "ListElements", "", "ao", list_elements },
{ "ListDevices", "", "ao", list_devices },
{ },
--- /dev/null
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <gdbus.h>
+
+#include "connman.h"
+
+void __connman_profile_list(DBusMessageIter *iter)
+{
+ const char *path = "/profile/default";
+
+ DBG("");
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH, &path);
+}