subrascasse

Sub Rascasse: an iPhone dive log for Subsurface cloud storage, with a pure-Swift git client (GPL-2.0)
git clone https://git.schurger.org/subrascasse.git
Log | Files | Refs | README | LICENSE

hdlc.h (1663B)


      1 /*
      2  * libdivecomputer
      3  *
      4  * Copyright (C) 2023 Jef Driesen
      5  *
      6  * This library is free software; you can redistribute it and/or
      7  * modify it under the terms of the GNU Lesser General Public
      8  * License as published by the Free Software Foundation; either
      9  * version 2.1 of the License, or (at your option) any later version.
     10  *
     11  * This library is distributed in the hope that it will be useful,
     12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14  * Lesser General Public License for more details.
     15  *
     16  * You should have received a copy of the GNU Lesser General Public
     17  * License along with this library; if not, write to the Free Software
     18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
     19  * MA 02110-1301 USA
     20  */
     21 
     22 #ifndef DC_HDLC_H
     23 #define DC_HDLC_H
     24 
     25 #include <libdivecomputer/common.h>
     26 #include <libdivecomputer/context.h>
     27 #include <libdivecomputer/iostream.h>
     28 
     29 #ifdef __cplusplus
     30 extern "C" {
     31 #endif /* __cplusplus */
     32 
     33 /**
     34  * Create a HDLC I/O stream layered on top of another base I/O stream.
     35  *
     36  * @param[out]  iostream    A location to store the HDLC I/O stream.
     37  * @param[in]   context     A valid context.
     38  * @param[in]   base        A valid I/O stream.
     39  * @param[in]   isize       The input packet size in bytes.
     40  * @param[in]   osize       The output packet size in bytes.
     41  * @returns #DC_STATUS_SUCCESS on success, or another #dc_status_t code
     42  * on failure.
     43  */
     44 dc_status_t
     45 dc_hdlc_open (dc_iostream_t **iostream, dc_context_t *context, dc_iostream_t *base, size_t isize, size_t osize);
     46 
     47 #ifdef __cplusplus
     48 }
     49 #endif /* __cplusplus */
     50 #endif /* DC_HDLC_H */