Commit 99c6377f authored by Zeeshan Ali's avatar Zeeshan Ali

main: Cmdline option to enable network data submission

parent 6ef16e98
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment