Remove dependency to vconf 52/31452/1 tizen_devel
authordavid <david@david-desktop.(none)>
Fri, 5 Dec 2014 01:45:58 +0000 (09:45 +0800)
committerdavid <david@david-desktop.(none)>
Fri, 5 Dec 2014 01:59:38 +0000 (09:59 +0800)
Change-Id: Ifd2ec9376d132d1716a564e654ca2aacf00492ef

CMakeLists.txt
packaging/capi-network-tethering.spec
src/tethering.c
test/tethering_test.c

index 32e6bdbf353183cc5f008c6e52024fc09b8f55a5..dc4ac0367edcc0e0bc1d651bba509b5725efc743 100644 (file)
@@ -9,7 +9,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
-SET(dependents "dlog glib-2.0 capi-base-common vconf connman-lib winet-lib")
+SET(dependents "dlog glib-2.0 capi-base-common connman-lib winet-lib")
 
 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
        SET(CMAKE_BUILD_TYPE "Release")
index 222bfd38461f4f9637fce6546c319dd6afe9956f..b839f1c7acf75227ffc177bd79e8103a0c8d1d10 100644 (file)
@@ -12,7 +12,6 @@ BuildRequires: pkgconfig(capi-base-common)
 BuildRequires: pkgconfig(connman-lib)
 BuildRequires: pkgconfig(winet-lib)
 BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(vconf)
 BuildRequires: cmake
 
 %description
index 31240ed4d66aa5f88ff8d59ba92e5f0ad4e27fe8..da78c17e6f55f36e24ba272c6a6ba0fe5ea43861 100644 (file)
@@ -24,7 +24,7 @@
 #include <arpa/inet.h>
 #include <unistd.h>
 
-#include <vconf.h>
+/*#include <vconf.h>*/
 
 #include "winet-tether.h"
 #include "connman-lib.h"
@@ -1562,24 +1562,36 @@ API int tethering_disable(tethering_h tethering, tethering_type_e type)
  */
 API bool tethering_is_enabled(tethering_h tethering, tethering_type_e type)
 {
-       int is_on = 0;
+/*     int is_on = 0;
        int vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_NONE;
 
        if (vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &is_on) != 0) {
                return FALSE;
        }
+*/
+       bool is_on = false;
+       struct connman_technology *technology;
 
        switch (type) {
        case TETHERING_TYPE_USB:
-               vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_USB;
+               /*vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_USB;*/
+               technology = connman_get_technology(TECH_TYPE_GADGET);
+               if (technology != NULL)
+                       is_on = connman_get_technology_tethering(technology);
                break;
 
        case TETHERING_TYPE_WIFI:
-               vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI;
+               /*vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI;*/
+               technology = connman_get_technology(TECH_TYPE_WIFI);
+               if (technology != NULL)
+                       is_on = connman_get_technology_tethering(technology);
                break;
 
        case TETHERING_TYPE_BT:
-               vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_BT;
+               /*vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_BT;*/
+               technology = connman_get_technology(TECH_TYPE_BLUETOOTH);
+               if (technology != NULL)
+                       is_on = connman_get_technology_tethering(technology);
                break;
 
        default:
@@ -1587,7 +1599,7 @@ API bool tethering_is_enabled(tethering_h tethering, tethering_type_e type)
                break;
        }
 
-       return is_on & vconf_type ? true : false;
+       return is_on;
 }
 
 /**
index d4d1181918d7a9c7341e815916982ca307fc2aea..f11faa2a763e3aeb64f95a746046cfc37e066644 100644 (file)
@@ -24,8 +24,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include <vconf.h>
-
 #include "tethering.h"
 
 #define INPUT_BUF_LEN          128