diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2014-04-17 01:47:41 +0100 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2014-04-17 01:52:21 +0100 |
commit | 99c6377fed8b32aa3358238e36300e6e5e924f8d (patch) | |
tree | 0077b81292bb07acdb611ea547d793677d31518b | |
parent | 6ef16e989ca922362c3907e857dce8714b547405 (diff) |
main: Cmdline option to enable network data submission
-rw-r--r-- | src/gclue-main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gclue-main.c b/src/gclue-main.c index 41107f9..3d9bfbf 100644 --- a/src/gclue-main.c +++ b/src/gclue-main.c @@ -27,12 +27,14 @@ #include <stdlib.h> #include "gclue-service-manager.h" +#include "gclue-config.h" #define BUS_NAME "org.freedesktop.GeoClue2" /* Commandline options */ static gboolean version = FALSE; static gint inactivity_timeout = 0; +static gboolean submit_data = FALSE; static GOptionEntry entries[] = { @@ -50,6 +52,13 @@ static GOptionEntry entries[] = &inactivity_timeout, N_("Exit after T seconds of inactivity. Default: 0 (never)"), "T" }, + { "submit-data", + 's', + 0, + G_OPTION_ARG_NONE, + &submit_data, + N_("Enable submission of network data"), + NULL }, { NULL } }; @@ -133,6 +142,7 @@ main (int argc, char **argv) guint owner_id; GError *error = NULL; GOptionContext *context; + GClueConfig *config; setlocale (LC_ALL, ""); @@ -154,6 +164,10 @@ main (int argc, char **argv) exit (0); } + config = gclue_config_get_singleton (); + if (submit_data) + gclue_config_set_wifi_submit_data (config, submit_data); + owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM, BUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, |