From 91c960df3ddc2e6daeb5a945659f9fb578407fdf Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Wed, 1 Jul 2020 12:52:53 +0200 Subject: [PATCH] use CallbackDispatcher --- server/adapter-library.hh | 4 ---- server/ev_server.cc | 6 +++--- server/function_map.hh | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 server/adapter-library.hh diff --git a/server/adapter-library.hh b/server/adapter-library.hh deleted file mode 100644 index 163bb4b..0000000 --- a/server/adapter-library.hh +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -void startSync(); -void stopSync(); diff --git a/server/ev_server.cc b/server/ev_server.cc index 5a0d8b9..6d58230 100644 --- a/server/ev_server.cc +++ b/server/ev_server.cc @@ -30,7 +30,7 @@ #ifndef JSON_ADAPTER_LIBRARY #include "mini-adapter-impl.hh" #else // JSON_ADAPTER_LIBRARY -#include "adapter-library.hh" +#include #endif @@ -156,8 +156,8 @@ const FunctionMap functions = { FP( "startSync", new Func (&pEp::mini::startSync) ), FP( "stopSync" , new Func (&pEp::mini::stopSync) ), #else - FP( "startSync", new Func (&startSync) ), - FP( "stopSync" , new Func (&stopSync) ), + FP( "startSync", new Func (&pEp::CallbackDispatcher::start_sync) ), + FP( "stopSync" , new Func (&pEp::CallbackDispatcher::stop_sync) ), #endif // my own example function that does something useful. :-) FP( "Other", new Separator ), diff --git a/server/function_map.hh b/server/function_map.hh index 517d279..344c38c 100644 --- a/server/function_map.hh +++ b/server/function_map.hh @@ -226,7 +226,7 @@ public: { Logger Log("FuncCache::call"); typedef std::tuple param_tuple_t; - param_tuple_t param_tuple; + //param_tuple_t param_tuple; // FIXME: Does only work with functions with type: void(PEP_SESSION, T): const auto p0 = from_json< typename std::tuple_element<1, param_tuple_t>::type >(parameters[0]);