src/sync_impl.h
author Edouard Tisserant <edouard@pep-project.org>
Sat, 26 Nov 2016 03:54:06 +0100
branchENGINE-133
changeset 1445 5d233bcdde76
parent 1195 53f8859f476b
child 1513 e7f7e42385b5
permissions -rw-r--r--
ENGINE-133 added timeout in sync state machine, relying on callback sync message retrieve timeout - adapters need update
     1 #pragma once
     2 
     3 #include "message.h"
     4 #include "sync.h"
     5 #include "sync_fsm.h"
     6 
     7 #ifdef __cplusplus
     8 extern "C" {
     9 #endif
    10 
    11 PEP_STATUS receive_sync_msg(
    12         PEP_SESSION session,
    13         sync_msg_t *sync_msg,
    14         time_t *timeout
    15     );
    16 
    17 PEP_STATUS inject_DeviceState_event(
    18     PEP_SESSION session, 
    19     DeviceState_event event,
    20     Identity partner,
    21     void *extra);
    22 
    23 PEP_STATUS receive_DeviceState_msg(
    24     PEP_SESSION session, 
    25     message *src, 
    26     PEP_rating rating, 
    27     stringlist_t *keylist);
    28 
    29 DeviceGroup_Protocol_t *new_DeviceGroup_Protocol_msg(DeviceGroup_Protocol__payload_PR type);
    30 void free_DeviceGroup_Protocol_msg(DeviceGroup_Protocol_t *msg);
    31 
    32 PEP_STATUS unicast_msg(
    33         PEP_SESSION session,
    34         const Identity partner,
    35         DeviceState_state state,
    36         DeviceGroup_Protocol_t *msg,
    37         bool encrypted
    38     );
    39 
    40 PEP_STATUS multicast_self_msg(
    41         PEP_SESSION session,
    42         DeviceState_state state,
    43         DeviceGroup_Protocol_t *msg,
    44         bool encrypted
    45     );
    46 
    47 bool is_double(DeviceGroup_Protocol_t *msg);
    48 
    49 #ifdef __cplusplus
    50 }
    51 #endif
    52