Maemo: Basic functionality added to notify the applet about status updates.
[strongswan.git] / src / libcharon / plugins / maemo / maemo_plugin.c
index ef5f651..042b7d4 100644 (file)
 #include <credentials/sets/mem_cred.h>
 #include <processing/jobs/callback_job.h>
 
+#define OSSO_STATUS_NAME       "status"
+#define OSSO_STATUS_SERVICE    "org.strongswan."OSSO_STATUS_NAME
+#define OSSO_STATUS_OBJECT     "/org/strongswan/"OSSO_STATUS_NAME
+#define OSSO_STATUS_IFACE      "org.strongswan."OSSO_STATUS_NAME
+
 #define OSSO_CHARON_NAME       "charon"
 #define OSSO_CHARON_SERVICE    "org.strongswan."OSSO_CHARON_NAME
 #define OSSO_CHARON_OBJECT     "/org/strongswan/"OSSO_CHARON_NAME
@@ -61,6 +66,17 @@ struct private_maemo_plugin_t {
 
 };
 
+static gint change_status(private_maemo_plugin_t *this, int status)
+{
+       osso_rpc_t retval;
+       gint res;
+       res = osso_rpc_run (this->context, OSSO_STATUS_SERVICE, OSSO_STATUS_OBJECT,
+                                               OSSO_STATUS_IFACE, "StatusChanged", &retval,
+                                               DBUS_TYPE_INT32, status,
+                                               DBUS_TYPE_INVALID);
+       return res;
+}
+
 static gboolean initiate_connection(private_maemo_plugin_t *this,
                                                                        GArray *arguments)
 {