src/transport.c
author Krista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 30 Jun 2020 14:56:25 +0200
branchdoxygen_doc
changeset 4792 7056435ab9e7
parent 1513 e7f7e42385b5
permissions -rw-r--r--
some doxygen stuff. might not be kept.
     1 /** @file */
     2 /** @brief File description for doxygen missing. FIXME */
     3 
     4 // This file is under GNU General Public License 3.0
     5 // see LICENSE.txt
     6 
     7 #include "pEp_internal.h"
     8 #include "trans_auto.h"
     9 
    10 #include <memory.h>
    11 #include <assert.h>
    12 
    13 PEP_transport_t transports[PEP_trans__count];
    14     
    15 PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
    16 {
    17     assert(session);
    18     session->transports = transports;
    19 
    20     if (in_first) {
    21         assert(PEP_trans__count == 1);
    22         memset(transports, 0, sizeof(PEP_transport_t) * PEP_trans__count);
    23 
    24         transports[PEP_trans_auto].id = PEP_trans_auto;
    25         transports[PEP_trans_auto].sendto = auto_sendto;
    26         transports[PEP_trans_auto].readnext = auto_readnext;
    27     }
    28 
    29     return PEP_STATUS_OK;
    30 }
    31 
    32 void release_transport_system(PEP_SESSION session, bool out_last)
    33 {
    34     assert(session);
    35     // nothing yet
    36 }
    37