aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontends/maemo
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2010-06-04 13:48:58 +0200
committerTobias Brunner <tobias@strongswan.org>2010-10-14 17:36:16 +0200
commitd50670d50ee5f5eecb290d2b5746309afc4cfdd3 (patch)
tree8c7e39d32fcb64682c0918558e822024a42e1638 /src/frontends/maemo
parent0261b12419ee24d6562e3f0e81a103ce190564c5 (diff)
downloadstrongswan-d50670d50ee5f5eecb290d2b5746309afc4cfdd3.tar.bz2
strongswan-d50670d50ee5f5eecb290d2b5746309afc4cfdd3.tar.xz
Adding a stub plugin for the Hildon control panel.
Diffstat (limited to 'src/frontends/maemo')
-rw-r--r--src/frontends/maemo/data/Makefile.am12
-rw-r--r--src/frontends/maemo/data/icons/18x18/strongswan_lock_close.pngbin0 -> 1024 bytes
-rw-r--r--src/frontends/maemo/data/icons/18x18/strongswan_lock_open.pngbin0 -> 1032 bytes
-rw-r--r--src/frontends/maemo/data/icons/48x48/strongswan_lock_close.pngbin0 -> 2652 bytes
-rw-r--r--src/frontends/maemo/data/icons/48x48/strongswan_lock_open.pngbin0 -> 2682 bytes
-rw-r--r--src/frontends/maemo/data/strongswan-settings.desktop9
-rw-r--r--src/frontends/maemo/src/Makefile.am7
-rw-r--r--src/frontends/maemo/src/strongswan-settings.c40
8 files changed, 68 insertions, 0 deletions
diff --git a/src/frontends/maemo/data/Makefile.am b/src/frontends/maemo/data/Makefile.am
index 8b1378917..d3b52112b 100644
--- a/src/frontends/maemo/data/Makefile.am
+++ b/src/frontends/maemo/data/Makefile.am
@@ -1 +1,13 @@
+plugindesktopentry_DATA = strongswan-settings.desktop
+
+icon_18x18_DATA = \
+ icons/18x18/strongswan_lock_open.png \
+ icons/18x18/strongswan_lock_close.png
+icon_48x48_DATA = \
+ icons/48x48/strongswan_lock_open.png \
+ icons/48x48/strongswan_lock_close.png
+
+EXTRA_DIST = \
+ $(plugindesktopentry_DATA) \
+ $(icon_18x18_DATA) $(icon_48x48_DATA)
diff --git a/src/frontends/maemo/data/icons/18x18/strongswan_lock_close.png b/src/frontends/maemo/data/icons/18x18/strongswan_lock_close.png
new file mode 100644
index 000000000..b193d0dc8
--- /dev/null
+++ b/src/frontends/maemo/data/icons/18x18/strongswan_lock_close.png
Binary files differ
diff --git a/src/frontends/maemo/data/icons/18x18/strongswan_lock_open.png b/src/frontends/maemo/data/icons/18x18/strongswan_lock_open.png
new file mode 100644
index 000000000..16aabd2f9
--- /dev/null
+++ b/src/frontends/maemo/data/icons/18x18/strongswan_lock_open.png
Binary files differ
diff --git a/src/frontends/maemo/data/icons/48x48/strongswan_lock_close.png b/src/frontends/maemo/data/icons/48x48/strongswan_lock_close.png
new file mode 100644
index 000000000..9fdda0aa7
--- /dev/null
+++ b/src/frontends/maemo/data/icons/48x48/strongswan_lock_close.png
Binary files differ
diff --git a/src/frontends/maemo/data/icons/48x48/strongswan_lock_open.png b/src/frontends/maemo/data/icons/48x48/strongswan_lock_open.png
new file mode 100644
index 000000000..cba331fff
--- /dev/null
+++ b/src/frontends/maemo/data/icons/48x48/strongswan_lock_open.png
Binary files differ
diff --git a/src/frontends/maemo/data/strongswan-settings.desktop b/src/frontends/maemo/data/strongswan-settings.desktop
new file mode 100644
index 000000000..f5887f8ea
--- /dev/null
+++ b/src/frontends/maemo/data/strongswan-settings.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Name=strongSwan VPN
+Comment=A control panel applet to configure strongSwan VPN
+Type=HildonControlPanelPlugin
+Icon=strongswan_lock_close
+Categories=connectivity
+X-control-panel-plugin=libstrongswan-settings.so
diff --git a/src/frontends/maemo/src/Makefile.am b/src/frontends/maemo/src/Makefile.am
index 8b1378917..cea0341ba 100644
--- a/src/frontends/maemo/src/Makefile.am
+++ b/src/frontends/maemo/src/Makefile.am
@@ -1 +1,8 @@
+pluginlib_LTLIBRARIES = libstrongswan-settings.la
+libstrongswan_settings_la_SOURCES = \
+ strongswan-settings.c
+
+libstrongswan_settings_la_LIBADD = $(HILDON_LIBS)
+libstrongswan_settings_la_CFLAGS = $(HILDON_CFLAGS)
+libstrongswan_settings_la_LDFLAGS = -module -avoid-version
diff --git a/src/frontends/maemo/src/strongswan-settings.c b/src/frontends/maemo/src/strongswan-settings.c
new file mode 100644
index 000000000..f8c371959
--- /dev/null
+++ b/src/frontends/maemo/src/strongswan-settings.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 Tobias Brunner
+ * Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * 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.
+ */
+
+#include <hildon-cp-plugin/hildon-cp-plugin-interface.h>
+
+/**
+ * main callback for control panel plugins
+ */
+osso_return_t execute(osso_context_t *osso, gpointer data,
+ gboolean user_activated)
+{
+ if (!user_activated)
+ {
+ /* load state */
+ }
+
+ return OSSO_OK;
+}
+
+/**
+ * callback called in case state has to be saved
+ */
+osso_return_t save_state(osso_context_t *osso, gpointer data)
+{
+ /* save state */
+ return OSSO_OK;
+}
+