Browse Source

Expose ShowNotification for app

COM-121
Thomas 9 months ago
parent
commit
54086a715b
5 changed files with 18 additions and 0 deletions
  1. +6
    -0
      CpEpEngine.cpp
  2. +2
    -0
      CpEpEngine.h
  3. +5
    -0
      GateKeeper.cpp
  4. +2
    -0
      GateKeeper.h
  5. +3
    -0
      pEpCOMServerAdapter.idl

+ 6
- 0
CpEpEngine.cpp View File

@ -2111,4 +2111,10 @@ STDMETHODIMP CpEpEngine::ConfigPassphraseForNewKeys(VARIANT_BOOL enable, BSTR pa
return E_OUTOFMEMORY;
else
return FAIL(L"ConfigPassphraseForNewKeys", status);
}
STDMETHODIMP CpEpEngine::ShowNotification(BSTR title, BSTR message)
{
pEp::GateKeeper::gatekeeper()->show_notification(title, message);
return S_OK;
}

+ 2
- 0
CpEpEngine.h View File

@ -290,6 +290,8 @@ public:
STDMETHOD(PerMachineDirectory)(BSTR * directory);
STDMETHOD(PerUserDirectory)(BSTR * directory);
STDMETHOD(ShowNotification)(BSTR title, BSTR message);
};
OBJECT_ENTRY_AUTO(__uuidof(pEpEngine), CpEpEngine)

+ 5
- 0
GateKeeper.cpp View File

@ -666,6 +666,11 @@ namespace pEp {
hRSA = NULL;
}
void GateKeeper::show_notification(tstring title, tstring text)
{
mainWindow.ShowNotificationInfo(title, text);
}
GateKeeper *GateKeeper::the_gatekeeper = nullptr;
} // namespace pEp

+ 2
- 0
GateKeeper.h View File

@ -44,6 +44,8 @@ namespace pEp {
void disable_update();
void update_now();
void show_notification(tstring title, tstring text);
static GateKeeper *gatekeeper() { return the_gatekeeper; }
protected:


+ 3
- 0
pEpCOMServerAdapter.idl View File

@ -540,6 +540,9 @@ interface IpEpEngine : IUnknown {
// Passphrase enablement for newly-generated secret keys
[id(65)] HRESULT ConfigPassphraseForNewKeys([in] VARIANT_BOOL enable, [in] BSTR passphrase);
// Shows a notification in the notification tray
[id(66)] HRESULT ShowNotification([in] BSTR title, [in] BSTR message);
};
[


Loading…
Cancel
Save