Browse Source

adding configure_transport

master
Volker Birk 2 months ago
parent
commit
cac5418227
4 changed files with 23 additions and 0 deletions
  1. +7
    -0
      src/trans_auto.c
  2. +3
    -0
      src/trans_auto.h
  3. +1
    -0
      src/transport.c
  4. +12
    -0
      src/transport.h

+ 7
- 0
src/trans_auto.c View File

@ -6,6 +6,13 @@
#include "trans_auto.h"
PEP_STATUS auto_configure(PEP_transport_t *transport,
transport_config_t *config, PEP_transport_status_code *tsc)
{
return PEP_STATUS_OK;
}
PEP_STATUS auto_startup(PEP_transport_t *transport,
PEP_transport_status_code *tsc)
{


+ 3
- 0
src/trans_auto.h View File

@ -9,6 +9,9 @@
#include "transport.h"
PEP_STATUS auto_configure(PEP_transport_t *transport,
transport_config_t *config, PEP_transport_status_code *tsc);
PEP_STATUS auto_startup(PEP_transport_t *transport,
PEP_transport_status_code *tsc);


+ 1
- 0
src/transport.c View File

@ -24,6 +24,7 @@ PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
transports[PEP_trans_auto].id = PEP_trans_auto;
transports[PEP_trans_auto].uri_scheme = "";
transports[PEP_trans_auto].configure = auto_configure;
transports[PEP_trans_auto].startup = auto_startup;
transports[PEP_trans_auto].shutdown = auto_shutdown;


+ 12
- 0
src/transport.h View File

@ -30,6 +30,14 @@ typedef enum _PEP_transport_id {
PEP_trans_CC = 0xfe
} PEP_transport_id;
typedef struct _transport_config {
// set size field when initializing
size_t size;
// expand here
// in C++ this must be POD
} transport_config_t;
// transports are delivering the transport status code
// this is defined here:
// https://dev.pep.foundation/Engine/TransportStatusCode
@ -40,6 +48,9 @@ typedef struct _PEP_transport_t PEP_transport_t;
// functions offered by transport
typedef PEP_STATUS (*configure_transport_t)(PEP_transport_t *transport,
transport_config_t *config, PEP_transport_status_code *tsc);
typedef PEP_STATUS (*startup_transport_t)(PEP_transport_t *transport,
PEP_transport_status_code *tsc);
@ -79,6 +90,7 @@ struct _PEP_transport_t {
// functions offered by transport
configure_transport_t configure;
startup_transport_t startup;
shutdown_transport_t shutdown;


Loading…
Cancel
Save