Wrap is_sync_running() sync
authorThomas
Wed, 20 Nov 2019 17:14:38 +0100
branchsync
changeset 374ccc4c88f280e
parent 373 5b10b2200c91
child 375 fe31c63ea77d
Wrap is_sync_running()
CpEpEngine.cpp
CpEpEngine.h
pEpCOMServerAdapter.idl
     1.1 --- a/CpEpEngine.cpp	Thu Nov 14 16:18:44 2019 +0100
     1.2 +++ b/CpEpEngine.cpp	Wed Nov 20 17:14:38 2019 +0100
     1.3 @@ -1991,3 +1991,10 @@
     1.4  
     1.5      return S_OK;
     1.6  }
     1.7 +
     1.8 +STDMETHODIMP CpEpEngine::GetIsSyncRunning(VARIANT_BOOL *running)
     1.9 +{
    1.10 +    *running = ::is_sync_running();
    1.11 +
    1.12 +    return S_OK;
    1.13 +}
     2.1 --- a/CpEpEngine.h	Thu Nov 14 16:18:44 2019 +0100
     2.2 +++ b/CpEpEngine.h	Wed Nov 20 17:14:38 2019 +0100
     2.3 @@ -197,7 +197,7 @@
     2.4      STDMETHOD(GetLanguageList)(BSTR * languages);
     2.5      STDMETHOD(SetIdentityFlags)(struct pEpIdentity *identity, pEpIdentityFlags flags);
     2.6      STDMETHOD(UnsetIdentityFlags)(struct pEpIdentity *identity, pEpIdentityFlags flags);
     2.7 -	STDMETHOD(ImportKey)(BSTR keyData, LPSAFEARRAY *privateKeys);
     2.8 +    STDMETHOD(ImportKey)(BSTR keyData, LPSAFEARRAY *privateKeys);
     2.9  
    2.10      // keymanagement API
    2.11  
    2.12 @@ -207,13 +207,13 @@
    2.13      STDMETHOD(Myself)(struct pEpIdentity *ident, struct pEpIdentity *result);
    2.14      STDMETHOD(UpdateIdentity)(struct pEpIdentity *ident, struct pEpIdentity *result);
    2.15      STDMETHOD(KeyMistrusted)(struct pEpIdentity *ident);
    2.16 -	STDMETHOD(KeyResetIdentity)(pEpIdentity ident, BSTR fpr);
    2.17 -	STDMETHOD(KeyResetUser)(BSTR userId, BSTR fpr);
    2.18 -	STDMETHOD(KeyResetAllOwnKeys)();
    2.19 +    STDMETHOD(KeyResetIdentity)(pEpIdentity ident, BSTR fpr);
    2.20 +    STDMETHOD(KeyResetUser)(BSTR userId, BSTR fpr);
    2.21 +    STDMETHOD(KeyResetAllOwnKeys)();
    2.22      STDMETHOD(KeyResetTrust)(struct pEpIdentity *ident);
    2.23      STDMETHOD(TrustPersonalKey)(struct pEpIdentity *ident, struct pEpIdentity *result);
    2.24      STDMETHOD(OwnIdentitiesRetrieve)(LPSAFEARRAY* ownIdentities);
    2.25 -	STDMETHOD(ConfigCipherSuite)(pEpCipherSuite cipherSuite);
    2.26 +    STDMETHOD(ConfigCipherSuite)(pEpCipherSuite cipherSuite);
    2.27  
    2.28      // STDMETHOD(UndoLastMistrust)(); 
    2.29      
    2.30 @@ -247,8 +247,8 @@
    2.31  
    2.32      STDMETHOD(DecryptMessage)(TextMessage * src, TextMessage * dst, SAFEARRAY ** keylist, pEpDecryptFlags* flags, pEpRating *rating);
    2.33      STDMETHOD(ReEvaluateMessageRating)(TextMessage * msg, SAFEARRAY * x_KeyList, pEpRating x_EncStatus, pEpRating *rating);
    2.34 -	STDMETHOD(OutgoingMessageRating)(TextMessage *msg, pEpRating * pVal);
    2.35 -	STDMETHOD(OutgoingMessageRatingPreview)(TextMessage *msg, pEpRating * pVal);
    2.36 +    STDMETHOD(OutgoingMessageRating)(TextMessage *msg, pEpRating * pVal);
    2.37 +    STDMETHOD(OutgoingMessageRatingPreview)(TextMessage *msg, pEpRating * pVal);
    2.38      STDMETHOD(IdentityRating)(pEpIdentity * ident, pEpRating * pVal);
    2.39      STDMETHOD(ColorFromRating)(pEpRating rating, pEpColor * pVal);
    2.40      STDMETHOD(RatingFromCommType)(pEpComType commType, pEpRating * rating);
    2.41 @@ -268,27 +268,28 @@
    2.42  
    2.43      // PGP compatibility functions
    2.44      STDMETHOD(OpenPGPListKeyinfo)(BSTR search_pattern, LPSAFEARRAY* keyinfo_list);
    2.45 -	STDMETHOD(SetOwnKey)(pEpIdentity * ident, BSTR fpr, struct pEpIdentity *result);
    2.46 -	STDMETHOD(TrustOwnKey)(pEpIdentity * ident);
    2.47 +    STDMETHOD(SetOwnKey)(pEpIdentity * ident, BSTR fpr, struct pEpIdentity *result);
    2.48 +    STDMETHOD(TrustOwnKey)(pEpIdentity * ident);
    2.49  
    2.50      // Trigger an immediate update
    2.51      STDMETHOD(UpdateNow)(BSTR productCode, VARIANT_BOOL *didUpdate);
    2.52  
    2.53 -	STDMETHOD(Startup)();
    2.54 +    STDMETHOD(Startup)();
    2.55  
    2.56 -	STDMETHOD(GetKeyRatingForUser)(BSTR userId, BSTR fpr, pEpRating *rating);
    2.57 -	STDMETHOD(GetKeyRating)(BSTR fpr, pEpComType *commType);
    2.58 +    STDMETHOD(GetKeyRatingForUser)(BSTR userId, BSTR fpr, pEpRating *rating);
    2.59 +    STDMETHOD(GetKeyRating)(BSTR fpr, pEpComType *commType);
    2.60  
    2.61 -	// sync API
    2.62 -	STDMETHOD(DeliverHandshakeResult)(enum SyncHandshakeResult result, SAFEARRAY *identities_sharing);
    2.63 -	STDMETHOD(LeaveDeviceGroup)();
    2.64 -	STDMETHOD(DisableIdentityForSync)(struct pEpIdentity * ident);
    2.65 -	STDMETHOD(EnableIdentityForSync)(struct pEpIdentity * ident);
    2.66 +    // sync API
    2.67 +    STDMETHOD(DeliverHandshakeResult)(enum SyncHandshakeResult result, SAFEARRAY *identities_sharing);
    2.68 +    STDMETHOD(LeaveDeviceGroup)();
    2.69 +    STDMETHOD(DisableIdentityForSync)(struct pEpIdentity * ident);
    2.70 +    STDMETHOD(EnableIdentityForSync)(struct pEpIdentity * ident);
    2.71 +    STDMETHOD(GetIsSyncRunning)(VARIANT_BOOL *running);
    2.72  
    2.73 -	STDMETHOD(PERToXERSyncMessage)(TextMessage *msg, BSTR * xer);
    2.74 +    STDMETHOD(PERToXERSyncMessage)(TextMessage *msg, BSTR * xer);
    2.75  
    2.76 -	STDMETHOD(PerMachineDirectory)(BSTR * directory);
    2.77 -	STDMETHOD(PerUserDirectory)(BSTR * directory);
    2.78 +    STDMETHOD(PerMachineDirectory)(BSTR * directory);
    2.79 +    STDMETHOD(PerUserDirectory)(BSTR * directory);
    2.80  };
    2.81  
    2.82  OBJECT_ENTRY_AUTO(__uuidof(pEpEngine), CpEpEngine)
     3.1 --- a/pEpCOMServerAdapter.idl	Thu Nov 14 16:18:44 2019 +0100
     3.2 +++ b/pEpCOMServerAdapter.idl	Wed Nov 20 17:14:38 2019 +0100
     3.3 @@ -515,6 +515,9 @@
     3.4  
     3.5      // Converts a comm type to a pEp rating
     3.6      [id(59)] HRESULT RatingFromCommType([in] pEpComType commType, [out, retval] pEpRating * rating);
     3.7 +
     3.8 +    // Gets if sync is enabled
     3.9 +    [id(60)] HRESULT GetIsSyncRunning([out, retval] VARIANT_BOOL *running);
    3.10  };
    3.11  
    3.12  [