synchronous
Volker Birk 3 years ago
commit d5eb9eee7b

@ -2,7 +2,7 @@
#include <stdexcept>
#include <cassert>
pEp::CallbackDispatcher callback_dispatcher;
pEp::CallbackDispatcher pEp::callback_dispatcher;
namespace pEp {
bool CallbackDispatcher::once = true;
@ -62,11 +62,11 @@ namespace pEp {
void CallbackDispatcher::start_sync()
{
pEp::Adapter::startup<CallbackDispatcher>(CallbackDispatcher::messageToSend,
CallbackDispatcher::notifyHandshake, this,
CallbackDispatcher::notifyHandshake, &callback_dispatcher,
&CallbackDispatcher::on_startup,
&CallbackDispatcher::on_shutdown);
for (auto target : targets)
for (auto target : callback_dispatcher.targets)
target.notifyHandshake(nullptr, nullptr, SYNC_NOTIFY_START);
}
@ -74,7 +74,7 @@ namespace pEp {
{
pEp::Adapter::shutdown();
for (auto target : targets)
for (auto target : callback_dispatcher.targets)
target.notifyHandshake(nullptr, nullptr, SYNC_NOTIFY_STOP);
}

@ -34,8 +34,8 @@ namespace pEp {
);
void remove(::messageToSend_t messageToSend);
void start_sync();
void stop_sync();
static void start_sync();
static void stop_sync();
static PEP_STATUS messageToSend(::message *msg);
static PEP_STATUS notifyHandshake(::pEp_identity *me,
@ -50,6 +50,6 @@ namespace pEp {
::pEp_identity *partner, ::sync_handshake_signal signal);
};
extern CallbackDispatcher callback_dispatcher;
};
extern pEp::CallbackDispatcher callback_dispatcher;

Loading…
Cancel
Save