Browse Source

use CallbackDispatcher

JSON-153_experimental
Volker Birk 2 years ago
parent
commit
91c960df3d
3 changed files with 4 additions and 8 deletions
  1. +0
    -4
      server/adapter-library.hh
  2. +3
    -3
      server/ev_server.cc
  3. +1
    -1
      server/function_map.hh

+ 0
- 4
server/adapter-library.hh View File

@ -1,4 +0,0 @@
#pragma once
void startSync();
void stopSync();

+ 3
- 3
server/ev_server.cc View File

@ -30,7 +30,7 @@
#ifndef JSON_ADAPTER_LIBRARY
#include "mini-adapter-impl.hh"
#else // JSON_ADAPTER_LIBRARY
#include "adapter-library.hh"
#include <pEp/callback_dispatcher.hh>
#endif
@ -156,8 +156,8 @@ const FunctionMap functions = {
FP( "startSync", new Func<void> (&pEp::mini::startSync) ),
FP( "stopSync" , new Func<void> (&pEp::mini::stopSync) ),
#else
FP( "startSync", new Func<void> (&startSync) ),
FP( "stopSync" , new Func<void> (&stopSync) ),
FP( "startSync", new Func<void> (&pEp::CallbackDispatcher::start_sync) ),
FP( "stopSync" , new Func<void> (&pEp::CallbackDispatcher::stop_sync) ),
#endif
// my own example function that does something useful. :-)
FP( "Other", new Separator ),


+ 1
- 1
server/function_map.hh View File

@ -226,7 +226,7 @@ public:
{
Logger Log("FuncCache::call");
typedef std::tuple<typename Args::c_type...> 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]);


Loading…
Cancel
Save