Adapt to latest adapter changes sync
authorThomas
Mon, 15 Apr 2019 08:48:46 +0200
branchsync
changeset 26139b7775c64b39
parent 2610 09fde2338362
child 2614 105311c70875
Adapt to latest adapter changes
AdapterCallbacks.cs
UI/HandshakeDialog.xaml.cs
     1.1 --- a/AdapterCallbacks.cs	Mon Mar 25 13:27:16 2019 +0100
     1.2 +++ b/AdapterCallbacks.cs	Mon Apr 15 08:48:46 2019 +0200
     1.3 @@ -1,8 +1,8 @@
     1.4  ´╗┐using pEp.UI;
     1.5  using pEpCOMServerAdapterLib;
     1.6 +using System;
     1.7  using System.Runtime.InteropServices;
     1.8  using System.Windows.Forms;
     1.9 -using System;
    1.10  using Outlook = Microsoft.Office.Interop.Outlook;
    1.11  
    1.12  namespace pEp
    1.13 @@ -98,7 +98,6 @@
    1.14                  case SyncHandshakeSignal.SyncNotifyInitAddOurDevice:
    1.15                  case SyncHandshakeSignal.SyncNotifyInitAddOtherDevice:
    1.16                  case SyncHandshakeSignal.SyncNotifyInitFormGroup:
    1.17 -                case SyncHandshakeSignal.SyncNotifyInitMoveOurDevice:
    1.18                      {
    1.19                          // Syncronize engine with settings just in case (should already be synced)
    1.20                          Globals.ThisAddIn.SyncWithSettings(true);
    1.21 @@ -115,14 +114,7 @@
    1.22                          catch { }
    1.23  
    1.24                          // Specify handshake type
    1.25 -                        if (signal == SyncHandshakeSignal.SyncNotifyInitMoveOurDevice)
    1.26 -                        {
    1.27 -                            mode = HandshakeDialog.HandshakeMode.SyncTypeB;
    1.28 -                        }
    1.29 -                        else
    1.30 -                        {
    1.31 -                            mode = HandshakeDialog.HandshakeMode.SyncTypeA;
    1.32 -                        }
    1.33 +                        mode = HandshakeDialog.HandshakeMode.SyncTypeA;
    1.34  
    1.35                          // Show handshake dialog
    1.36                          if (handshakeDialog != null)
    1.37 @@ -151,9 +143,9 @@
    1.38                          {
    1.39                              Log.Error("NotifyHandshake: Error creating handshake dialog. Dialog was not shown.");
    1.40                          }
    1.41 -                                                
    1.42 +
    1.43                          handshakeDialog = null;
    1.44 -                                               
    1.45 +
    1.46                          // Send result back to the engine
    1.47                          switch (dialogResult)
    1.48                          {
    1.49 @@ -192,7 +184,6 @@
    1.50                  // Currently, there is no action defined for the next three signals
    1.51                  case SyncHandshakeSignal.SyncNotifyAcceptedDeviceAdded:
    1.52                  case SyncHandshakeSignal.SyncNotifyAcceptedGroupCreated:
    1.53 -                case SyncHandshakeSignal.SyncNotifyAcceptedDeviceMoved:
    1.54                  default:
    1.55                      {
    1.56                          handshakeResult = SyncHandshakeResult.SyncHandshakeCancel;
    1.57 @@ -216,7 +207,7 @@
    1.58              {
    1.59                  Log.SensitiveData("MessageToSend: Started sending message with subject " + msg.ShortMsg);
    1.60              }
    1.61 -            catch { }         
    1.62 +            catch { }
    1.63  
    1.64              if (PEPMessage.Create(msg, out PEPMessage newMessage) != Globals.ReturnStatus.Success)
    1.65              {
     2.1 --- a/UI/HandshakeDialog.xaml.cs	Mon Mar 25 13:27:16 2019 +0100
     2.2 +++ b/UI/HandshakeDialog.xaml.cs	Mon Apr 15 08:48:46 2019 +0200
     2.3 @@ -419,7 +419,7 @@
     2.4                  try
     2.5                  {
     2.6                      pEpIdentity identity = identityPartner.ToCOMType();
     2.7 -                    ThisAddIn.PEPEngine.KeyReset(identityPartner.Fingerprint, identity);
     2.8 +                    ThisAddIn.PEPEngine.KeyResetIdentity(identity, identityPartner.Fingerprint);
     2.9                  }
    2.10                  catch (Exception ex)
    2.11                  {