Browse Source

update test_adapter.cc to use new pEpLog()

sync
heck 6 years ago
parent
commit
53beb9ba64
  1. 9
      test/test_adapter.cc

9
test/test_adapter.cc

@ -12,30 +12,29 @@ using namespace pEp::Adapter;
PEP_STATUS messageToSend(struct _message *msg) PEP_STATUS messageToSend(struct _message *msg)
{ {
cout << "calling messageToSend();\n"; pEpLog("called()");
return PEP_STATUS_OK; return PEP_STATUS_OK;
} }
PEP_STATUS notifyHandshake(pEp_identity *me, pEp_identity *partner, sync_handshake_signal signal) PEP_STATUS notifyHandshake(pEp_identity *me, pEp_identity *partner, sync_handshake_signal signal)
{ {
cout << "calling notifyHandshake();\n"; pEpLog("called()");
return PEP_STATUS_OK; return PEP_STATUS_OK;
} }
int main() int main()
{ {
cout << "updating or creating identity for me\n"; pEpLog("updating or creating identity for me");
pEp_identity *me = new_identity("alice@peptest.ch", NULL, "23", "Who the F* is Alice"); pEp_identity *me = new_identity("alice@peptest.ch", NULL, "23", "Who the F* is Alice");
assert(me); assert(me);
PEP_STATUS status = myself(session(), me); PEP_STATUS status = myself(session(), me);
free_identity(me); free_identity(me);
pEp::throw_status(status); pEp::throw_status(status);
cout << "starting the adapter including sync\n"; pEpLog("starting the adapter including sync");
startup(messageToSend, notifyHandshake); startup(messageToSend, notifyHandshake);
sleep(3); sleep(3);
shutdown(); shutdown();
return 0; return 0;
} }

Loading…
Cancel
Save