src/sync.c
changeset 572 3077e2489dfe
child 573 28b0d3154f0f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/sync.c	Tue May 03 15:50:40 2016 +0200
     1.3 @@ -0,0 +1,29 @@
     1.4 +#include "pEp_internal.h"
     1.5 +#include "sync_internal.h"
     1.6 +
     1.7 +#include <memory.h>
     1.8 +#include <assert.h>
     1.9 +
    1.10 +
    1.11 +PEP_sync_callbacks_t PEP_sync_callbacks = { NULL, NULL, NULL };
    1.12 +
    1.13 +DYNAMIC_API PEP_STATUS register_sync_callbacks(
    1.14 +        PEP_SESSION session,
    1.15 +        sendBeacon_t sendBeacon,
    1.16 +        sendHandshakeRequest_t sendHandshakeRequest,
    1.17 +        showHandshake_t showHandshake
    1.18 +    )
    1.19 +{
    1.20 +    PEP_sync_callbacks.sendBeacon = sendBeacon;
    1.21 +    PEP_sync_callbacks.sendHandshakeRequest = sendHandshakeRequest;
    1.22 +    PEP_sync_callbacks.showHandshake = showHandshake;
    1.23 +
    1.24 +    return PEP_STATUS_OK;
    1.25 +}
    1.26 +
    1.27 +DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session) {
    1.28 +    PEP_sync_callbacks.sendBeacon = NULL;
    1.29 +    PEP_sync_callbacks.sendHandshakeRequest = NULL;
    1.30 +    PEP_sync_callbacks.showHandshake = NULL;
    1.31 +}
    1.32 +