stream: create library instance of stream-manager

This commit is contained in:
Martin Willi 2013-06-27 10:16:00 +02:00
parent d6ff53940f
commit 2ba276017d
5 changed files with 13 additions and 5 deletions

View File

@ -80,6 +80,7 @@ void library_deinit()
/* make sure the cache is clear before unloading plugins */ /* make sure the cache is clear before unloading plugins */
lib->credmgr->flush_cache(lib->credmgr, CERT_ANY); lib->credmgr->flush_cache(lib->credmgr, CERT_ANY);
this->public.streams->destroy(this->public.streams);
this->public.watcher->destroy(this->public.watcher); this->public.watcher->destroy(this->public.watcher);
this->public.scheduler->destroy(this->public.scheduler); this->public.scheduler->destroy(this->public.scheduler);
this->public.processor->destroy(this->public.processor); this->public.processor->destroy(this->public.processor);
@ -268,6 +269,7 @@ bool library_init(char *settings)
this->public.processor = processor_create(); this->public.processor = processor_create();
this->public.scheduler = scheduler_create(); this->public.scheduler = scheduler_create();
this->public.watcher = watcher_create(); this->public.watcher = watcher_create();
this->public.streams = stream_manager_create();
this->public.plugins = plugin_loader_create(); this->public.plugins = plugin_loader_create();
if (!check_memwipe()) if (!check_memwipe())

View File

@ -58,6 +58,9 @@
* @defgroup networking networking * @defgroup networking networking
* @ingroup libstrongswan * @ingroup libstrongswan
* *
* @defgroup streams streams
* @ingroup networking
*
* @defgroup plugins plugins * @defgroup plugins plugins
* @ingroup libstrongswan * @ingroup libstrongswan
* *
@ -90,6 +93,7 @@
#include "utils/printf_hook.h" #include "utils/printf_hook.h"
#include "utils/utils.h" #include "utils/utils.h"
#include "networking/host_resolver.h" #include "networking/host_resolver.h"
#include "networking/streams/stream_manager.h"
#include "processing/processor.h" #include "processing/processor.h"
#include "processing/scheduler.h" #include "processing/scheduler.h"
#include "processing/watcher.h" #include "processing/watcher.h"
@ -202,6 +206,11 @@ struct library_t {
*/ */
watcher_t *watcher; watcher_t *watcher;
/**
* Streams and Services
*/
stream_manager_t *streams;
/** /**
* resolve hosts by DNS name * resolve hosts by DNS name
*/ */

View File

@ -13,8 +13,7 @@
* for more details. * for more details.
*/ */
#include "stream.h" #include <library.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>

View File

@ -23,7 +23,6 @@
typedef struct stream_manager_t stream_manager_t; typedef struct stream_manager_t stream_manager_t;
#include <networking/streams/stream.h>
#include <networking/streams/stream_service.h> #include <networking/streams/stream_service.h>
/** /**

View File

@ -13,8 +13,7 @@
* for more details. * for more details.
*/ */
#include "stream_service.h" #include <library.h>
#include <threading/thread.h> #include <threading/thread.h>
#include <processing/jobs/callback_job.h> #include <processing/jobs/callback_job.h>