You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
1.1 KiB

// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#ifndef USER_INTERFACE_HH
#define USER_INTERFACE_HH
#include "adapter_main.hh"
#include "identity.hh"
namespace pEp {
namespace PythonAdapter {
class UserInterface {
static UserInterface *_ui;
public:
UserInterface();
virtual ~UserInterface();
virtual void notifyHandshake(Identity me, Identity partner, ::sync_handshake_signal signal) {
throw runtime_error("override this method");
}
virtual void deliverHandshakeResult(int result, bp::object identities);
// 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);
};
class UserInterface_callback : public UserInterface {
PyObject *_self;
public:
UserInterface_callback(PyObject *self);
~UserInterface_callback();
void notifyHandshake(Identity me, Identity partner, sync_handshake_signal signal);
};
} /* namespace PythonAdapter */
} /* namespace pEp */
#endif /* USER_INTERFACE_HH */