device: Combine two if statements with identical outcome
[framework/connectivity/connman.git] / plugins / vpn.h
index b2afff5..1ecfba2 100644 (file)
@@ -19,6 +19,8 @@
  *
  */
 
+#define VPN_FLAG_NO_TUN        1
+
 enum vpn_state {
        VPN_STATE_UNKNOWN       = 0,
        VPN_STATE_IDLE          = 1,
@@ -26,16 +28,21 @@ enum vpn_state {
        VPN_STATE_READY         = 3,
        VPN_STATE_DISCONNECT    = 4,
        VPN_STATE_FAILURE       = 5,
+       VPN_STATE_AUTH_FAILURE  = 6,
 };
 
 struct vpn_driver {
+       int flags;
        int (*notify) (DBusMessage *msg, struct connman_provider *provider);
        int (*connect) (struct connman_provider *provider,
                        struct connman_task *task, const char *if_name);
        void (*disconnect) (void);
+       int (*error_code) (int exit_code);
+       int (*save) (struct connman_provider *provider, GKeyFile *keyfile);
 };
 
 int vpn_register(const char *name, struct vpn_driver *driver,
                        const char *program);
 void vpn_unregister(const char *provider_name);
-void vpn_died(struct connman_task *task, void *user_data);
+void vpn_died(struct connman_task *task, int exit_code, void *user_data);
+int vpn_set_ifname(struct connman_provider *provider, const char *ifname);