Wrap tizen specific codes with TIZEN_EXT 40/131240/2
authorchleun.moon <chleun.moon@samsung.com>
Fri, 26 May 2017 04:09:25 +0000 (13:09 +0900)
committercheoleun moon <chleun.moon@samsung.com>
Tue, 30 May 2017 01:20:23 +0000 (01:20 +0000)
Change-Id: I4f30b15332aef3ceb2f0b601f1a18a170487c1f3
Signed-off-by: cheoleun <chleun.moon@samsung.com>
vpn/plugins/vpn.c
vpn/plugins/vpn.h

index 3e40e4f..b48b6bc 100755 (executable)
@@ -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,
index 6175863..af7e8f8 100755 (executable)
@@ -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,