From d2a3551d764736fedb250b0f1438cdf4fa50f4cf Mon Sep 17 00:00:00 2001 From: "kj7.sung" Date: Tue, 8 Mar 2016 16:25:38 +0900 Subject: [PATCH] Directory path migration Change-Id: I350b02f4087e5d5413a36f3cd3f0bb79b9756436 Signed-off-by: kj7.sung --- CMakeLists.txt | 2 +- location/manager/location-batch.c | 5 +++-- packaging/liblbs-location.spec | 1 + tests/location-api-test.c | 6 +++--- tests/map-service-test.c | 2 -- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2131fcb..9a8d019 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ ENDIF(FEATURE_PROFILE_TV) pkg_check_modules(pkgs REQUIRED glib-2.0 gthread-2.0 gobject-2.0 gmodule-2.0 capi-appfw-app-manager capi-appfw-package-manager pkgmgr-info - dlog vconf json-glib-1.0 bundle eventsystem ${PRIVACY_PKG}) + dlog vconf json-glib-1.0 bundle eventsystem libtzplatform-config ${PRIVACY_PKG}) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/location/manager/location-batch.c b/location/manager/location-batch.c index d4829d0..717a5f7 100755 --- a/location/manager/location-batch.c +++ b/location/manager/location-batch.c @@ -25,11 +25,11 @@ #define MAX_BATCH_ITEM 8 #define BATCH_SENTENCE_SIZE 256 -#define BATCH_LOG "/opt/usr/media/lbs-server/location_batch.log" #include #include #include +#include #include "location-batch.h" #include "location-log.h" @@ -102,7 +102,8 @@ location_get_batch_file(int num_of_location) LocationBatch *batch = location_batch_new(num_of_location); batch->num_of_location = num_of_location; - FILE *fd = fopen(BATCH_LOG, "r"); + const char *batch_path = tzplatform_mkpath(TZ_USER_CONTENT, "lbs-server/location_batch.log"); + FILE *fd = fopen(batch_path, "r"); if (fd != NULL) { char buf[BATCH_SENTENCE_SIZE] = { 0, }; int i = 0; diff --git a/packaging/liblbs-location.spec b/packaging/liblbs-location.spec index 266eb46..a81f187 100755 --- a/packaging/liblbs-location.spec +++ b/packaging/liblbs-location.spec @@ -22,6 +22,7 @@ BuildRequires: pkgconfig(privacy-manager-client) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(bundle) BuildRequires: pkgconfig(eventsystem) +BuildRequires: pkgconfig(libtzplatform-config) %description Location Based Service Library diff --git a/tests/location-api-test.c b/tests/location-api-test.c index 60b62de..14bd64d 100644 --- a/tests/location-api-test.c +++ b/tests/location-api-test.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "location-api-test-util.h" @@ -30,8 +31,6 @@ LocationObject *location_obj = NULL; static GMainLoop *g_mainloop = NULL; -#define LOCATION_API_TEST_JSON_FILE "/opt/data/location-api-test.json" - static gpointer GmainThread(gpointer data) { g_mainloop = g_main_loop_new(NULL, FALSE); @@ -432,7 +431,8 @@ int main(int argc, char **argv) return 0; } - json_util_init(LOCATION_API_TEST_JSON_FILE); + const char *json_path = tzplatform_mkpath(TZ_SYS_DATA, "location-api-test.json"); + json_util_init(json_path); g_printf("--- Start LBS Test App ---\n"); while (1) { print_menu(); diff --git a/tests/map-service-test.c b/tests/map-service-test.c index 8aa8110..fe8c5e2 100644 --- a/tests/map-service-test.c +++ b/tests/map-service-test.c @@ -31,8 +31,6 @@ LocationMapObject *map_obj = NULL; static GMainLoop *g_mainloop = NULL; -#define LOCATION_API_TEST_JSON_FILE "/opt/data/location-api-test.json" - static gpointer GmainThread(gpointer data) { g_mainloop = g_main_loop_new(NULL, FALSE); -- 2.7.4