src/sync.c
author Volker Birk <vb@pep-project.org>
Wed, 11 May 2016 17:09:02 +0200
changeset 599 d2a023827e42
parent 597 560c0caf14ef
child 602 41fc6ea3548b
permissions -rw-r--r--
adding obj handle
vb@572
     1
#include "pEp_internal.h"
vb@572
     2
#include "sync_internal.h"
vb@572
     3
vb@572
     4
#include <memory.h>
vb@572
     5
#include <assert.h>
vb@572
     6
vb@572
     7
vb@597
     8
PEP_sync_callbacks_t PEP_sync_callbacks = { NULL, NULL };
vb@572
     9
vb@572
    10
DYNAMIC_API PEP_STATUS register_sync_callbacks(
vb@599
    11
        PEP_SESSION session,
vb@599
    12
        void *obj,
vb@597
    13
        messageToSend_t messageToSend,
vb@572
    14
        showHandshake_t showHandshake
vb@572
    15
    )
vb@572
    16
{
vb@599
    17
    session->sync_obj = obj;
vb@597
    18
    PEP_sync_callbacks.messageToSend = messageToSend;
vb@572
    19
    PEP_sync_callbacks.showHandshake = showHandshake;
vb@572
    20
vb@572
    21
    return PEP_STATUS_OK;
vb@572
    22
}
vb@572
    23
vb@572
    24
DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session) {
vb@597
    25
    PEP_sync_callbacks.messageToSend = NULL;
vb@572
    26
    PEP_sync_callbacks.showHandshake = NULL;
vb@572
    27
}
vb@572
    28