src/transport.h
author vb
Mon, 01 Sep 2014 20:56:05 +0200
changeset 28 7fc9fc3e680c
parent 23 dba569e54163
child 29 31881fe94d3c
permissions -rw-r--r--
...
     1 #pragma once
     2 
     3 #include "pEpEngine.h"
     4 
     5 typedef enum _PEP_transports {
     6     PEP_trans_auto = 0,
     7 //    PEP_trans_email,
     8 //    PEP_trans_whatsapp,
     9 
    10     PEP_trans__count
    11 } PEP_transports;
    12 
    13 typedef struct _PEP_transport_t PEP_transport_t;
    14 
    15 typedef PEP_STATUS (*sendto_t)(PEP_SESSION session, const pEp_identity *address, const char *shortmsg, const char *longmsg, const char *longmsg_formatted);
    16 typedef PEP_STATUS (*readnext_t)(PEP_SESSION session, pEp_identity *from, pEp_identity *reached, char **shortmsg, size_t shortmsg_size, char ** longmsg, size_t longmsg_size, char ** longmsg_formatted, size_t longmsg_formatted_size, PEP_transport_t **via);
    17 
    18 struct _PEP_transport_t {
    19     uint8_t id;
    20     sendto_t sendto;
    21     readnext_t readnext;
    22 };
    23 
    24 typedef uint64_t transports_mask;
    25 
    26 PEP_STATUS init_transport_system(PEP_SESSION session);
    27 void release_transport_system(PEP_SESSION session);