src/transport.h
author vb
Mon, 01 Sep 2014 13:02:23 +0200
changeset 23 dba569e54163
child 28 7fc9fc3e680c
permissions -rw-r--r--
adding the concepts of transports and cryptotech
     1 #pragma once
     2 
     3 #include "pEpEngine.h"
     4 
     5 typedef enum _PEP_transports {
     6     PEP_trans_auto = 0,
     7 //    PEP_trans_email = 1,
     8 //    PEP_trans_whatsapp = 2,
     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;