diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-05-04 18:26:07 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-06-15 19:58:58 +0200 |
commit | be00d219cc11dde9f3e14231d3ab9678b0c90f8a (patch) | |
tree | 2e045918c1dfad19cfc7d9727b5470a8a5e3cde7 /src/libcharon/plugins/android/android_plugin.c | |
parent | c373f14947e3b6d69304b52e1e82637f9dbedbbf (diff) | |
download | strongswan-be00d219cc11dde9f3e14231d3ab9678b0c90f8a.tar.bz2 strongswan-be00d219cc11dde9f3e14231d3ab9678b0c90f8a.tar.xz |
Adding an interface that interacts with the Android Settings frontend.
Diffstat (limited to 'src/libcharon/plugins/android/android_plugin.c')
-rw-r--r-- | src/libcharon/plugins/android/android_plugin.c | 15 |
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; } |