Expose ShowNotification for app
authorThomas
Fri, 10 Jul 2020 07:45:52 +0200
changeset 44718a75cc8b45f
parent 446 ac4959ab3949
child 448 409157799a91
child 449 ef89f31611af
Expose ShowNotification for app
CpEpEngine.cpp
CpEpEngine.h
GateKeeper.cpp
GateKeeper.h
pEpCOMServerAdapter.idl
     1.1 --- a/CpEpEngine.cpp	Tue Jul 07 11:29:37 2020 +0200
     1.2 +++ b/CpEpEngine.cpp	Fri Jul 10 07:45:52 2020 +0200
     1.3 @@ -2111,4 +2111,10 @@
     1.4          return E_OUTOFMEMORY;
     1.5      else
     1.6          return FAIL(L"ConfigPassphraseForNewKeys", status);
     1.7 +}
     1.8 +
     1.9 +STDMETHODIMP CpEpEngine::ShowNotification(BSTR title, BSTR message) 
    1.10 +{
    1.11 +    pEp::GateKeeper::gatekeeper()->show_notification(title, message);
    1.12 +    return S_OK;
    1.13  }
    1.14 \ No newline at end of file
     2.1 --- a/CpEpEngine.h	Tue Jul 07 11:29:37 2020 +0200
     2.2 +++ b/CpEpEngine.h	Fri Jul 10 07:45:52 2020 +0200
     2.3 @@ -290,6 +290,8 @@
     2.4  
     2.5      STDMETHOD(PerMachineDirectory)(BSTR * directory);
     2.6      STDMETHOD(PerUserDirectory)(BSTR * directory);
     2.7 +
     2.8 +    STDMETHOD(ShowNotification)(BSTR title, BSTR message);
     2.9  };
    2.10  
    2.11  OBJECT_ENTRY_AUTO(__uuidof(pEpEngine), CpEpEngine)
     3.1 --- a/GateKeeper.cpp	Tue Jul 07 11:29:37 2020 +0200
     3.2 +++ b/GateKeeper.cpp	Fri Jul 10 07:45:52 2020 +0200
     3.3 @@ -666,6 +666,11 @@
     3.4          hRSA = NULL;
     3.5      }
     3.6  
     3.7 +    void GateKeeper::show_notification(tstring title, tstring text) 
     3.8 +    {
     3.9 +        mainWindow.ShowNotificationInfo(title, text);
    3.10 +    }
    3.11 +
    3.12      GateKeeper *GateKeeper::the_gatekeeper = nullptr;
    3.13  
    3.14  } // namespace pEp
     4.1 --- a/GateKeeper.h	Tue Jul 07 11:29:37 2020 +0200
     4.2 +++ b/GateKeeper.h	Fri Jul 10 07:45:52 2020 +0200
     4.3 @@ -44,6 +44,8 @@
     4.4          void disable_update();
     4.5          void update_now();
     4.6  
     4.7 +        void show_notification(tstring title, tstring text);
     4.8 +
     4.9  		static GateKeeper *gatekeeper() { return the_gatekeeper; }
    4.10  
    4.11      protected:
     5.1 --- a/pEpCOMServerAdapter.idl	Tue Jul 07 11:29:37 2020 +0200
     5.2 +++ b/pEpCOMServerAdapter.idl	Fri Jul 10 07:45:52 2020 +0200
     5.3 @@ -540,6 +540,9 @@
     5.4  
     5.5      // Passphrase enablement for newly-generated secret keys
     5.6      [id(65)] HRESULT ConfigPassphraseForNewKeys([in] VARIANT_BOOL enable, [in] BSTR passphrase);
     5.7 +
     5.8 +    // Shows a notification in the notification tray
     5.9 +    [id(66)] HRESULT ShowNotification([in] BSTR title, [in] BSTR message);
    5.10  };
    5.11  
    5.12  [