This patch adds a command line option for enabling experimental D-Bus
interfaces. --experimental/-E enables experimental interfaces.
---
src/main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/main.c b/src/main.c
index 46bb90b..1e99b13 100644
--- a/src/main.c
+++ b/src/main.c
@@ -133,6 +133,7 @@ static gchar *option_plugin = NULL;
static gchar *option_noplugin = NULL;
static gboolean option_detach = TRUE;
static gboolean option_version = FALSE;
+static gboolean option_experimental = FALSE;
static gboolean parse_debug(const char *key, const char *value,
gpointer user_data, GError **error)
@@ -153,6 +154,8 @@ static GOptionEntry options[] = {
"Specify plugins to load", "NAME,..," },
{ "noplugin", 'P', 0, G_OPTION_ARG_STRING, &option_noplugin,
"Specify plugins not to load", "NAME,..." },
+ { "experimental", 'E', 0, G_OPTION_ARG_NONE, &option_experimental,
+ "Enable experimental interfaces" },
{ "nodetach", 'n', G_OPTION_FLAG_REVERSE,
G_OPTION_ARG_NONE, &option_detach,
"Don't run as daemon in background" },
@@ -168,6 +171,7 @@ int main(int argc, char **argv)
DBusConnection *conn;
DBusError error;
guint signal;
+ int gdbus_flags = 0;
#ifdef NEED_THREADS
if (g_thread_supported() == FALSE)
@@ -233,6 +237,11 @@ int main(int argc, char **argv)
g_dbus_set_disconnect_function(conn, system_bus_disconnected,
NULL, NULL);
+ if (option_experimental)
+ gdbus_flags = G_DBUS_FLAG_ENABLE_EXPERIMENTAL;
+
+ g_dbus_set_flags(gdbus_flags);
+
__ofono_dbus_init(conn);
__ofono_modemwatch_init();
--
1.7.11.7
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono