... sync
authorVolker Birk <vb@pep.foundation>
Thu, 09 Aug 2018 12:44:05 +0200
branchsync
changeset 2832e03dfbbaf5ef
parent 2831 be6623599adb
child 2833 ce3baad227c5
...
src/pEpEngine.c
src/pEp_internal.h
src/sync.c
src/sync.h
sync/sync_ux.txt
     1.1 --- a/src/pEpEngine.c	Thu Aug 09 12:26:53 2018 +0200
     1.2 +++ b/src/pEpEngine.c	Thu Aug 09 12:44:05 2018 +0200
     1.3 @@ -1297,10 +1297,6 @@
     1.4  #endif // USE_GPG
     1.5      }
     1.6  
     1.7 -    // sync_session set to own session by default
     1.8 -    // sync_session is then never null on a valid session
     1.9 -    _session->sync_session = _session;
    1.10 -
    1.11      *session = _session;
    1.12      
    1.13      // Note: Following statement is NOT for any cryptographic/secure functionality; it is
     2.1 --- a/src/pEp_internal.h	Thu Aug 09 12:26:53 2018 +0200
     2.2 +++ b/src/pEp_internal.h	Thu Aug 09 12:44:05 2018 +0200
     2.3 @@ -208,7 +208,6 @@
     2.4      retrieve_next_sync_msg_t retrieve_next_sync_msg;
     2.5  
     2.6      // pEp Sync
     2.7 -    pEpSession* sync_session;
     2.8      struct Sync_state_s sync_state;
     2.9      struct own_Sync_state_s own_sync_state;
    2.10  
     3.1 --- a/src/sync.c	Thu Aug 09 12:26:53 2018 +0200
     3.2 +++ b/src/sync.c	Thu Aug 09 12:44:05 2018 +0200
     3.3 @@ -44,49 +44,6 @@
     3.4      return status;
     3.5  }
     3.6  
     3.7 -DYNAMIC_API PEP_STATUS attach_sync_session(
     3.8 -        PEP_SESSION session,
     3.9 -        PEP_SESSION sync_session
    3.10 -    )
    3.11 -{
    3.12 -    assert(session && sync_session && sync_session->sync_management && sync_session->inject_sync_msg );
    3.13 -    if (!(session && sync_session && sync_session->sync_management && sync_session->inject_sync_msg ))
    3.14 -        return PEP_ILLEGAL_VALUE;
    3.15 -
    3.16 -    session->sync_session = sync_session;
    3.17 -    // memcpy(session->sync_uuid, sync_session->sync_uuid, 37);
    3.18 -
    3.19 -    // session->sync_management = sync_session->sync_management;
    3.20 -    // session->inject_sync_msg = sync_session->inject_sync_msg;
    3.21 -
    3.22 -    return PEP_STATUS_OK;
    3.23 -}
    3.24 -
    3.25 -DYNAMIC_API PEP_STATUS detach_sync_session(PEP_SESSION session)
    3.26 -{
    3.27 -    assert(session);
    3.28 -    if (!(session))
    3.29 -        return PEP_ILLEGAL_VALUE;
    3.30 -
    3.31 -    session->sync_session = session;
    3.32 -    // memset(session->sync_uuid, 0, 37);
    3.33 -
    3.34 -    // session->sync_management = NULL;
    3.35 -    // session->inject_sync_msg = NULL;
    3.36 -
    3.37 -    return PEP_STATUS_OK;
    3.38 -}
    3.39 -
    3.40 -int call_inject_sync_msg(PEP_SESSION session, void *msg)
    3.41 -{
    3.42 -    if(session->sync_session->inject_sync_msg &&
    3.43 -       session->sync_session->sync_management)
    3.44 -        return session->sync_session->inject_sync_msg(msg, 
    3.45 -            session->sync_session->sync_management);
    3.46 -    else
    3.47 -       return PEP_SYNC_NO_INJECT_CALLBACK;
    3.48 -}
    3.49 -
    3.50  DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session) {
    3.51      // stop state machine
    3.52      memset(&session->sync_state, 0, sizeof(session->sync_state));
     4.1 --- a/src/sync.h	Thu Aug 09 12:26:53 2018 +0200
     4.2 +++ b/src/sync.h	Thu Aug 09 12:44:05 2018 +0200
     4.3 @@ -141,36 +141,6 @@
     4.4          retrieve_next_sync_msg_t retrieve_next_sync_msg
     4.5      );
     4.6  
     4.7 -// attach_sync_session() - attach session to a session running keysync state machine 
     4.8 -//
     4.9 -//  parameters:
    4.10 -//      session (in)                session to attach
    4.11 -//      sync_session (in)           session running keysync
    4.12 -//
    4.13 -//  return value:
    4.14 -//      PEP_STATUS_OK or any other value on errror
    4.15 -//
    4.16 -//  caveat:
    4.17 -//      register_sync_callbacks must have been called on sync_session
    4.18 -//      call that BEFORE you're using that session in any other part of the engine
    4.19 -
    4.20 -DYNAMIC_API PEP_STATUS attach_sync_session(
    4.21 -        PEP_SESSION session,
    4.22 -        PEP_SESSION sync_session
    4.23 -    );
    4.24 -
    4.25 -// detach_sync_session() - detach previously attached sync session
    4.26 -//
    4.27 -//  parameters:
    4.28 -//      session (in)                session to detach 
    4.29 -
    4.30 -DYNAMIC_API PEP_STATUS detach_sync_session(PEP_SESSION session);
    4.31 -
    4.32 -// unregister_sync_callbacks() - unregister adapter's callbacks
    4.33 -//
    4.34 -//  parameters:
    4.35 -//      session (in)                session to unregister
    4.36 -
    4.37  DYNAMIC_API void unregister_sync_callbacks(PEP_SESSION session);
    4.38  
    4.39  // do_sync_protocol() - function to be run on an extra thread
     5.1 --- a/sync/sync_ux.txt	Thu Aug 09 12:26:53 2018 +0200
     5.2 +++ b/sync/sync_ux.txt	Thu Aug 09 12:44:05 2018 +0200
     5.3 @@ -94,9 +94,3 @@
     5.4  
     5.5  If Sync is enabled in 2) then adding a new account will have Sync
     5.6  switched off for this account by default.
     5.7 -
     5.8 -Yours,
     5.9 -VB.
    5.10 --- 
    5.11 -Volker Birk, p≡p project
    5.12 -mailto:vb@pep-project.org  https://pep-project.org