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

garmin.h (1893B)


      1 /*
      2  * Garmin Descent Mk1
      3  *
      4  * Copyright (C) 2018 Linus Torvalds
      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 GARMIN_H
     23 #define GARMIN_H
     24 
     25 #include <libdivecomputer/context.h>
     26 #include <libdivecomputer/iostream.h>
     27 #include <libdivecomputer/device.h>
     28 #include <libdivecomputer/parser.h>
     29 
     30 #ifdef __cplusplus
     31 extern "C" {
     32 #endif /* __cplusplus */
     33 
     34 dc_status_t
     35 garmin_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream, unsigned int model);
     36 
     37 dc_status_t
     38 garmin_parser_create (dc_parser_t **parser, dc_context_t *context, const unsigned char data[], size_t size);
     39 
     40 dc_status_t
     41 garmin_parser_get_device_info (dc_parser_t *abstract, dc_event_devinfo_t *devinfo);
     42 
     43 // we need to be able to call into the parser to check if the
     44 // files that we find are actual dives
     45 int
     46 garmin_parser_is_dive (dc_parser_t *abstract, dc_event_devinfo_t *devinfo_p);
     47 
     48 // The dive names are of the form "2018-08-20-10-23-30.fit"
     49 // With the terminating zero, that's 24 bytes.
     50 //
     51 // We use this as the fingerprint, but it ends up being a
     52 // special fixed header in the parser data too.
     53 #define FIT_NAME_SIZE 24
     54 
     55 #ifdef __cplusplus
     56 }
     57 #endif /* __cplusplus */
     58 #endif /* GARMIN_H */