summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--src/geocoder.c24
2 files changed, 18 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index 35b57b5..20bf21e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+capi-location-geocoder (0.1.0-9) unstable; urgency=low
+
+ * Use 'static' to local function which is limited to the current source file.
+
+ -- Kangho Hur <kangho.hur@samsung.com> Tue, 21 Feb 2012 10:21:01 +0900
+
capi-location-geocoder (0.1.0-8) unstable; urgency=low
* Apply the SOVERSION
diff --git a/src/geocoder.c b/src/geocoder.c
index 9dafadf..95b43c5 100644
--- a/src/geocoder.c
+++ b/src/geocoder.c
@@ -39,7 +39,7 @@
* Internal Implementation
*/
-int _convert_error_code(int code, char* func_name)
+static int __convert_error_code(int code, char* func_name)
{
int ret;
char* msg = "GEOCODER_ERROR_NONE";
@@ -70,14 +70,14 @@ int _convert_error_code(int code, char* func_name)
return ret;
}
-static void cb_address_from_position (LocationError error, LocationAddress *addr, LocationAccuracy *acc, gpointer userdata)
+static void __cb_address_from_position (LocationError error, LocationAddress *addr, LocationAccuracy *acc, gpointer userdata)
{
geocoder_s * handle = (geocoder_s*)userdata;
if(handle->user_cb[_GEOCODER_CB_ADDRESS_FROM_POSITION])
{
if(error != LOCATION_ERROR_NONE || addr == NULL)
{
- _convert_error_code(error,(char*)__FUNCTION__);
+ __convert_error_code(error,(char*)__FUNCTION__);
((geocoder_get_address_cb)handle->user_cb[_GEOCODER_CB_ADDRESS_FROM_POSITION])(NULL, NULL, NULL, NULL, NULL, NULL, NULL, handle->user_data[_GEOCODER_CB_ADDRESS_FROM_POSITION]);
}
else
@@ -92,14 +92,14 @@ static void cb_address_from_position (LocationError error, LocationAddress *addr
}
}
-static void cb_position_from_address (LocationError error, GList *position_list, GList *accuracy_list, gpointer userdata)
+static void __cb_position_from_address (LocationError error, GList *position_list, GList *accuracy_list, gpointer userdata)
{
geocoder_s * handle = (geocoder_s*)userdata;
if(handle->user_cb[_GEOCODER_CB_POSITION_FROM_ADDRESS])
{
if(error != LOCATION_ERROR_NONE || position_list == NULL || position_list->data ==NULL || accuracy_list==NULL )
{
- _convert_error_code(error,(char*)__FUNCTION__);
+ __convert_error_code(error,(char*)__FUNCTION__);
}
else
{
@@ -162,7 +162,7 @@ int geocoder_destroy(geocoder_h geocoder)
int ret = location_free(handle->object);
if(ret!=GEOCODER_ERROR_NONE)
{
- return _convert_error_code(ret,(char*)__FUNCTION__);
+ return __convert_error_code(ret,(char*)__FUNCTION__);
}
free(handle);
return GEOCODER_ERROR_NONE;
@@ -183,10 +183,10 @@ int geocoder_get_address_from_position(geocoder_h geocoder, double latitude, dou
handle->user_cb[_GEOCODER_CB_ADDRESS_FROM_POSITION] = callback;
handle->user_data[_GEOCODER_CB_ADDRESS_FROM_POSITION] = user_data;
- ret = location_get_address_from_position_async(handle->object, pos, cb_address_from_position, handle);
+ ret = location_get_address_from_position_async(handle->object, pos, __cb_address_from_position, handle);
if( ret != LOCATION_ERROR_NONE)
{
- return _convert_error_code(ret,(char*)__FUNCTION__);
+ return __convert_error_code(ret,(char*)__FUNCTION__);
}
location_position_free(pos);
return GEOCODER_ERROR_NONE;
@@ -208,7 +208,7 @@ int geocoder_get_address_from_position_sync(geocoder_h geocoder, double latitude
ret = location_get_address_from_position(handle->object, pos, &addr, &acc);
if( ret != LOCATION_ERROR_NONE)
{
- return _convert_error_code(ret,(char*)__FUNCTION__);
+ return __convert_error_code(ret,(char*)__FUNCTION__);
}
if(building_number)
@@ -280,11 +280,11 @@ int geocoder_foreach_positions_from_address(geocoder_h geocoder,const char* add
handle->user_data[_GEOCODER_CB_POSITION_FROM_ADDRESS] = user_data;
int ret;
- ret = location_get_position_from_freeformed_address_async(handle->object, addr_str,cb_position_from_address, handle);
+ ret = location_get_position_from_freeformed_address_async(handle->object, addr_str,__cb_position_from_address, handle);
if( ret != LOCATION_ERROR_NONE)
{
g_free(addr_str);
- return _convert_error_code(ret,(char*)__FUNCTION__);
+ return __convert_error_code(ret,(char*)__FUNCTION__);
}
return GEOCODER_ERROR_NONE;
}
@@ -307,7 +307,7 @@ int geocoder_foreach_positions_from_address_sync(geocoder_h geocoder,const char
if( ret != LOCATION_ERROR_NONE)
{
g_free(addr_str);
- return _convert_error_code(ret,(char*)__FUNCTION__);
+ return __convert_error_code(ret,(char*)__FUNCTION__);
}
while(pos_list)