src/sync_impl.h
author Edouard Tisserant <edouard@pep-project.org>
Sun, 18 Sep 2016 16:55:53 +0200
branchkeysync
changeset 1165 05c831cfab65
parent 1099 113463c3e85a
child 1172 15a75c0cc78f
permissions -rw-r--r--
Sync message decrypt rating could't be evaluated properly without knowing peer's user_id, itslef encoded inside the encrypted blob. Peer identity rating is then re-evaluated after unpacking.
vb@1059
     1
#pragma once
vb@1059
     2
vb@1059
     3
#include "message.h"
vb@1059
     4
#include "sync_fsm.h"
vb@1059
     5
vb@1059
     6
#ifdef __cplusplus
vb@1059
     7
extern "C" {
vb@1059
     8
#endif
vb@1059
     9
vb@1059
    10
PEP_STATUS receive_sync_msg(
vb@1059
    11
        PEP_SESSION session,
vb@1059
    12
        DeviceGroup_Protocol_t *msg
vb@1059
    13
    );
vb@1059
    14
edouard@1165
    15
PEP_STATUS receive_DeviceState_msg(
edouard@1165
    16
    PEP_SESSION session, 
edouard@1165
    17
    message *src, 
edouard@1165
    18
    PEP_rating rating, 
edouard@1165
    19
    stringlist_t *keylist);
vb@1059
    20
vb@1059
    21
DeviceGroup_Protocol_t *new_DeviceGroup_Protocol_msg(DeviceGroup_Protocol__payload_PR type);
vb@1059
    22
void free_DeviceGroup_Protocol_msg(DeviceGroup_Protocol_t *msg);
vb@1059
    23
vb@1059
    24
PEP_STATUS unicast_msg(
vb@1059
    25
        PEP_SESSION session,
vb@1091
    26
        const Identity partner,
vb@1059
    27
        DeviceState_state state,
vb@1097
    28
        DeviceGroup_Protocol_t *msg,
vb@1097
    29
        bool encrypted
vb@1059
    30
    );
vb@1059
    31
vb@1059
    32
PEP_STATUS multicast_self_msg(
vb@1059
    33
        PEP_SESSION session,
vb@1059
    34
        DeviceState_state state,
vb@1097
    35
        DeviceGroup_Protocol_t *msg,
vb@1097
    36
        bool encrypted
vb@1059
    37
    );
vb@1059
    38
vb@1085
    39
bool is_double(DeviceGroup_Protocol_t *msg);
vb@1085
    40
vb@1059
    41
#ifdef __cplusplus
vb@1059
    42
}
vb@1059
    43
#endif
vb@1059
    44