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
vb@1059
     1
#pragma once
vb@1059
     2
vb@1059
     3
#include "message.h"
edouard@1172
     4
#include "sync.h"
vb@1059
     5
#include "sync_fsm.h"
vb@1059
     6
vb@1059
     7
#ifdef __cplusplus
vb@1059
     8
extern "C" {
vb@1059
     9
#endif
vb@1059
    10
vb@1059
    11
PEP_STATUS receive_sync_msg(
vb@1059
    12
        PEP_SESSION session,
edouard@1445
    13
        sync_msg_t *sync_msg,
edouard@1445
    14
        time_t *timeout
vb@1059
    15
    );
vb@1059
    16
edouard@1195
    17
PEP_STATUS inject_DeviceState_event(
edouard@1195
    18
    PEP_SESSION session, 
edouard@1195
    19
    DeviceState_event event,
edouard@1195
    20
    Identity partner,
edouard@1195
    21
    void *extra);
edouard@1195
    22
edouard@1165
    23
PEP_STATUS receive_DeviceState_msg(
edouard@1165
    24
    PEP_SESSION session, 
edouard@1165
    25
    message *src, 
edouard@1165
    26
    PEP_rating rating, 
edouard@1165
    27
    stringlist_t *keylist);
vb@1059
    28
vb@1059
    29
DeviceGroup_Protocol_t *new_DeviceGroup_Protocol_msg(DeviceGroup_Protocol__payload_PR type);
vb@1059
    30
void free_DeviceGroup_Protocol_msg(DeviceGroup_Protocol_t *msg);
vb@1059
    31
vb@1059
    32
PEP_STATUS unicast_msg(
vb@1059
    33
        PEP_SESSION session,
vb@1091
    34
        const Identity partner,
vb@1059
    35
        DeviceState_state state,
vb@1097
    36
        DeviceGroup_Protocol_t *msg,
vb@1097
    37
        bool encrypted
vb@1059
    38
    );
vb@1059
    39
vb@1059
    40
PEP_STATUS multicast_self_msg(
vb@1059
    41
        PEP_SESSION session,
vb@1059
    42
        DeviceState_state state,
vb@1097
    43
        DeviceGroup_Protocol_t *msg,
vb@1097
    44
        bool encrypted
vb@1059
    45
    );
vb@1059
    46
vb@1085
    47
bool is_double(DeviceGroup_Protocol_t *msg);
vb@1085
    48
vb@1059
    49
#ifdef __cplusplus
vb@1059
    50
}
vb@1059
    51
#endif
vb@1059
    52