summaryrefslogtreecommitdiff
path: root/plugins/vpn.h
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-10-22 13:55:53 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-22 23:55:28 +0200
commit8b49f33573921c27511cb60f7384a48ac3aaa7d4 (patch)
tree58ac22462ca08c48a55588420047a29711011e2d /plugins/vpn.h
parent520d4af146ba1be4b7d76890799342dfe12e5fc7 (diff)
downloadconnman-8b49f33573921c27511cb60f7384a48ac3aaa7d4.tar.gz
connman-8b49f33573921c27511cb60f7384a48ac3aaa7d4.tar.bz2
connman-8b49f33573921c27511cb60f7384a48ac3aaa7d4.zip
Split openconnect into generic vpn and openconnect part
Diffstat (limited to 'plugins/vpn.h')
-rw-r--r--plugins/vpn.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/vpn.h b/plugins/vpn.h
new file mode 100644
index 00000000..7f10150a
--- /dev/null
+++ b/plugins/vpn.h
@@ -0,0 +1,41 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2010 BMW Car IT GmbH. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+enum vpn_state {
+ VPN_STATE_UNKNOWN = 0,
+ VPN_STATE_IDLE = 1,
+ VPN_STATE_CONNECT = 2,
+ VPN_STATE_READY = 3,
+ VPN_STATE_DISCONNECT = 4,
+ VPN_STATE_FAILURE = 5,
+};
+
+struct vpn_driver {
+ 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 vpn_register(const char *name, struct vpn_driver *driver,
+ const char *program);
+void vpn_unregister(const char *provider_name);
+void vpn_died();