GeofenceManagerData *geofence_manager = (GeofenceManagerData *)handle;
g_return_val_if_fail(geofence_manager, GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER);
int new_fence_id = -1;
- int error_code = GEOFENCE_MANAGER_ERROR_NONE;
- new_fence_id = geo_client_add_geofence(geofence_manager->geofence_client, geofence_manager->app_id, place_id, GEOFENCE_TYPE_GEOPOINT, latitude, longitude, radius, address, "", "", &error_code);
+ new_fence_id = geo_client_add_geofence(geofence_manager->geofence_client, geofence_manager->app_id, place_id, GEOFENCE_TYPE_GEOPOINT, latitude, longitude, radius, address, "", "");
*fence_id = new_fence_id;
- if (error_code != GEOFENCE_MANAGER_ERROR_NONE)
- return error_code;
- else if (new_fence_id == -1)
+ if (new_fence_id == -1)
return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return GEOFENCE_MANAGER_ERROR_NONE;
GeofenceManagerData *geofence_manager = (GeofenceManagerData *)handle;
g_return_val_if_fail(geofence_manager, GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER);
int new_fence_id = -1;
- int error_code = GEOFENCE_MANAGER_ERROR_NONE;
- new_fence_id = geo_client_add_geofence(geofence_manager->geofence_client, geofence_manager->app_id, place_id, type, -1, -1, -1, "", bssid, ssid, &error_code);
+ new_fence_id = geo_client_add_geofence(geofence_manager->geofence_client, geofence_manager->app_id, place_id, type, -1, -1, -1, "", bssid, ssid);
*fence_id = new_fence_id;
- if (error_code != GEOFENCE_MANAGER_ERROR_NONE)
- return error_code;
- else if (new_fence_id == -1)
+ if (new_fence_id == -1)
return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return GEOFENCE_MANAGER_ERROR_NONE;
GeofenceManagerData *geofence_manager = (GeofenceManagerData *)handle;
g_return_val_if_fail(geofence_manager, GEOFENCE_MANAGER_ERROR_INVALID_PARAMETER);
int new_place_id = -1;
- int error_code = GEOFENCE_MANAGER_ERROR_NONE;
- new_place_id = geo_client_add_place(geofence_manager->geofence_client, geofence_manager->app_id, place_name, &error_code);
+ new_place_id = geo_client_add_place(geofence_manager->geofence_client, geofence_manager->app_id, place_name);
*place_id = new_place_id;
- if (error_code != GEOFENCE_MANAGER_ERROR_NONE)
- return error_code;
- else if (new_place_id == -1)
+ if (new_place_id == -1)
return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return GEOFENCE_MANAGER_ERROR_NONE;
int ret = geo_client_update_place(geofence_manager->geofence_client, geofence_manager->app_id, place_id, place_name);
if (ret != GEOFENCE_CLIENT_ERROR_NONE)
- return ret;
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return GEOFENCE_MANAGER_ERROR_NONE;
}
int ret = geo_client_delete_geofence(geofence_manager->geofence_client, geofence_manager->app_id, fence_id);
if (ret != GEOFENCE_CLIENT_ERROR_NONE)
- return ret;
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return GEOFENCE_MANAGER_ERROR_NONE;
}
int ret = geo_client_delete_place(geofence_manager->geofence_client, geofence_manager->app_id, place_id);
if (ret != GEOFENCE_CLIENT_ERROR_NONE)
- return ret;
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return GEOFENCE_MANAGER_ERROR_NONE;
}
int error_code = GEOFENCE_MANAGER_ERROR_NONE;
int ret = geo_client_get_place_name(geofence_manager->geofence_client, geofence_manager->app_id, place_id, place_name, &error_code);
if (ret != GEOFENCE_CLIENT_ERROR_NONE)
- return ret;
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
return error_code;
}
int error_code = GEOFENCE_MANAGER_ERROR_NONE;
int ret = geo_client_get_geofences(geofence_manager->geofence_client, geofence_manager->app_id, place_id, &iter, &fence_cnt, &error_code);
- if (ret != GEOFENCE_MANAGER_ERROR_NONE)
- return ret;
- else if (error_code != GEOFENCE_MANAGER_ERROR_NONE)
+ if (error_code != GEOFENCE_MANAGER_ERROR_NONE)
return error_code;
+ else if (ret != GEOFENCE_MANAGER_ERROR_NONE)
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
*fence_amount = fence_cnt;
MOD_LOGD("Total fence count : %d", *fence_amount);
gchar *key;
GVariant *value;
int place_cnt = 0;
- int error_code = GEOFENCE_MANAGER_ERROR_NONE;
+ int error_code = -1;
/*Call the geofence_client api here....*/
- int ret = geo_client_get_places(geofence_manager->geofence_client, geofence_manager->app_id, &iter, &place_cnt, &error_code);
- if (ret != GEOFENCE_MANAGER_ERROR_NONE)
- return ret;
+ geo_client_get_places(geofence_manager->geofence_client, geofence_manager->app_id, &iter, &place_cnt, &error_code);
if (error_code != GEOFENCE_MANAGER_ERROR_NONE)
return error_code;
ret = geo_client_start_geofence(geofence_manager->geofence_client, geofence_manager->app_id, fence_id);
if (ret != GEOFENCE_MANAGER_ERROR_NONE) {
MOD_LOGE("Fail to start geofence_client_h. Error[%d]", ret);
- return ret;
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
}
return GEOFENCE_MANAGER_ERROR_NONE;
ret = geo_client_stop_geofence(geofence_manager->geofence_client, geofence_manager->app_id, fence_id);
if (ret != GEOFENCE_MANAGER_ERROR_NONE) {
MOD_LOGE("Fail to stop. Error[%d]", ret);
- return ret;
+ return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
}
return GEOFENCE_MANAGER_ERROR_NONE;