test/message_api_test.cc
author vb
Tue, 30 Dec 2014 13:04:17 +0100
changeset 39 66b5cc6cb987
child 40 3e7aa2f67b7e
permissions -rw-r--r--
...
     1 #include <iostream>
     2 #include <assert.h>
     3 #include "message_api.h"
     4 
     5 using namespace std;
     6 
     7 int main() {
     8     PEP_SESSION session;
     9     
    10     cout << "calling init()\n";
    11     PEP_STATUS status1 = init(&session);   
    12     assert(status1 == PEP_STATUS_OK);
    13     assert(session);
    14     cout << "init() completed.\n";
    15 
    16     pEp_identity * me = new_identity("outlooktest@dingens.org", NULL, "23", "Outlook Test");
    17     me->me = true;
    18     identity_list *to = new_identity_list(new_identity("vb@dingens.org", NULL, "42", "Volker Birk"));
    19 
    20     message *msg = new_message(PEP_dir_outgoing, me, to, "hello, world");
    21 
    22     free_message(msg);
    23 
    24     cout << "calling release()\n";
    25     release(session);
    26     return 0;
    27 }
    28