aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/android/android_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/plugins/android/android_plugin.c')
-rw-r--r--src/libcharon/plugins/android/android_plugin.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libcharon/plugins/android/android_plugin.c b/src/libcharon/plugins/android/android_plugin.c
index a23ee7152..8d3a1512e 100644
--- a/src/libcharon/plugins/android/android_plugin.c
+++ b/src/libcharon/plugins/android/android_plugin.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2010 Tobias Brunner
* Copyright (C) 2010 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -17,6 +18,7 @@
#include "android_logger.h"
#include "android_handler.h"
#include "android_creds.h"
+#include "android_service.h"
#include <hydra.h>
#include <daemon.h>
@@ -48,6 +50,11 @@ struct private_android_plugin_t {
*/
android_creds_t *creds;
+ /**
+ * Service that interacts with the Android Settings frontend
+ */
+ android_service_t *service;
+
};
METHOD(plugin_t, destroy, void,
@@ -57,6 +64,7 @@ METHOD(plugin_t, destroy, void,
&this->handler->handler);
charon->credentials->remove_set(charon->credentials, &this->creds->set);
charon->bus->remove_listener(charon->bus, &this->logger->listener);
+ this->service->destroy(this->service);
this->creds->destroy(this->creds);
this->handler->destroy(this->handler);
this->logger->destroy(this->logger);
@@ -83,6 +91,13 @@ plugin_t *android_plugin_create()
charon->credentials->add_set(charon->credentials, &this->creds->set);
hydra->attributes->add_handler(hydra->attributes, &this->handler->handler);
+ this->service = android_service_create(this->creds);
+ if (!this->service)
+ {
+ destroy(this);
+ return NULL;
+ }
+
return &this->public.plugin;
}