summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xvpn/plugins/vpn.c4
-rwxr-xr-xvpn/plugins/vpn.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
index 3e40e4f..b48b6bc 100755
--- a/vpn/plugins/vpn.c
+++ b/vpn/plugins/vpn.c
@@ -307,6 +307,7 @@ static DBusMessage *vpn_notify(struct connman_task *task,
return NULL;
}
+#if defined TIZEN_EXT
static void vpn_event(struct vpn_provider *provider, int state)
{
struct vpn_data *data;
@@ -399,6 +400,7 @@ static void vpn_event(struct vpn_provider *provider, int state)
return;
}
+#endif
static int vpn_create_tun(struct vpn_provider *provider)
{
@@ -548,8 +550,10 @@ static int vpn_connect(struct vpn_provider *provider,
}
+#if defined TIZEN_EXT
if(vpn_driver_data->vpn_driver->set_event_cb)
vpn_driver_data->vpn_driver->set_event_cb(vpn_event, provider);
+#endif
ret = vpn_driver_data->vpn_driver->connect(provider, data->task,
data->if_name, cb, dbus_sender,
diff --git a/vpn/plugins/vpn.h b/vpn/plugins/vpn.h
index 6175863..af7e8f8 100755
--- a/vpn/plugins/vpn.h
+++ b/vpn/plugins/vpn.h
@@ -40,12 +40,16 @@ enum vpn_state {
VPN_STATE_AUTH_FAILURE = 6,
};
+#if defined TIZEN_EXT
typedef void (*vpn_event_callback)(struct vpn_provider *provider, int state);
+#endif
struct vpn_driver {
int flags;
int (*notify) (DBusMessage *msg, struct vpn_provider *provider);
+#if defined TIZEN_EXT
void (*set_event_cb) (vpn_event_callback event_cb, struct vpn_provider *provider);
+#endif
int (*connect) (struct vpn_provider *provider,
struct connman_task *task, const char *if_name,
vpn_provider_connect_cb_t cb, const char *dbus_sender,