src/sync_fsm.h
branchkeysync
changeset 939 ed7dfdae3031
parent 783 f0a7c5183450
child 951 dec407deb10e
     1.1 --- a/src/sync_fsm.h	Wed Jul 27 16:20:31 2016 +0200
     1.2 +++ b/src/sync_fsm.h	Fri Jul 29 10:45:13 2016 +0200
     1.3 @@ -11,7 +11,8 @@
     1.4  // types
     1.5  
     1.6  typedef pEp_identity * Identity;
     1.7 -typedef union _param { const Identity partner; const stringlist_t *keylist; } param_t;
     1.8 +typedef stringlist_t * Stringlist;
     1.9 +typedef union _param { Identity partner; stringlist_t *keylist; } param_t;
    1.10  
    1.11  // error values
    1.12  
    1.13 @@ -44,17 +45,18 @@
    1.14      HandshakeRejected, 
    1.15      HandshakeAccepted, 
    1.16      Cancel, 
    1.17 -    Reject
    1.18 +    Reject, 
    1.19 +    Hand
    1.20  } DeviceState_event;
    1.21  
    1.22  // actions
    1.23  
    1.24 -PEP_STATUS sendBeacon(PEP_SESSION session, DeviceState_state state, const Identity partner);
    1.25 -PEP_STATUS sendHandshakeRequest(PEP_SESSION session, DeviceState_state state, const Identity partner);
    1.26 -PEP_STATUS showHandshake(PEP_SESSION session, DeviceState_state state, const Identity partner);
    1.27 -PEP_STATUS reject(PEP_SESSION session, DeviceState_state state, const Identity partner);
    1.28 -PEP_STATUS storeGroupKeys(PEP_SESSION session, DeviceState_state state, const Identity partner);
    1.29 -PEP_STATUS sendGroupKeys(PEP_SESSION session, DeviceState_state state, const Identity partner);
    1.30 +PEP_STATUS sendBeacon(PEP_SESSION session, DeviceState_state state, Identity partner, void *extra);
    1.31 +PEP_STATUS sendHandshakeRequest(PEP_SESSION session, DeviceState_state state, Identity partner, void *extra);
    1.32 +PEP_STATUS showHandshake(PEP_SESSION session, DeviceState_state state, Identity partner, void *extra);
    1.33 +PEP_STATUS reject(PEP_SESSION session, DeviceState_state state, Identity partner, void *extra);
    1.34 +PEP_STATUS storeGroupKeys(PEP_SESSION session, DeviceState_state state, Identity partner, void *extra);
    1.35 +PEP_STATUS sendGroupKeys(PEP_SESSION session, DeviceState_state state, Identity partner, void *extra);
    1.36  
    1.37  // state machine
    1.38  
    1.39 @@ -62,7 +64,7 @@
    1.40          PEP_SESSION session,
    1.41          DeviceState_state state,
    1.42          DeviceState_event event,
    1.43 -        const Identity partner,
    1.44 +        Identity partner,
    1.45          DeviceState_state state_partner
    1.46      );
    1.47