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

common.h (3946B)


      1 /*
      2  * libdivecomputer
      3  *
      4  * Copyright (C) 2011 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_COMMON_H
     23 #define DC_COMMON_H
     24 
     25 #ifdef __cplusplus
     26 extern "C" {
     27 #endif /* __cplusplus */
     28 
     29 typedef enum dc_status_t {
     30 	DC_STATUS_SUCCESS = 0,
     31 	DC_STATUS_DONE = 1,
     32 	DC_STATUS_UNSUPPORTED = -1,
     33 	DC_STATUS_INVALIDARGS = -2,
     34 	DC_STATUS_NOMEMORY = -3,
     35 	DC_STATUS_NODEVICE = -4,
     36 	DC_STATUS_NOACCESS = -5,
     37 	DC_STATUS_IO = -6,
     38 	DC_STATUS_TIMEOUT = -7,
     39 	DC_STATUS_PROTOCOL = -8,
     40 	DC_STATUS_DATAFORMAT = -9,
     41 	DC_STATUS_CANCELLED = -10
     42 } dc_status_t;
     43 
     44 typedef enum dc_transport_t {
     45 	DC_TRANSPORT_NONE      = 0,
     46 	DC_TRANSPORT_SERIAL    = (1 << 0),
     47 	DC_TRANSPORT_USB       = (1 << 1),
     48 	DC_TRANSPORT_USBHID    = (1 << 2),
     49 	DC_TRANSPORT_IRDA      = (1 << 3),
     50 	DC_TRANSPORT_BLUETOOTH = (1 << 4),
     51 	DC_TRANSPORT_BLE       = (1 << 5),
     52 	DC_TRANSPORT_USBSTORAGE= (1 << 6),
     53 } dc_transport_t;
     54 
     55 // Idiotic enums can't be queried
     56 #define DC_TRANSPORT_USBSTORAGE DC_TRANSPORT_USBSTORAGE
     57 
     58 typedef enum dc_family_t {
     59 	DC_FAMILY_NULL = 0,
     60 	/* Suunto */
     61 	DC_FAMILY_SUUNTO_SOLUTION = (1 << 16),
     62 	DC_FAMILY_SUUNTO_EON,
     63 	DC_FAMILY_SUUNTO_VYPER,
     64 	DC_FAMILY_SUUNTO_VYPER2,
     65 	DC_FAMILY_SUUNTO_D9,
     66 	DC_FAMILY_SUUNTO_EONSTEEL,
     67 	/* Reefnet */
     68 	DC_FAMILY_REEFNET_SENSUS = (2 << 16),
     69 	DC_FAMILY_REEFNET_SENSUSPRO,
     70 	DC_FAMILY_REEFNET_SENSUSULTRA,
     71 	/* Uwatec */
     72 	DC_FAMILY_UWATEC_ALADIN = (3 << 16),
     73 	DC_FAMILY_UWATEC_MEMOMOUSE,
     74 	DC_FAMILY_UWATEC_SMART,
     75 	DC_FAMILY_UWATEC_MERIDIAN, /* Deprecated: integrated into the Uwatec Smart family. */
     76 	DC_FAMILY_UWATEC_G2, /* Deprecated: integrated into the Uwatec Smart family. */
     77 	/* Oceanic */
     78 	DC_FAMILY_OCEANIC_VTPRO = (4 << 16),
     79 	DC_FAMILY_OCEANIC_VEO250,
     80 	DC_FAMILY_OCEANIC_ATOM2,
     81 	DC_FAMILY_PELAGIC_I330R,
     82 	/* Mares */
     83 	DC_FAMILY_MARES_NEMO = (5 << 16),
     84 	DC_FAMILY_MARES_PUCK,
     85 	DC_FAMILY_MARES_DARWIN,
     86 	DC_FAMILY_MARES_ICONHD,
     87 	/* Heinrichs Weikamp */
     88 	DC_FAMILY_HW_OSTC = (6 << 16),
     89 	DC_FAMILY_HW_FROG,
     90 	DC_FAMILY_HW_OSTC3,
     91 	/* Cressi */
     92 	DC_FAMILY_CRESSI_EDY = (7 << 16),
     93 	DC_FAMILY_CRESSI_LEONARDO,
     94 	DC_FAMILY_CRESSI_GOA,
     95 	/* Zeagle */
     96 	DC_FAMILY_ZEAGLE_N2ITION3 = (8 << 16),
     97 	/* Atomic Aquatics */
     98 	DC_FAMILY_ATOMICS_COBALT = (9 << 16),
     99 	/* Shearwater */
    100 	DC_FAMILY_SHEARWATER_PREDATOR = (10 << 16),
    101 	DC_FAMILY_SHEARWATER_PETREL,
    102 	/* Dive Rite */
    103 	DC_FAMILY_DIVERITE_NITEKQ = (11 << 16),
    104 	/* Citizen */
    105 	DC_FAMILY_CITIZEN_AQUALAND = (12 << 16),
    106 	/* DiveSystem */
    107 	DC_FAMILY_DIVESYSTEM_IDIVE = (13 << 16),
    108 	/* Cochran */
    109 	DC_FAMILY_COCHRAN_COMMANDER = (14 << 16),
    110 	/* Tecdiving */
    111 	DC_FAMILY_TECDIVING_DIVECOMPUTEREU = (15 << 16),
    112 	/* McLean */
    113 	DC_FAMILY_MCLEAN_EXTREME = (16 << 16),
    114 	/* Liquivision */
    115 	DC_FAMILY_LIQUIVISION_LYNX = (17 << 16),
    116 	/* Sporasub */
    117 	DC_FAMILY_SPORASUB_SP2 = (18 << 16),
    118 	/* Deep Six */
    119 	DC_FAMILY_DEEPSIX_EXCURSION = (19 << 16),
    120 	/* Seac Screen */
    121 	DC_FAMILY_SEAC_SCREEN = (20 << 16),
    122 	/* Deepblu Cosmiq */
    123 	DC_FAMILY_DEEPBLU_COSMIQ = (21 << 16),
    124 	/* Oceans S1 */
    125 	DC_FAMILY_OCEANS_S1 = (22 << 16),
    126 	/* Divesoft Freedom */
    127 	DC_FAMILY_DIVESOFT_FREEDOM = (23 << 16),
    128 	/* Halcyon Symbios */
    129 	DC_FAMILY_HALCYON_SYMBIOS = (24 << 16),
    130 
    131 	// Not merged upstream yet
    132 	/* Garmin */
    133 	DC_FAMILY_GARMIN = (100 << 16),
    134 } dc_family_t;
    135 
    136 #ifdef __cplusplus
    137 }
    138 #endif /* __cplusplus */
    139 #endif /* DC_COMMON_H */