diff options
author | Genie Kim <daejins.kim@samsung.com> | 2013-05-09 23:17:13 +0900 |
---|---|---|
committer | Genie Kim <daejins.kim@samsung.com> | 2013-05-09 23:24:54 +0900 |
commit | c185ca2a93846452978cf9dd3ff2a35847b8b0d4 (patch) | |
tree | 62cb25de43a219332b5c5fffba8d23ab136674c7 /test/geocoder_test.c | |
parent | 8ce8597f3f6a930c319cdbe81c670b24f53f581d (diff) | |
download | geocoder-c185ca2a93846452978cf9dd3ff2a35847b8b0d4.tar.gz geocoder-c185ca2a93846452978cf9dd3ff2a35847b8b0d4.tar.bz2 geocoder-c185ca2a93846452978cf9dd3ff2a35847b8b0d4.zip |
sync PRIVATE and RSA for tizen2.1submit/tizen_2.2/20130714.143824submit/tizen_2.2/20130714.135117submit/tizen_2.1/20130514.0519282.2_releasetizen_2.1
Change-Id: I22dd75823fc979a2f807cb3b31c5ac2ec1c2645c
Diffstat (limited to 'test/geocoder_test.c')
-rwxr-xr-x | test/geocoder_test.c | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/test/geocoder_test.c b/test/geocoder_test.c index 12c21a6..5f73854 100755 --- a/test/geocoder_test.c +++ b/test/geocoder_test.c @@ -1,24 +1,24 @@ /* -* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <glib.h> -#include <geocoder.h> +#include <geocoder.h> geocoder_h geocoder; @@ -36,13 +36,12 @@ static bool get_pos_cb(geocoder_error_e result, double latitude, double longitu int geocoder_test() { int ret; - if (geocoder ==NULL) + geocoder_preference_h pref; + int maxcnt; + ret = geocoder_create(&geocoder); + if (ret != GEOCODER_ERROR_NONE || geocoder == NULL) { - ret = geocoder_create(&geocoder); - if(ret != GEOCODER_ERROR_NONE) - { - printf ("geocoder_create return error : %d=n", ret); - } + printf ("geocoder_create return error : %d\n", ret); } ret = geocoder_get_address_from_position(geocoder,37.258,127.056,get_addr_cb, NULL); @@ -50,6 +49,12 @@ int geocoder_test() { printf ("geocoder_get_address_from_position return error : %d\n", ret); } + geocoder_preference_create(&pref); + geocoder_preference_set_max_result(pref, 3); + geocoder_preference_get_max_result(pref, &maxcnt); + printf ("max cnt value set %d \n",maxcnt); + geocoder_service_set_preference(geocoder, pref); + geocoder_preference_destroy(pref); return 1; } |