src/transport.h
changeset 23 dba569e54163
child 28 7fc9fc3e680c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/transport.h	Mon Sep 01 13:02:23 2014 +0200
     1.3 @@ -0,0 +1,24 @@
     1.4 +#pragma once
     1.5 +
     1.6 +#include "pEpEngine.h"
     1.7 +
     1.8 +typedef enum _PEP_transports {
     1.9 +    PEP_trans_auto = 0,
    1.10 +//    PEP_trans_email = 1,
    1.11 +//    PEP_trans_whatsapp = 2,
    1.12 +
    1.13 +    PEP_trans__count
    1.14 +} PEP_transports;
    1.15 +
    1.16 +typedef struct _PEP_transport_t PEP_transport_t;
    1.17 +
    1.18 +typedef PEP_STATUS (*sendto_t)(PEP_SESSION session, const pEp_identity *address, const char *shortmsg, const char *longmsg, const char *longmsg_formatted);
    1.19 +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);
    1.20 +
    1.21 +struct _PEP_transport_t {
    1.22 +    uint8_t id;
    1.23 +    sendto_t sendto;
    1.24 +    readnext_t readnext;
    1.25 +};
    1.26 +
    1.27 +typedef uint64_t transports_mask;