CpEpEngine.cpp
branchENGINE-179
changeset 249 2ac6226ff198
parent 246 3b4c910af3be
child 250 9b03d0b58aab
     1.1 --- a/CpEpEngine.cpp	Fri Apr 21 17:11:50 2017 +0200
     1.2 +++ b/CpEpEngine.cpp	Wed Jun 07 13:49:37 2017 +0200
     1.3 @@ -944,6 +944,31 @@
     1.4      return S_OK;
     1.5  }
     1.6  
     1.7 +STDMETHODIMP CpEpEngine::ReEvaluateMessageRating(TextMessage * msg, SAFEARRAY * x_keylist, pEpRating x_enc_status, pEpRating *rating)
     1.8 +{
     1.9 +    assert(msg);
    1.10 +    assert(x_keylist);
    1.11 +    assert(x_enc_status != PEP_rating_undefined);
    1.12 +    assert(rating);
    1.13 +
    1.14 +    if (!(msg && x_keylist && x_enc_status != PEP_rating_undefined && rating))
    1.15 +        return E_INVALIDARG;
    1.16 +
    1.17 +    *rating = pEpRatingUndefined;
    1.18 +
    1.19 +    ::message *_msg = text_message_to_C(msg);
    1.20 +    ::stringlist_t *_keylist = new_stringlist(x_keylist);
    1.21 +    ::PEP_rating _rating = PEP_rating_undefined;
    1.22 +
    1.23 +    PEP_STATUS status = ::re_evaluate_message_rating(get_session(), _msg, _keylist, x_enc_status, &_rating);
    1.24 +
    1.25 +    ::free_message(_msg);
    1.26 +
    1.27 +    *rating = (pEpRating)_rating;
    1.28 +
    1.29 +    return S_OK;
    1.30 +}
    1.31 +
    1.32  STDMETHODIMP CpEpEngine::OutgoingMessageRating(TextMessage *msg, pEpRating * pVal)
    1.33  {
    1.34      assert(msg);