You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
880 B

8 years ago
8 years ago
  1. #pragma once
  2. #include "pEpEngine.h"
  3. typedef enum _PEP_transports {
  4. PEP_trans_auto = 0,
  5. // PEP_trans_email,
  6. // PEP_trans_whatsapp,
  7. PEP_trans__count
  8. } PEP_transports;
  9. typedef struct _PEP_transport_t PEP_transport_t;
  10. typedef PEP_STATUS (*sendto_t)(PEP_SESSION session, const pEp_identity *address, const char *shortmsg, const char *longmsg, const char *longmsg_formatted);
  11. 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);
  12. struct _PEP_transport_t {
  13. uint8_t id;
  14. sendto_t sendto;
  15. readnext_t readnext;
  16. };
  17. typedef uint64_t transports_mask;
  18. PEP_STATUS init_transport_system(PEP_SESSION session);
  19. void release_transport_system(PEP_SESSION session);