SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
-SET(dependents "dlog glib-2.0 capi-base-common vconf connman-lib")
+SET(dependents "dlog glib-2.0 capi-base-common vconf connman-lib winet-lib")
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(connman-lib)
+BuildRequires: pkgconfig(winet-lib)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(vconf)
BuildRequires: cmake
#include <vconf.h>
+#include "winet-tether.h"
#include "connman-lib.h"
#include "connman-manager.h"
#include "connman-technology.h"
return;
}
+
+static void get_winet_tethering_data_usage(tethering_h tethering)
+{
+ unsigned long long rx_bytes, tx_bytes;
+
+ __tethering_h *th = (__tethering_h *)tethering;
+
+ if (th->data_usage_cb == NULL) {
+ ERR("There is no data_usage_cb\n");
+ return;
+ }
+
+ winet_tether_get_data_usages(&tx_bytes, &rx_bytes);
+
+ th->data_usage_cb(TETHERING_ERROR_NONE,
+ rx_bytes, tx_bytes, th->data_usage_user_data);
+
+ th->data_usage_cb = NULL;
+ th->data_usage_user_data = NULL;
+
+ return;
+}
+
/*
static void __cfm_cb(DBusGProxy *remoteobj, guint event, guint info,
GError *g_error, gpointer user_data)
if (connman_lib_init() != CONNMAN_LIB_ERR_NONE)
return TETHERING_ERROR_OPERATION_FAILED;
+ winet_tether_init();
+
connman_set_technology_added_cb(__handle_technology_added, th);
return TETHERING_ERROR_NONE;
/* org_tizen_tethering_get_data_packet_usage_async(proxy,
__get_data_usage_cb, (gpointer)th);
*/
+ get_winet_tethering_data_usage(tethering);
+
return TETHERING_ERROR_NONE;
}