disable extra location data 10/66410/4
authorJongkyu Koo <jk.koo@samsung.com>
Mon, 18 Apr 2016 23:46:44 +0000 (08:46 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Tue, 19 Apr 2016 00:03:13 +0000 (09:03 +0900)
Change-Id: I08161c4de78f760011cd5a476c2b8386ece8fb1d
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
daemon/CMakeLists.txt
daemon/phnd-dbus.c
packaging/phonenumber-utils.spec

index b4cdcbe8bffde27a23c81e36f604effdfb197c10..ef28cf21ebb5edc41c50dcf02018deadc6655111 100644 (file)
@@ -1,7 +1,24 @@
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common)
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
 
-FILE(GLOB DAEMON_SRCS *.c *.cpp)
+IF(ENABLE_LOG_FEATURE)
+       ADD_DEFINITIONS("-DENABLE_EXTRA_LOCATION_DATA")
+ENDIF(ENABLE_LOG_FEATURE)
+
+SET(DAEMON_SRCS
+       phnd.c
+       phnd-dbus.c
+       phnd-region-data.c
+       phnd-utils.c
+       phnd-libphonenumber.cpp
+)
+
+IF(ENABLE_EXTRA_LOCATION_DATA)
+SET(DAEMON_SRCS ${DAEMON_SRCS}
+       phnd-location.c
+)
+ENDIF(ENABLE_EXTRA_LOCATION_DATA)
+
 SET(DAEMON_SRCS ${DAEMON_SRCS} ${CMAKE_SOURCE_DIR}/common/phn-dbus.c)
 
 SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/common/phn-dbus.c
index ea0a8d5204ca188724af9cde3f6c3343a58642d2..930e54728a6769d512ab073dba62b02560debfa2 100644 (file)
@@ -22,7 +22,9 @@
 #include "phnd.h"
 #include "phnd-utils.h"
 #include "phnd-libphonenumber.h"
+#ifdef ENABLE_EXTRA_LOCATION_DATA
 #include "phnd-location.h"
+#endif
 #include "phnd-region-data.h"
 
 static inline int _dbus_get_location_handler(const char *number,
@@ -31,7 +33,9 @@ static inline int _dbus_get_location_handler(const char *number,
        int ret;
        char *lang_str = NULL;
        char *region_str = NULL;
+#ifdef ENABLE_EXTRA_LOCATION_DATA
        char *location_file = NULL;
+#endif
 
        ret = phn_region_data_get_region_str(region, &region_str);
        if (PHONE_NUMBER_ERROR_NONE != ret) {
@@ -46,6 +50,7 @@ static inline int _dbus_get_location_handler(const char *number,
                return ret;
        }
 
+#ifdef ENABLE_EXTRA_LOCATION_DATA
        ret = phn_location_find_extra_data(region_str, &location_file);
        if (PHONE_NUMBER_ERROR_NONE == ret) {
                ret = phn_location_get_location_from_extra_data(location_file, number, region_str,
@@ -58,6 +63,7 @@ static inline int _dbus_get_location_handler(const char *number,
                        return PHONE_NUMBER_ERROR_NONE;
                }
        }
+#endif
 
        bool exist = phn_region_data_find_match_info(region, lang);
        if (false == exist) {
index 4f34e8fa4f844c4bff8b5454f195041c3e56b601..8dd082ffe1221b610eefb6648a3fb16fe72f6149 100644 (file)
@@ -1,6 +1,6 @@
 Name:       phonenumber-utils
 Summary:    Phone Number Utilities
-Version:    0.2.1
+Version:    0.2.2
 Release:    0
 Group:      Telephony/Utilities
 License:    Apache-2.0