From 3856a08ffe11a9b870dc267e8d36e37b9785cf47 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 24 Oct 2019 11:01:07 +0200 Subject: [PATCH] Wrap rating_from_comm_type() --- CpEpEngine.cpp | 10 ++++++++++ CpEpEngine.h | 1 + pEpCOMServerAdapter.idl | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CpEpEngine.cpp b/CpEpEngine.cpp index a9d4c6b..1fcd611 100644 --- a/CpEpEngine.cpp +++ b/CpEpEngine.cpp @@ -1969,3 +1969,13 @@ STDMETHODIMP CpEpEngine::PerUserDirectory(BSTR * directory) return S_OK; } + +STDMETHODIMP CpEpEngine::RatingFromCommType(pEpComType commType, pEpRating * rating) +{ + PEP_comm_type _comm_type = (PEP_comm_type)commType; + PEP_rating _rating = ::rating_from_comm_type(_comm_type); + + *rating = (pEpRating)_rating; + + return S_OK; +} diff --git a/CpEpEngine.h b/CpEpEngine.h index 700c7d3..e163fc2 100644 --- a/CpEpEngine.h +++ b/CpEpEngine.h @@ -251,6 +251,7 @@ public: STDMETHOD(OutgoingMessageRatingPreview)(TextMessage *msg, pEpRating * pVal); STDMETHOD(IdentityRating)(pEpIdentity * ident, pEpRating * pVal); STDMETHOD(ColorFromRating)(pEpRating rating, pEpColor * pVal); + STDMETHOD(RatingFromCommType)(pEpComType commType, pEpRating * rating); STDMETHOD(EncryptMessageForSelf)( pEpIdentity * targetId, diff --git a/pEpCOMServerAdapter.idl b/pEpCOMServerAdapter.idl index 7b7530f..4c98525 100644 --- a/pEpCOMServerAdapter.idl +++ b/pEpCOMServerAdapter.idl @@ -511,7 +511,10 @@ interface IpEpEngine : IUnknown { [id(57)] HRESULT PerMachineDirectory([out, retval] BSTR *directory); // Gets the directory for user files - [id(58)] HRESULT PerUserDirectory([out, retval] BSTR *directory); + [id(58)] HRESULT PerUserDirectory([out, retval] BSTR *directory); + + // Converts a comm type to a pEp rating + [id(59)] HRESULT RatingFromCommType([in] pEpComType commType, [out, retval] pEpRating * rating); }; [