Fixed feature check 49/83949/1 accepted/tizen/common/20160818.144049 accepted/tizen/ivi/20160818.231620 accepted/tizen/mobile/20160818.231603 accepted/tizen/tv/20160818.231612 accepted/tizen/wearable/20160818.231554 submit/tizen/20160818.002458
authorchleun.moon <chleun.moon@samsung.com>
Tue, 16 Aug 2016 02:56:29 +0000 (11:56 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Tue, 16 Aug 2016 02:57:06 +0000 (11:57 +0900)
Change-Id: Ic86022a323e6ff507c1eea11036724a53e0827f9
Signed-off-by: cheoleun <chleun.moon@samsung.com>
CMakeLists.txt
packaging/capi-network-nsd.spec
src/dns-sd/dns-sd-util.h
src/ssdp/ssdp-util.h

index 54adba6..322ebe5 100644 (file)
@@ -26,7 +26,7 @@ INCLUDE(FindPkgConfig)
 
 ########################## search for packages ################################
 
-SET(COMMON_DEPS "dlog glib-2.0 gio-2.0 capi-base-common gio-unix-2.0 gssdp-1.0 dns_sd")
+SET(COMMON_DEPS "dlog glib-2.0 gio-2.0 capi-base-common capi-system-info gio-unix-2.0 gssdp-1.0 dns_sd")
 SET(PC_DEPS "capi-base-common")
 
 
index b4adcce..fa24bf7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-network-nsd
 Summary:    A Network Service Discovery libraries in Native API
-Version:    0.0.5
+Version:    0.0.6
 Release:    1
 Group:      System/Network
 License:    Apache-2.0
@@ -11,6 +11,7 @@ Source1003:    libnsd-ssdp.manifest
 Source1004:    nsd-tests.manifest
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dns_sd)
index 7b330cc..93c4872 100644 (file)
@@ -20,6 +20,7 @@
 #include <dlog.h>
 #include <dns_sd.h>
 #include <dns-sd.h>
+#include <system_info.h>
 
 #undef LOG_TAG
 #define LOG_TAG "CAPI_NETWORK_DNSSD"
@@ -34,7 +35,6 @@
 
 #define NETWORK_SERVICE_DISCOVERY_FEATURE "http://tizen.org/feature/network.service_discovery.dnssd"
 
-#if 0
 #define CHECK_FEATURE_SUPPORTED(feature_name)\
        do {\
                bool feature_supported = FALSE;\
                } \
        } while (0)
 
-#else
-#define CHECK_FEATURE_SUPPORTED(feature_name)
-#endif
-
 #define IPV4_LEN 4
 #define IPV6_LEN 16
 
index b0d1fd7..967df10 100644 (file)
@@ -20,6 +20,7 @@
 #define USE_DLOG
 #ifdef USE_DLOG
 #include <dlog.h>
+#include <system_info.h>
 
 #undef LOG_TAG
 #define LOG_TAG "CAPI_NETWORK_SSDP"
 
 #endif /* USE_DLOG */
 
-#define NETWORK_SERVICE_DISCOVERY_FEATURE "http://tizen.org/feature/network.service_discovery"
+#define NETWORK_SERVICE_DISCOVERY_FEATURE "http://tizen.org/feature/network.service_discovery.ssdp"
 
-#if 0
 #define CHECK_FEATURE_SUPPORTED(feature_name)\
        do {\
                bool feature_supported = FALSE;\
                if (!system_info_get_platform_bool(feature_name, &feature_supported)) {\
                        if (feature_supported == FALSE) {\
                                LOGE("%s feature is disabled", feature_name);\
-                               return NSD_ERROR_NOT_SUPPORTED;\
+                               return SSDP_ERROR_NOT_SUPPORTED;\
                        } \
                } else {\
                        LOGE("Error - Feature getting from System Info");\
-                       return NSD_ERROR_OPERATION_FAILED;\
+                       return SSDP_ERROR_OPERATION_FAILED;\
                } \
        } while (0)
 
-#else
-#define CHECK_FEATURE_SUPPORTED(feature_name)
-#endif
-
 #define GLIST_ITER_START(arg_list, elem) \
                GList *temp = NULL; \
                temp = g_list_first(arg_list); \