X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fnmea-sample.c;h=2cc80d224cf42d27828fc001804456d62e83e06f;hb=698752fdb94b29517d5f124109623069fe04a1f3;hp=53aaf254f288589a1554c785b93b78b62c2b2b9f;hpb=aac0b08335800d6ed0db99b002ec8fa4b15fe1d2;p=framework%2Flocation%2Flibslp-location.git diff --git a/tests/nmea-sample.c b/tests/nmea-sample.c index 53aaf25..2cc80d2 100644 --- a/tests/nmea-sample.c +++ b/tests/nmea-sample.c @@ -23,22 +23,22 @@ #include static GMainLoop *loop = NULL; -GSource* nmea_src = NULL; +GSource *nmea_src = NULL; static gboolean -exit_program (gpointer data) +exit_program(gpointer data) { - g_main_loop_quit (loop); - g_debug ("Quit g_main_loop"); + g_main_loop_quit(loop); + g_debug("Quit g_main_loop"); return FALSE; } static void -cb_service_updated (GObject *self, - guint type, - gpointer data, - gpointer accuracy, - gpointer userdata) +cb_service_updated(GObject *self, + guint type, + gpointer data, + gpointer accuracy, + gpointer userdata) { g_debug("cb_service_updated: type(%d) userdata(0x%x)", type, (unsigned int)userdata); @@ -51,50 +51,50 @@ cb_service_updated (GObject *self, } static void -cb_service_enabled (GObject *self, - guint status, - gpointer userdata) +cb_service_enabled(GObject *self, + guint status, + gpointer userdata) { g_debug("cb_service_enabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata); } static void -cb_service_disabled (GObject *self, - guint status, - gpointer userdata) +cb_service_disabled(GObject *self, + guint status, + gpointer userdata) { g_debug("cb_service_disabled: status(%d) userdata(0x%x)", status, (unsigned int)userdata); } int -main (int argc, char *argv[]) +main(int argc, char *argv[]) { LocationObject *loc = NULL; - location_init (); + location_init(); - loop = g_main_loop_new (NULL, TRUE); + loop = g_main_loop_new(NULL, TRUE); - loc = location_new (LOCATION_METHOD_GPS); + loc = location_new(LOCATION_METHOD_GPS); if (!loc) { g_debug("location_new failed"); return -1; } - g_signal_connect (loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc); - g_signal_connect (loc, "service-disabled", G_CALLBACK(cb_service_disabled), loc); - g_signal_connect (loc, "service-updated", G_CALLBACK(cb_service_updated), loc); + g_signal_connect(loc, "service-enabled", G_CALLBACK(cb_service_enabled), loc); + g_signal_connect(loc, "service-disabled", G_CALLBACK(cb_service_disabled), loc); + g_signal_connect(loc, "service-updated", G_CALLBACK(cb_service_updated), loc); - if( LOCATION_ERROR_NONE != location_start (loc) ){ + if (LOCATION_ERROR_NONE != location_start(loc)) { g_debug("location_start failed"); return -1; } g_timeout_add_seconds(60, exit_program, NULL); - g_main_loop_run (loop); + g_main_loop_run(loop); - location_stop (loc); - location_free (loc); + location_stop(loc); + location_free(loc); return 0; }