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.
libpEpAdapter/Adapter.hh

41 lines
927 B

// This file is under GNU General Public License 3.0
// see LICENSE.txt
#pragma once
#include "locked_queue.hh"
#include <thread>
#include <functional>
#include <string>
#include <pEp/sync_api.h>
using namespace std;
namespace pEp {
void throw_status(PEP_STATUS status);
struct RuntimeError : runtime_error {
RuntimeError(string _text, PEP_STATUS _status);
string text;
PEP_STATUS status;
};
namespace Adapter {
template<class T> void startup(messageToSend_t messageToSend,
notifyHandshake_t notifyHandshake, T *obj = nullptr,
function< void (T *) > _startup = nullptr,
function< void (T *) > _shutdown = nullptr
);
enum session_action {
init,
release
};
PEP_SESSION session(session_action action = init);
void shutdown();
}
}
#include "Adapter.hxx"