CpEpEngine.cpp
changeset 292 2c8123bded5a
parent 291 9b14d293f6f1
child 294 b2fe2bac2db0
child 327 d7888d794fe8
     1.1 --- a/CpEpEngine.cpp	Mon Aug 20 11:32:32 2018 +0200
     1.2 +++ b/CpEpEngine.cpp	Fri Sep 07 14:22:12 2018 +0200
     1.3 @@ -1113,6 +1113,25 @@
     1.4      return S_OK;
     1.5  }
     1.6  
     1.7 +STDMETHODIMP CpEpEngine::OutgoingMessageRatingPreview(TextMessage *msg, pEpRating * pVal)
     1.8 +{
     1.9 +	assert(msg);
    1.10 +	assert(pVal);
    1.11 +
    1.12 +	if (!(msg  && pVal))
    1.13 +		return E_INVALIDARG;
    1.14 +
    1.15 +	::message *_msg = text_message_to_C(msg);
    1.16 +
    1.17 +	PEP_rating _rating;
    1.18 +	PEP_STATUS status = ::outgoing_message_rating_preview(get_session(), _msg, &_rating);
    1.19 +	if (status != PEP_STATUS_OK)
    1.20 +		return FAIL(L"cannot get message rating", status);
    1.21 +
    1.22 +	*pVal = (pEpRating)_rating;
    1.23 +	return S_OK;
    1.24 +}
    1.25 +
    1.26  STDMETHODIMP CpEpEngine::IdentityRating(struct pEpIdentity *ident, pEpRating * pVal)
    1.27  {
    1.28      ::pEp_identity *_ident;