Directory path migration 81/61481/2 accepted/tizen/common/20160308.143448 accepted/tizen/ivi/20160309.005156 accepted/tizen/mobile/20160309.005101 accepted/tizen/tv/20160309.005120 accepted/tizen/wearable/20160309.005135 submit/tizen/20160308.081225
authorkj7.sung <kj7.sung@samsung.com>
Tue, 8 Mar 2016 07:25:38 +0000 (16:25 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Tue, 8 Mar 2016 07:30:50 +0000 (16:30 +0900)
Change-Id: I350b02f4087e5d5413a36f3cd3f0bb79b9756436
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
CMakeLists.txt
location/manager/location-batch.c
packaging/liblbs-location.spec
tests/location-api-test.c
tests/map-service-test.c

index 2131fcb..9a8d019 100755 (executable)
@@ -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}")
index d4829d0..717a5f7 100755 (executable)
 
 #define MAX_BATCH_ITEM         8
 #define BATCH_SENTENCE_SIZE    256
-#define BATCH_LOG                      "/opt/usr/media/lbs-server/location_batch.log"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
+#include <tzplatform_config.h>
 #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;
index 266eb46..a81f187 100755 (executable)
@@ -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
index 60b62de..14bd64d 100644 (file)
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <glib/gprintf.h>
+#include <tzplatform_config.h>
 #include <location.h>
 #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();
index 8aa8110..fe8c5e2 100644 (file)
@@ -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);