diff --git a/src/user_interface.cc b/src/user_interface.cc index 44838be..47a9b54 100644 --- a/src/user_interface.cc +++ b/src/user_interface.cc @@ -59,7 +59,17 @@ namespace pEp { _throw_status(status); } - SYNC_EVENT UserInterface::retrieve_next_sync_event(void *management, time_t threshold) + PEP_rating UserInterface::get_key_rating_for_user(string user_id, string fpr) + { + PEP_rating result; + PEP_STATUS status = + ::get_key_rating_for_user(adapter.session(), + user_id.c_str(), fpr.c_str(), &result); + _throw_status(status); + return result; + } + + SYNC_EVENT UserInterface::retrieve_next_sync_event(void *management, unsigned threshold) { time_t started = time(nullptr); bool timeout = false; diff --git a/src/user_interface.hh b/src/user_interface.hh index 9aa3681..73df428 100644 --- a/src/user_interface.hh +++ b/src/user_interface.hh @@ -6,6 +6,7 @@ #include "pEpmodule.hh" #include #include +#include namespace pEp { namespace PythonAdapter { @@ -26,10 +27,12 @@ namespace pEp { virtual void deliverHandshakeResult( pEp::PythonAdapter::Identity partner, int result); + PEP_rating get_key_rating_for_user(string user_id, string fpr); + protected: static PEP_STATUS _notifyHandshake(pEp_identity *me, pEp_identity *partner, sync_handshake_signal signal); - static SYNC_EVENT retrieve_next_sync_event(void *management, time_t threshold); + static SYNC_EVENT retrieve_next_sync_event(void *management, unsigned threshold); }; class UserInterface_callback : public UserInterface {