src/sync_impl.h
author Krista Grothoff <krista@pep-project.org>
Mon, 13 Feb 2017 22:13:48 +0100
branchenigmail-color-tests
changeset 1582 7dd855780eef
parent 1513 e7f7e42385b5
child 1586 599deda50386
permissions -rw-r--r--
closing branch
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 #pragma once
     5 
     6 #include "message.h"
     7 #include "sync.h"
     8 #include "sync_fsm.h"
     9 
    10 #ifdef __cplusplus
    11 extern "C" {
    12 #endif
    13 
    14 PEP_STATUS receive_sync_msg(
    15         PEP_SESSION session,
    16         sync_msg_t *sync_msg,
    17         time_t *timeout
    18     );
    19 
    20 PEP_STATUS inject_DeviceState_event(
    21     PEP_SESSION session, 
    22     DeviceState_event event,
    23     Identity partner,
    24     void *extra);
    25 
    26 PEP_STATUS receive_DeviceState_msg(
    27     PEP_SESSION session, 
    28     message *src, 
    29     PEP_rating rating, 
    30     stringlist_t *keylist);
    31 
    32 DeviceGroup_Protocol_t *new_DeviceGroup_Protocol_msg(DeviceGroup_Protocol__payload_PR type);
    33 void free_DeviceGroup_Protocol_msg(DeviceGroup_Protocol_t *msg);
    34 
    35 PEP_STATUS unicast_msg(
    36         PEP_SESSION session,
    37         const Identity partner,
    38         DeviceState_state state,
    39         DeviceGroup_Protocol_t *msg,
    40         bool encrypted
    41     );
    42 
    43 PEP_STATUS multicast_self_msg(
    44         PEP_SESSION session,
    45         DeviceState_state state,
    46         DeviceGroup_Protocol_t *msg,
    47         bool encrypted
    48     );
    49 
    50 bool is_double(DeviceGroup_Protocol_t *msg);
    51 
    52 #ifdef __cplusplus
    53 }
    54 #endif
    55