NotifyHandshake args changed notifyHandshake
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Fri, 14 Jun 2019 12:02:05 +0200
branchnotifyHandshake
changeset 38342934fc35d7a3
parent 3832 8860f25e9be9
NotifyHandshake args changed
src/sync_api.h
sync/cond_act_sync.yml2
test/include/SyncTests.h
test/src/engine_tests/SyncTests.cc
     1.1 --- a/src/sync_api.h	Thu Jun 13 20:25:41 2019 +0200
     1.2 +++ b/src/sync_api.h	Fri Jun 14 12:02:05 2019 +0200
     1.3 @@ -41,10 +41,10 @@
     1.4  // notifyHandshake() - notify UI about sync handshaking process
     1.5  //
     1.6  //  parameters:
     1.7 -//      obj (in)        object handle (implementation defined)
     1.8 -//      me (in)         own identity
     1.9 -//      partner (in)    identity of partner
    1.10 -//      signal (in)     reason of the notification
    1.11 +//      address (in)        email address for the own identity we're syncing
    1.12 +//      own_fpr (in)        own fpr to use for handshake
    1.13 +//      partner_fpr (in)    partner for to use for handshake
    1.14 +//      signal (in)         reason of the notification
    1.15  //
    1.16  //  return value:
    1.17  //      PEP_STATUS_OK or any other value on error
    1.18 @@ -53,8 +53,9 @@
    1.19  //      ownership of self and partner go to the callee
    1.20  
    1.21  typedef PEP_STATUS (*notifyHandshake_t)(
    1.22 -        pEp_identity *me,
    1.23 -        pEp_identity *partner,
    1.24 +        const char* address,
    1.25 +        const char* own_fpr,
    1.26 +        const char* partner_fpr,
    1.27          sync_handshake_signal signal
    1.28      );
    1.29  
    1.30 @@ -209,4 +210,3 @@
    1.31  #ifdef __cplusplus
    1.32  }
    1.33  #endif
    1.34 -
     2.1 --- a/sync/cond_act_sync.yml2	Thu Jun 13 20:25:41 2019 +0200
     2.2 +++ b/sync/cond_act_sync.yml2	Fri Jun 14 12:02:05 2019 +0200
     2.3 @@ -287,7 +287,7 @@
     2.4          }
     2.5  
     2.6          assert(strcmp(me->fpr, partner->fpr) != 0);
     2.7 -        status = session->notifyHandshake(me, partner, «$type»);
     2.8 +        status = session->notifyHandshake(me->address, me->fpr, partner->fpr, «$type»);
     2.9          if (status)
    2.10              return status;
    2.11      ||
    2.12 @@ -302,7 +302,7 @@
    2.13              return PEP_OUT_OF_MEMORY;
    2.14          }
    2.15  
    2.16 -        PEP_STATUS status = session->notifyHandshake(me, partner, «$type»);
    2.17 +        PEP_STATUS status = session->notifyHandshake(me->address, me->fpr, partner->fpr, «$type»);
    2.18          if (status)
    2.19              return status;
    2.20      ||
    2.21 @@ -535,4 +535,3 @@
    2.22  ||
    2.23  
    2.24  action disable;
    2.25 -
     3.1 --- a/test/include/SyncTests.h	Thu Jun 13 20:25:41 2019 +0200
     3.2 +++ b/test/include/SyncTests.h	Fri Jun 14 12:02:05 2019 +0200
     3.3 @@ -20,9 +20,10 @@
     3.4      void processing();
     3.5  
     3.6      static PEP_STATUS notifyHandshake(
     3.7 -            pEp_identity *me,
     3.8 -            pEp_identity *partner,
     3.9 -            sync_handshake_signal signal
    3.10 +        const char* address,
    3.11 +        const char* own_fpr,
    3.12 +        const char* partner_fpr,
    3.13 +        sync_handshake_signal signal
    3.14          );
    3.15      static int inject_sync_event(SYNC_EVENT ev, void *management);
    3.16      static Sync_event_t *retrieve_next_sync_event(void *management, unsigned threshold);
     4.1 --- a/test/src/engine_tests/SyncTests.cc	Thu Jun 13 20:25:41 2019 +0200
     4.2 +++ b/test/src/engine_tests/SyncTests.cc	Fri Jun 14 12:02:05 2019 +0200
     4.3 @@ -27,8 +27,9 @@
     4.4  }
     4.5  
     4.6  PEP_STATUS Sync_Adapter::notifyHandshake(
     4.7 -        pEp_identity *me,
     4.8 -        pEp_identity *partner,
     4.9 +        const char* address,
    4.10 +        const char* own_fpr,
    4.11 +        const char* partner_fpr,
    4.12          sync_handshake_signal signal
    4.13      )
    4.14  {