src/sync.c
author Volker Birk <vb@pep-project.org>
Tue, 03 May 2016 16:04:21 +0200
changeset 574 3c21749a79a6
parent 573 28b0d3154f0f
child 597 560c0caf14ef
permissions -rw-r--r--
reuse sendBeacon() for sendHandshakeRequest()
     1 #include "pEp_internal.h"
     2 #include "sync_internal.h"
     3 
     4 #include <memory.h>
     5 #include <assert.h>
     6 
     7 
     8 PEP_sync_callbacks_t PEP_sync_callbacks = { NULL, NULL, NULL };
     9 
    10 DYNAMIC_API PEP_STATUS register_sync_callbacks(
    11         sendBeacon_t sendBeacon,
    12         showHandshake_t showHandshake
    13     )
    14 {
    15     PEP_sync_callbacks.sendBeacon = sendBeacon;
    16     PEP_sync_callbacks.sendHandshakeRequest = sendBeacon;
    17     PEP_sync_callbacks.showHandshake = showHandshake;
    18 
    19     return PEP_STATUS_OK;
    20 }
    21 
    22 DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session) {
    23     PEP_sync_callbacks.sendBeacon = NULL;
    24     PEP_sync_callbacks.sendHandshakeRequest = NULL;
    25     PEP_sync_callbacks.showHandshake = NULL;
    26 }
    27