[geocode-glib] test: Add --count argument for forward geocoding
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] test: Add --count argument for forward geocoding
- Date: Sun, 25 Nov 2012 02:01:37 +0000 (UTC)
commit 685a263990e867ef3c28be75fd188db308d098ef
Author: Bastien Nocera <hadess hadess net>
Date: Sun Nov 25 01:08:03 2012 +0100
test: Add --count argument for forward geocoding
geocode-glib/test-gcglib.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index e4b9893..bcaf462 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -346,7 +346,9 @@ int main (int argc, char **argv)
GError *error = NULL;
GOptionContext *context;
gboolean do_rev_geocoding = FALSE;
+ int answer_count = 10;
const GOptionEntry entries[] = {
+ { "count", 0, 0, G_OPTION_ARG_INT, &answer_count, "Number of answers to get for forward searches", 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 }
@@ -381,6 +383,7 @@ int main (int argc, char **argv)
GeocodeForward *forward;
forward = geocode_forward_new_for_string (params[0]);
+ geocode_forward_set_answer_count (forward, answer_count);
geocode_forward_search_async (forward, NULL, got_geocode_search_cb, NULL);
} else {
GeocodeReverse *reverse;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]