generate_api
Volker Birk 5 years ago
parent 920596a759
commit b67cd478bf

@ -89,8 +89,8 @@ install: $(TARGET)
mkdir -p $(PREFIX)/include/pEp
cp -v pEpEngine.h keymanagement.h message_api.h dynamic_api.h stringlist.h \
timestamp.h identity_list.h bloblist.h stringpair.h message.h mime.h \
cryptotech.h sync.h sync_fsm.h sync_app.h blacklist.h pEp_string.h \
openpgp_compat.h $(PREFIX)/include/pEp/
cryptotech.h sync_api.h blacklist.h pEp_string.h openpgp_compat.h \
../asn.1/*.h $(PREFIX)/include/pEp/
.PHONY: uninstall
uninstall:

@ -106,7 +106,7 @@
#include "keymanagement.h"
#include "cryptotech.h"
#include "transport.h"
#include "sync.h"
#include "sync_api.h"
#include "Sync_func.h"
#define NOT_IMPLEMENTED assert(0); return PEP_UNKNOWN_ERROR;

@ -5,7 +5,6 @@
#include "message.h"
#include "Sync_event.h"
#ifdef __cplusplus
@ -75,6 +74,9 @@ DYNAMIC_API PEP_STATUS deliverHandshakeResult(
);
struct Sync_event;
typedef struct Sync_event *SYNC_EVENT;
// inject_sync_event - inject sync protocol message
//
// parameters:
@ -84,7 +86,7 @@ DYNAMIC_API PEP_STATUS deliverHandshakeResult(
// return value:
// 0 if event could be stored successfully or nonzero otherwise
typedef int (*inject_sync_event_t)(Sync_event_t *ev, void *management);
typedef int (*inject_sync_event_t)(SYNC_EVENT ev, void *management);
// retrieve_next_sync_event - receive next sync event
@ -95,7 +97,7 @@ typedef int (*inject_sync_event_t)(Sync_event_t *ev, void *management);
// return value:
// next event
typedef Sync_event_t *(*retrieve_next_sync_event_t)(void *management);
typedef SYNC_EVENT (*retrieve_next_sync_event_t)(void *management);
// register_sync_callbacks() - register adapter's callbacks

@ -27,10 +27,10 @@ tstylesheet {
extern "C" {
#endif
#include "../asn.1/«@name».h"
#include "«@name».h"
typedef struct _«@name»_event {
typedef struct «@name»_event {
«@name»_PR fsm;
int event;
«@name»_t *msg;
@ -532,6 +532,7 @@ tstylesheet {
// see LICENSE.txt
#include "«@name»_fsm.h"
#include <stdlib.h>
const char *«@name»_state_name(int state)
{

@ -20,7 +20,7 @@ int main(int argc, char* argv[]) {
PEP_SESSION session;
cout << "calling init()\n";
PEP_STATUS status = init(&session);
PEP_STATUS status = init(&session, NULL);
assert(status == PEP_STATUS_OK);
assert(session);
cout << "init() completed.\n";

@ -20,7 +20,7 @@ int main(int argc, char* argv[]) {
PEP_SESSION session;
cout << "calling init()\n";
PEP_STATUS status = init(&session);
PEP_STATUS status = init(&session, NULL);
assert(status == PEP_STATUS_OK);
assert(session);
cout << "init() completed.\n";

@ -96,14 +96,14 @@ int main(int argc, char* argv[])
PEP_SESSION session;
cout << "calling init()\n";
PEP_STATUS init_result = init(&session);
PEP_STATUS init_result = init(&session, NULL);
cout << "returning from init() with result == " << status(init_result) << endl;
assert(init_result == PEP_STATUS_OK);
PEP_SESSION second_session;
cout << "second session test\n";
PEP_STATUS second_init_result = init(&second_session);
PEP_STATUS second_init_result = init(&second_session, NULL);
cout << "returning from second init() with result == " << status(second_init_result) << endl;
assert(second_init_result == PEP_STATUS_OK);
assert(second_session);

@ -116,7 +116,7 @@ void EngineTestSuite::set_full_env() {
gpg_agent_conf(true);
// cout << "calling init()\n";
PEP_STATUS status = init(&session);
PEP_STATUS status = init(&session, NULL);
assert(status == PEP_STATUS_OK);
assert(session);
// cout << "init() completed.\n";

@ -186,10 +186,10 @@ const char* tl_status_string(PEP_STATUS status) {
return "PEP_CANNOT_SET_SEQUENCE_VALUE";
case PEP_OWN_SEQUENCE:
return "PEP_OWN_SEQUENCE";
case PEP_SYNC_STATEMACHINE_ERROR:
return "PEP_SYNC_STATEMACHINE_ERROR";
case PEP_SYNC_NO_TRUST:
return "PEP_SYNC_NO_TRUST";
case PEP_STATEMACHINE_ERROR:
return "PEP_STATEMACHINE_ERROR";
case PEP_NO_TRUST:
return "PEP_NO_TRUST";
case PEP_STATEMACHINE_INVALID_STATE:
return "PEP_STATEMACHINE_INVALID_STATE";
case PEP_STATEMACHINE_INVALID_EVENT:

Loading…
Cancel
Save