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.
 
 
 

53 lines
1.6 KiB

// This file is under GNU Affero General Public License 3.0
// see LICENSE.txt
#pragma once
#include <csetjmp>
#include <pEp/sync_api.h>
#include <pEp/message_api.h>
#include "pEpmodule.hh"
namespace pEp {
namespace PythonAdapter {
class UserInterface {
static UserInterface *_ui;
public:
UserInterface();
virtual ~UserInterface();
virtual void notifyHandshake(
pEp::PythonAdapter::Identity me,
pEp::PythonAdapter::Identity partner,
sync_handshake_signal signal)
{
throw runtime_error("override this method");
}
virtual void deliverHandshakeResult(int result, 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);
static SYNC_EVENT retrieve_next_sync_event(void *management, unsigned threshold);
};
class UserInterface_callback : public UserInterface {
PyObject *_self;
public:
UserInterface_callback(PyObject *self);
~UserInterface_callback();
void notifyHandshake(
pEp::PythonAdapter::Identity me,
pEp::PythonAdapter::Identity partner,
sync_handshake_signal signal);
};
}
}