[geocode-glib] test: Add a --reverse option for reverse geocoding
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] test: Add a --reverse option for reverse geocoding
- Date: Wed, 24 Oct 2012 17:07:18 +0000 (UTC)
commit 17748f832c244546d87b4f5871d2a550d3bc3d27
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 24 19:06:47 2012 +0200
test: Add a --reverse option for reverse geocoding
geocode-glib/test-gcglib.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index 716e11d..304b187 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -325,8 +325,10 @@ int main (int argc, char **argv)
GOptionContext *context;
GeocodeObject *object;
gboolean do_search = FALSE;
+ gboolean do_rev_geocoding = FALSE;
const GOptionEntry entries[] = {
{ "search", 0, 0, G_OPTION_ARG_NONE, &do_search, "Whether to search for the given parameters", NULL },
+ { "reverse", 0, 0, G_OPTION_ARG_NONE, &do_rev_geocoding, "Whether to do reverse geocoding for the given parameters", NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, ¶ms, NULL, "[KEY=VALUE...]" },
{ NULL }
};
@@ -363,6 +365,8 @@ int main (int argc, char **argv)
geocode_object_add (object, "location", params[0]);
geocode_object_search_async (object, NULL, got_geocode_search_cb, NULL);
} else {
+ if (do_rev_geocoding)
+ _geocode_object_set_lookup_type (object, GEOCODE_GLIB_RESOLVE_REVERSE);
for (i = 0; params[i] != NULL; i++) {
char **items;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]