src/sync_impl.h
author Volker Birk <vb@pep.foundation>
Tue, 27 Dec 2016 21:13:41 +0100
changeset 1513 e7f7e42385b5
parent 1445 5d233bcdde76
child 1586 599deda50386
permissions -rw-r--r--
adding license info to each file
vb@1513
     1
// This file is under GNU General Public License 3.0
vb@1513
     2
// see LICENSE.txt
vb@1513
     3
vb@1059
     4
#pragma once
vb@1059
     5
vb@1059
     6
#include "message.h"
edouard@1172
     7
#include "sync.h"
vb@1059
     8
#include "sync_fsm.h"
vb@1059
     9
vb@1059
    10
#ifdef __cplusplus
vb@1059
    11
extern "C" {
vb@1059
    12
#endif
vb@1059
    13
vb@1059
    14
PEP_STATUS receive_sync_msg(
vb@1059
    15
        PEP_SESSION session,
edouard@1445
    16
        sync_msg_t *sync_msg,
edouard@1445
    17
        time_t *timeout
vb@1059
    18
    );
vb@1059
    19
edouard@1195
    20
PEP_STATUS inject_DeviceState_event(
edouard@1195
    21
    PEP_SESSION session, 
edouard@1195
    22
    DeviceState_event event,
edouard@1195
    23
    Identity partner,
edouard@1195
    24
    void *extra);
edouard@1195
    25
edouard@1165
    26
PEP_STATUS receive_DeviceState_msg(
edouard@1165
    27
    PEP_SESSION session, 
edouard@1165
    28
    message *src, 
edouard@1165
    29
    PEP_rating rating, 
edouard@1165
    30
    stringlist_t *keylist);
vb@1059
    31
vb@1059
    32
DeviceGroup_Protocol_t *new_DeviceGroup_Protocol_msg(DeviceGroup_Protocol__payload_PR type);
vb@1059
    33
void free_DeviceGroup_Protocol_msg(DeviceGroup_Protocol_t *msg);
vb@1059
    34
vb@1059
    35
PEP_STATUS unicast_msg(
vb@1059
    36
        PEP_SESSION session,
vb@1091
    37
        const Identity partner,
vb@1059
    38
        DeviceState_state state,
vb@1097
    39
        DeviceGroup_Protocol_t *msg,
vb@1097
    40
        bool encrypted
vb@1059
    41
    );
vb@1059
    42
vb@1059
    43
PEP_STATUS multicast_self_msg(
vb@1059
    44
        PEP_SESSION session,
vb@1059
    45
        DeviceState_state state,
vb@1097
    46
        DeviceGroup_Protocol_t *msg,
vb@1097
    47
        bool encrypted
vb@1059
    48
    );
vb@1059
    49
vb@1085
    50
bool is_double(DeviceGroup_Protocol_t *msg);
vb@1085
    51
vb@1059
    52
#ifdef __cplusplus
vb@1059
    53
}
vb@1059
    54
#endif
vb@1059
    55