diff --git a/include/libdivecomputer/Makefile.am b/include/libdivecomputer/Makefile.am
index e11ca4e..82ba21f 100644
--- a/include/libdivecomputer/Makefile.am
+++ b/include/libdivecomputer/Makefile.am
@@ -10,50 +10,16 @@ libdivecomputer_HEADERS = \
parser.h \
datetime.h \
units.h \
- suunto.h \
- suunto_solution.h \
suunto_eon.h \
- suunto_eonsteel.h \
- suunto_vyper.h \
suunto_vyper2.h \
suunto_d9.h \
- reefnet.h \
reefnet_sensus.h \
reefnet_sensuspro.h \
reefnet_sensusultra.h \
- uwatec.h \
- uwatec_aladin.h \
- uwatec_memomouse.h \
- uwatec_smart.h \
- uwatec_meridian.h \
- oceanic.h \
oceanic_atom2.h \
oceanic_veo250.h \
oceanic_vtpro.h \
- mares.h \
- mares_nemo.h \
- mares_puck.h \
- mares_darwin.h \
- mares_iconhd.h \
- hw.h \
hw_ostc.h \
hw_frog.h \
hw_ostc3.h \
- cressi.h \
- cressi_edy.h \
- cressi_leonardo.h \
- zeagle.h \
- zeagle_n2ition3.h \
- atomics.h \
- atomics_cobalt.h \
- shearwater.h \
- shearwater_petrel.h \
- shearwater_predator.h \
- diverite.h \
- diverite_nitekq.h \
- citizen.h \
- citizen_aqualand.h \
- divesystem.h \
- divesystem_idive.h \
- cochran.h \
- cochran_commander.h
+ atomics_cobalt.h
diff --git a/include/libdivecomputer/atomics_cobalt.h b/include/libdivecomputer/atomics_cobalt.h
index b8a36ca..5afb1c1 100644
--- a/include/libdivecomputer/atomics_cobalt.h
+++ b/include/libdivecomputer/atomics_cobalt.h
@@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
-#ifndef ATOMICS_COBALT_H
-#define ATOMICS_COBALT_H
+#ifndef DC_ATOMICS_COBALT_H
+#define DC_ATOMICS_COBALT_H
-#include "context.h"
+#include "common.h"
#include "device.h"
#include "parser.h"
@@ -30,22 +30,16 @@
extern "C" {
#endif /* __cplusplus */
-dc_status_t
-atomics_cobalt_device_open (dc_device_t **device, dc_context_t *context);
-
dc_status_t
atomics_cobalt_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
atomics_cobalt_device_set_simulation (dc_device_t *device, unsigned int simulation);
-dc_status_t
-atomics_cobalt_parser_create (dc_parser_t **parser, dc_context_t *context);
-
dc_status_t
atomics_cobalt_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* ATOMICS_COBALT_H */
+#endif /* DC_ATOMICS_COBALT_H */
diff --git a/include/libdivecomputer/citizen.h b/include/libdivecomputer/citizen.h
deleted file mode 100644
index 01b7027..0000000
--- a/include/libdivecomputer/citizen.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2014 Jef Driesen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef CITIZEN_H
-#define CITIZEN_H
-
-#include "citizen_aqualand.h"
-
-#endif /* CITIZEN_H */
diff --git a/include/libdivecomputer/cochran.h b/include/libdivecomputer/cochran.h
deleted file mode 100644
index a2a0962..0000000
--- a/include/libdivecomputer/cochran.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2014 John Van Ostrand
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef COCHRAN_H
-#define COCHRAN_H
-
-#include "cochran_commander.h"
-
-#endif /* COCHRAN_H */
diff --git a/include/libdivecomputer/cressi.h b/include/libdivecomputer/cressi.h
deleted file mode 100644
index 8bcb7ac..0000000
--- a/include/libdivecomputer/cressi.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2009 Jef Driesen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef CRESSI_H
-#define CRESSI_H
-
-#include "cressi_edy.h"
-#include "cressi_leonardo.h"
-
-#endif /* CRESSI_H */
diff --git a/include/libdivecomputer/divesystem.h b/include/libdivecomputer/divesystem.h
deleted file mode 100644
index 080fa52..0000000
--- a/include/libdivecomputer/divesystem.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2014 Jef Driesen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef DIVESYSTEM_H
-#define DIVESYSTEM_H
-
-#include "divesystem_idive.h"
-
-#endif /* DIVESYSTEM_H */
diff --git a/include/libdivecomputer/hw_frog.h b/include/libdivecomputer/hw_frog.h
index a831ba4..67f624f 100644
--- a/include/libdivecomputer/hw_frog.h
+++ b/include/libdivecomputer/hw_frog.h
@@ -19,13 +19,12 @@
* MA 02110-1301 USA
*/
-#ifndef HW_FROG_H
-#define HW_FROG_H
+#ifndef DC_HW_FROG_H
+#define DC_HW_FROG_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
-#include "buffer.h"
+#include "datetime.h"
#ifdef __cplusplus
extern "C" {
@@ -34,9 +33,6 @@ extern "C" {
#define HW_FROG_DISPLAY_SIZE 15
#define HW_FROG_CUSTOMTEXT_SIZE 13
-dc_status_t
-hw_frog_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
hw_frog_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
@@ -52,4 +48,4 @@ hw_frog_device_customtext (dc_device_t *device, const char *text);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* HW_FROG_H */
+#endif /* DC_HW_FROG_H */
diff --git a/include/libdivecomputer/hw_ostc.h b/include/libdivecomputer/hw_ostc.h
index 2b293e2..b68e083 100644
--- a/include/libdivecomputer/hw_ostc.h
+++ b/include/libdivecomputer/hw_ostc.h
@@ -19,12 +19,12 @@
* MA 02110-1301 USA
*/
-#ifndef HW_OSTC_H
-#define HW_OSTC_H
+#ifndef DC_HW_OSTC_H
+#define DC_HW_OSTC_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
+#include "datetime.h"
#include "buffer.h"
#ifdef __cplusplus
@@ -40,9 +40,6 @@ typedef enum hw_ostc_format_t {
HW_OSTC_FORMAT_RGB24
} hw_ostc_format_t;
-dc_status_t
-hw_ostc_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
hw_ostc_device_md2hash (dc_device_t *device, unsigned char data[], unsigned int size);
@@ -61,16 +58,10 @@ hw_ostc_device_reset (dc_device_t *device);
dc_status_t
hw_ostc_device_screenshot (dc_device_t *device, dc_buffer_t *buffer, hw_ostc_format_t format);
-dc_status_t
-hw_ostc_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
-
-dc_status_t
-hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int hwos);
-
dc_status_t
hw_ostc_device_fwupdate (dc_device_t *abstract, const char *filename);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* HW_OSTC_H */
+#endif /* DC_HW_OSTC_H */
diff --git a/include/libdivecomputer/hw_ostc3.h b/include/libdivecomputer/hw_ostc3.h
index 56244ed..bd0d2ed 100644
--- a/include/libdivecomputer/hw_ostc3.h
+++ b/include/libdivecomputer/hw_ostc3.h
@@ -19,13 +19,12 @@
* MA 02110-1301 USA
*/
-#ifndef HW_OSTC3_H
-#define HW_OSTC3_H
+#ifndef DC_HW_OSTC3_H
+#define DC_HW_OSTC3_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
-#include "buffer.h"
+#include "datetime.h"
#ifdef __cplusplus
extern "C" {
@@ -34,9 +33,6 @@ extern "C" {
#define HW_OSTC3_DISPLAY_SIZE 16
#define HW_OSTC3_CUSTOMTEXT_SIZE 60
-dc_status_t
-hw_ostc3_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
hw_ostc3_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
@@ -64,10 +60,7 @@ hw_ostc3_device_config_reset (dc_device_t *abstract);
dc_status_t
hw_ostc3_device_fwupdate (dc_device_t *abstract, const char *filename);
-dc_status_t
-hw_ostc3_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* HW_OSTC3_H */
+#endif /* DC_HW_OSTC3_H */
diff --git a/include/libdivecomputer/mares.h b/include/libdivecomputer/mares.h
deleted file mode 100644
index c7af850..0000000
--- a/include/libdivecomputer/mares.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2008 Jef Driesen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef MARES_H
-#define MARES_H
-
-#include "mares_nemo.h"
-#include "mares_puck.h"
-#include "mares_darwin.h"
-#include "mares_iconhd.h"
-
-#endif /* MARES_H */
diff --git a/include/libdivecomputer/oceanic_atom2.h b/include/libdivecomputer/oceanic_atom2.h
index 4cae707..68481d2 100644
--- a/include/libdivecomputer/oceanic_atom2.h
+++ b/include/libdivecomputer/oceanic_atom2.h
@@ -19,33 +19,23 @@
* MA 02110-1301 USA
*/
-#ifndef OCEANIC_ATOM2_H
-#define OCEANIC_ATOM2_H
+#ifndef DC_OCEANIC_ATOM2_H
+#define DC_OCEANIC_ATOM2_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-dc_status_t
-oceanic_atom2_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
-dc_status_t
-oceanic_atom2_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
-
dc_status_t
oceanic_atom2_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
oceanic_atom2_device_keepalive (dc_device_t *device);
-dc_status_t
-oceanic_atom2_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* OCEANIC_ATOM2_H */
+#endif /* DC_OCEANIC_ATOM2_H */
diff --git a/include/libdivecomputer/oceanic_veo250.h b/include/libdivecomputer/oceanic_veo250.h
index aaeee46..e7ade87 100644
--- a/include/libdivecomputer/oceanic_veo250.h
+++ b/include/libdivecomputer/oceanic_veo250.h
@@ -19,30 +19,23 @@
* MA 02110-1301 USA
*/
-#ifndef OCEANIC_VEO250_H
-#define OCEANIC_VEO250_H
+#ifndef DC_OCEANIC_VEO250_H
+#define DC_OCEANIC_VEO250_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-dc_status_t
-oceanic_veo250_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
oceanic_veo250_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
oceanic_veo250_device_keepalive (dc_device_t *device);
-dc_status_t
-oceanic_veo250_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* OCEANIC_VEO250_H */
+#endif /* DC_OCEANIC_VEO250_H */
diff --git a/include/libdivecomputer/oceanic_vtpro.h b/include/libdivecomputer/oceanic_vtpro.h
index f6d2a64..6357763 100644
--- a/include/libdivecomputer/oceanic_vtpro.h
+++ b/include/libdivecomputer/oceanic_vtpro.h
@@ -19,36 +19,23 @@
* MA 02110-1301 USA
*/
-#ifndef OCEANIC_VTPRO_H
-#define OCEANIC_VTPRO_H
+#ifndef DC_OCEANIC_VTPRO_H
+#define DC_OCEANIC_VTPRO_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-dc_status_t
-oceanic_vtpro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
-dc_status_t
-oceanic_vtpro_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
-
dc_status_t
oceanic_vtpro_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
oceanic_vtpro_device_keepalive (dc_device_t *device);
-dc_status_t
-oceanic_vtpro_parser_create (dc_parser_t **parser, dc_context_t *context);
-
-dc_status_t
-oceanic_vtpro_parser_create2 (dc_parser_t **parser, dc_context_t *context, unsigned int model);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* OCEANIC_VTPRO_H */
+#endif /* DC_OCEANIC_VTPRO_H */
diff --git a/include/libdivecomputer/reefnet_sensus.h b/include/libdivecomputer/reefnet_sensus.h
index 96ff5ba..583d9af 100644
--- a/include/libdivecomputer/reefnet_sensus.h
+++ b/include/libdivecomputer/reefnet_sensus.h
@@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
-#ifndef REEFNET_SENSUS_H
-#define REEFNET_SENSUS_H
+#ifndef DC_REEFNET_SENSUS_H
+#define DC_REEFNET_SENSUS_H
-#include "context.h"
+#include "common.h"
#include "device.h"
#include "parser.h"
@@ -32,22 +32,13 @@ extern "C" {
#define REEFNET_SENSUS_HANDSHAKE_SIZE 10
-dc_status_t
-reefnet_sensus_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
reefnet_sensus_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
-dc_status_t
-reefnet_sensus_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
-
-dc_status_t
-reefnet_sensus_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
-
dc_status_t
reefnet_sensus_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* REEFNET_SENSUS_H */
+#endif /* DC_REEFNET_SENSUS_H */
diff --git a/include/libdivecomputer/reefnet_sensuspro.h b/include/libdivecomputer/reefnet_sensuspro.h
index e092fef..a92966f 100644
--- a/include/libdivecomputer/reefnet_sensuspro.h
+++ b/include/libdivecomputer/reefnet_sensuspro.h
@@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
-#ifndef REEFNET_SENSUSPRO_H
-#define REEFNET_SENSUSPRO_H
+#ifndef DC_REEFNET_SENSUSPRO_H
+#define DC_REEFNET_SENSUSPRO_H
-#include "context.h"
+#include "common.h"
#include "device.h"
#include "parser.h"
@@ -32,25 +32,16 @@ extern "C" {
#define REEFNET_SENSUSPRO_HANDSHAKE_SIZE 10
-dc_status_t
-reefnet_sensuspro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
reefnet_sensuspro_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
reefnet_sensuspro_device_write_interval (dc_device_t *device, unsigned char interval);
-dc_status_t
-reefnet_sensuspro_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
-
-dc_status_t
-reefnet_sensuspro_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
-
dc_status_t
reefnet_sensuspro_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* REEFNET_SENSUSPRO_H */
+#endif /* DC_REEFNET_SENSUSPRO_H */
diff --git a/include/libdivecomputer/reefnet_sensusultra.h b/include/libdivecomputer/reefnet_sensusultra.h
index 72d1ed6..c5a8944 100644
--- a/include/libdivecomputer/reefnet_sensusultra.h
+++ b/include/libdivecomputer/reefnet_sensusultra.h
@@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
-#ifndef REEFNET_SENSUSULTRA_H
-#define REEFNET_SENSUSULTRA_H
+#ifndef DC_REEFNET_SENSUSULTRA_H
+#define DC_REEFNET_SENSUSULTRA_H
-#include "context.h"
+#include "common.h"
#include "device.h"
#include "parser.h"
@@ -41,9 +41,6 @@ typedef enum reefnet_sensusultra_parameter_t {
REEFNET_SENSUSULTRA_PARAMETER_AVERAGING
} reefnet_sensusultra_parameter_t;
-dc_status_t
-reefnet_sensusultra_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
reefnet_sensusultra_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
@@ -59,16 +56,10 @@ reefnet_sensusultra_device_write_parameter (dc_device_t *device, reefnet_sensusu
dc_status_t
reefnet_sensusultra_device_sense (dc_device_t *device, unsigned char data[], unsigned int size);
-dc_status_t
-reefnet_sensusultra_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
-
-dc_status_t
-reefnet_sensusultra_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
-
dc_status_t
reefnet_sensusultra_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* REEFNET_SENSUSULTRA_H */
+#endif /* DC_REEFNET_SENSUSULTRA_H */
diff --git a/include/libdivecomputer/suunto_d9.h b/include/libdivecomputer/suunto_d9.h
index d177c6c..dbea025 100644
--- a/include/libdivecomputer/suunto_d9.h
+++ b/include/libdivecomputer/suunto_d9.h
@@ -19,12 +19,11 @@
* MA 02110-1301 USA
*/
-#ifndef SUUNTO_D9_H
-#define SUUNTO_D9_H
+#ifndef DC_SUUNTO_D9_H
+#define DC_SUUNTO_D9_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
#ifdef __cplusplus
extern "C" {
@@ -32,19 +31,13 @@ extern "C" {
#define SUUNTO_D9_VERSION_SIZE 0x04
-dc_status_t
-suunto_d9_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
-
dc_status_t
suunto_d9_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
suunto_d9_device_reset_maxdepth (dc_device_t *device);
-dc_status_t
-suunto_d9_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* SUUNTO_D9_H */
+#endif /* DC_SUUNTO_D9_H */
diff --git a/include/libdivecomputer/suunto_eon.h b/include/libdivecomputer/suunto_eon.h
index 3ee1277..aeacdb3 100644
--- a/include/libdivecomputer/suunto_eon.h
+++ b/include/libdivecomputer/suunto_eon.h
@@ -19,12 +19,11 @@
* MA 02110-1301 USA
*/
-#ifndef SUUNTO_EON_H
-#define SUUNTO_EON_H
+#ifndef DC_SUUNTO_EON_H
+#define DC_SUUNTO_EON_H
-#include "context.h"
+#include "common.h"
#include "device.h"
-#include "parser.h"
#ifdef __cplusplus
extern "C" {
@@ -32,22 +31,13 @@ extern "C" {
#define SUUNTO_EON_NAME_SIZE 20
-dc_status_t
-suunto_eon_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
suunto_eon_device_write_name (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
suunto_eon_device_write_interval (dc_device_t *device, unsigned char interval);
-dc_status_t
-suunto_eon_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
-
-dc_status_t
-suunto_eon_parser_create (dc_parser_t **parser, dc_context_t *context, int spyder);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* SUUNTO_EON_H */
+#endif /* DC_SUUNTO_EON_H */
diff --git a/include/libdivecomputer/suunto_vyper2.h b/include/libdivecomputer/suunto_vyper2.h
index 8619b3d..7c67320 100644
--- a/include/libdivecomputer/suunto_vyper2.h
+++ b/include/libdivecomputer/suunto_vyper2.h
@@ -19,21 +19,18 @@
* MA 02110-1301 USA
*/
-#ifndef SUUNTO_VYPER2_H
-#define SUUNTO_VYPER2_H
+#ifndef DC_SUUNTO_VYPER2_H
+#define DC_SUUNTO_VYPER2_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include "context.h"
+#include "common.h"
#include "device.h"
#define SUUNTO_VYPER2_VERSION_SIZE 0x04
-dc_status_t
-suunto_vyper2_device_open (dc_device_t **device, dc_context_t *context, const char *name);
-
dc_status_t
suunto_vyper2_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
@@ -43,4 +40,4 @@ suunto_vyper2_device_reset_maxdepth (dc_device_t *device);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* SUUNTO_VYPER2_H */
+#endif /* DC_SUUNTO_VYPER2_H */
diff --git a/include/libdivecomputer/uwatec.h b/include/libdivecomputer/uwatec.h
deleted file mode 100644
index 4ab1eec..0000000
--- a/include/libdivecomputer/uwatec.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2008 Jef Driesen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef UWATEC_H
-#define UWATEC_H
-
-#include "uwatec_aladin.h"
-#include "uwatec_memomouse.h"
-#include "uwatec_smart.h"
-#include "uwatec_meridian.h"
-
-#endif /* UWATEC_H */
diff --git a/include/libdivecomputer/zeagle.h b/include/libdivecomputer/zeagle.h
deleted file mode 100644
index 5d42cfb..0000000
--- a/include/libdivecomputer/zeagle.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * libdivecomputer
- *
- * Copyright (C) 2010 Jef Driesen
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#ifndef ZEAGLE_H
-#define ZEAGLE_H
-
-#include "zeagle_n2ition3.h"
-
-#endif /* CRESSI_H */
diff --git a/msvc/libdivecomputer.vcproj b/msvc/libdivecomputer.vcproj
index 1e03b33..260ecbf 100644
--- a/msvc/libdivecomputer.vcproj
+++ b/msvc/libdivecomputer.vcproj
@@ -517,7 +517,7 @@
>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -629,11 +617,11 @@
>
+
+
+
+
@@ -689,13 +685,17 @@
>
+
+
@@ -704,6 +704,14 @@
RelativePath="..\include\libdivecomputer\reefnet_sensusultra.h"
>
+
+
+
+
@@ -712,24 +720,16 @@
RelativePath="..\src\serial.h"
>
-
-
-
-
+
+
+
+
+
+
+
+
@@ -769,23 +785,19 @@
>
-
-
-
-
diff --git a/src/Makefile.am b/src/Makefile.am
index db5f742..b98e57e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,50 +24,49 @@ libdivecomputer_la_SOURCES = \
datetime.c \
suunto_common.h suunto_common.c \
suunto_common2.h suunto_common2.c \
- suunto_solution.c suunto_solution_parser.c \
- suunto_eon.c suunto_eon_parser.c \
- suunto_vyper.c suunto_vyper_parser.c \
- suunto_vyper2.c \
- suunto_d9.c suunto_d9_parser.c \
- suunto_eonsteel.c suunto_eonsteel_parser.c \
- reefnet_sensus.c reefnet_sensus_parser.c \
- reefnet_sensuspro.c reefnet_sensuspro_parser.c \
- reefnet_sensusultra.c reefnet_sensusultra_parser.c \
- uwatec_aladin.c \
- uwatec_memomouse.c uwatec_memomouse_parser.c \
- uwatec_smart.c uwatec_smart_parser.c \
- uwatec_meridian.c \
+ suunto_solution.h suunto_solution.c suunto_solution_parser.c \
+ suunto_eon.h suunto_eon.c suunto_eon_parser.c \
+ suunto_vyper.h suunto_vyper.c suunto_vyper_parser.c \
+ suunto_vyper2.h suunto_vyper2.c \
+ suunto_d9.h suunto_d9.c suunto_d9_parser.c \
+ suunto_eonsteel.h suunto_eonsteel.c suunto_eonsteel_parser.c \
+ reefnet_sensus.h reefnet_sensus.c reefnet_sensus_parser.c \
+ reefnet_sensuspro.h reefnet_sensuspro.c reefnet_sensuspro_parser.c \
+ reefnet_sensusultra.h reefnet_sensusultra.c reefnet_sensusultra_parser.c \
+ uwatec_aladin.h uwatec_aladin.c \
+ uwatec_memomouse.h uwatec_memomouse.c uwatec_memomouse_parser.c \
+ uwatec_smart.h uwatec_smart.c uwatec_smart_parser.c \
+ uwatec_meridian.h uwatec_meridian.c \
oceanic_common.h oceanic_common.c \
- oceanic_atom2.c oceanic_atom2_parser.c \
- oceanic_veo250.c oceanic_veo250_parser.c \
- oceanic_vtpro.c oceanic_vtpro_parser.c \
+ oceanic_atom2.h oceanic_atom2.c oceanic_atom2_parser.c \
+ oceanic_veo250.h oceanic_veo250.c oceanic_veo250_parser.c \
+ oceanic_vtpro.h oceanic_vtpro.c oceanic_vtpro_parser.c \
mares_common.h mares_common.c \
- mares_nemo.c mares_nemo_parser.c \
- mares_puck.c \
- mares_darwin.c mares_darwin_parser.c \
- mares_iconhd.c mares_iconhd_parser.c \
+ mares_nemo.h mares_nemo.c mares_nemo_parser.c \
+ mares_puck.h mares_puck.c \
+ mares_darwin.h mares_darwin.c mares_darwin_parser.c \
+ mares_iconhd.h mares_iconhd.c mares_iconhd_parser.c \
ihex.h ihex.c \
- hw_ostc.c hw_ostc_parser.c \
- hw_frog.c \
+ hw_ostc.h hw_ostc.c hw_ostc_parser.c \
+ hw_frog.h hw_frog.c \
+ hw_ostc3.h hw_ostc3.c \
aes.h aes.c \
- hw_ostc3.c \
- cressi_edy.c cressi_edy_parser.c \
- cressi_leonardo.c cressi_leonardo_parser.c \
- zeagle_n2ition3.c \
- atomics_cobalt.c atomics_cobalt_parser.c \
+ cressi_edy.h cressi_edy.c cressi_edy_parser.c \
+ cressi_leonardo.h cressi_leonardo.c cressi_leonardo_parser.c \
+ zeagle_n2ition3.h zeagle_n2ition3.c \
+ atomics_cobalt.h atomics_cobalt.c atomics_cobalt_parser.c \
shearwater_common.h shearwater_common.c \
- shearwater_predator.c shearwater_predator_parser.c \
- shearwater_petrel.c \
- diverite_nitekq.c diverite_nitekq_parser.c \
- citizen_aqualand.c citizen_aqualand_parser.c \
- divesystem_idive.c divesystem_idive_parser.c \
+ shearwater_predator.h shearwater_predator.c shearwater_predator_parser.c \
+ shearwater_petrel.h shearwater_petrel.c \
+ diverite_nitekq.h diverite_nitekq.c diverite_nitekq_parser.c \
+ citizen_aqualand.h citizen_aqualand.c citizen_aqualand_parser.c \
+ divesystem_idive.h divesystem_idive.c divesystem_idive_parser.c \
ringbuffer.h ringbuffer.c \
rbstream.h rbstream.c \
checksum.h checksum.c \
array.h array.c \
buffer.c \
- cochran_commander.c \
- cochran_commander_parser.c
+ cochran_commander.h cochran_commander.c cochran_commander_parser.c
if OS_WIN32
libdivecomputer_la_SOURCES += serial.h serial_win32.c
diff --git a/src/atomics_cobalt.c b/src/atomics_cobalt.c
index 6bc3de2..91a6da6 100644
--- a/src/atomics_cobalt.c
+++ b/src/atomics_cobalt.c
@@ -33,8 +33,7 @@
#include
#endif
-#include
-
+#include "atomics_cobalt.h"
#include "context-private.h"
#include "device-private.h"
#include "checksum.h"
diff --git a/include/libdivecomputer/atomics.h b/src/atomics_cobalt.h
similarity index 61%
rename from include/libdivecomputer/atomics.h
rename to src/atomics_cobalt.h
index eefb002..0308350 100644
--- a/include/libdivecomputer/atomics.h
+++ b/src/atomics_cobalt.h
@@ -19,9 +19,25 @@
* MA 02110-1301 USA
*/
-#ifndef ATOMICS_H
-#define ATOMICS_H
+#ifndef ATOMICS_COBALT_H
+#define ATOMICS_COBALT_H
-#include "atomics_cobalt.h"
+#include
+#include
+#include
+#include
-#endif /* ATOMICS_H */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+atomics_cobalt_device_open (dc_device_t **device, dc_context_t *context);
+
+dc_status_t
+atomics_cobalt_parser_create (dc_parser_t **parser, dc_context_t *context);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* ATOMICS_COBALT_H */
diff --git a/src/atomics_cobalt_parser.c b/src/atomics_cobalt_parser.c
index aacfb77..e43243c 100644
--- a/src/atomics_cobalt_parser.c
+++ b/src/atomics_cobalt_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "atomics_cobalt.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/citizen_aqualand.c b/src/citizen_aqualand.c
index 68cfc8c..5e111da 100644
--- a/src/citizen_aqualand.c
+++ b/src/citizen_aqualand.c
@@ -22,8 +22,7 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "citizen_aqualand.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/citizen_aqualand.h b/src/citizen_aqualand.h
similarity index 91%
rename from include/libdivecomputer/citizen_aqualand.h
rename to src/citizen_aqualand.h
index 2b703a4..6391660 100644
--- a/include/libdivecomputer/citizen_aqualand.h
+++ b/src/citizen_aqualand.h
@@ -22,9 +22,9 @@
#ifndef CITIZEN_AQUALAND_H
#define CITIZEN_AQUALAND_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/citizen_aqualand_parser.c b/src/citizen_aqualand_parser.c
index 9f7d992..f89eacf 100644
--- a/src/citizen_aqualand_parser.c
+++ b/src/citizen_aqualand_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "citizen_aqualand.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/cochran_commander.c b/src/cochran_commander.c
index 735120b..99fe369 100644
--- a/src/cochran_commander.c
+++ b/src/cochran_commander.c
@@ -23,8 +23,7 @@
#include // malloc, free
#include // assert
-#include
-
+#include "cochran_commander.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/cochran_commander.h b/src/cochran_commander.h
similarity index 91%
rename from include/libdivecomputer/cochran_commander.h
rename to src/cochran_commander.h
index 0cbaf7e..e475b5f 100644
--- a/include/libdivecomputer/cochran_commander.h
+++ b/src/cochran_commander.h
@@ -22,9 +22,9 @@
#ifndef COCHRAN_COMMANDER_H
#define COCHRAN_COMMANDER_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/cochran_commander_parser.c b/src/cochran_commander_parser.c
index 1873a46..ab854ad 100644
--- a/src/cochran_commander_parser.c
+++ b/src/cochran_commander_parser.c
@@ -23,8 +23,8 @@
#include
#include
-#include
+#include "cochran_commander.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/cressi_edy.c b/src/cressi_edy.c
index 9270b92..226f32f 100644
--- a/src/cressi_edy.c
+++ b/src/cressi_edy.c
@@ -23,8 +23,7 @@
#include // malloc, free
#include // assert
-#include
-
+#include "cressi_edy.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/cressi_edy.h b/src/cressi_edy.h
similarity index 91%
rename from include/libdivecomputer/cressi_edy.h
rename to src/cressi_edy.h
index 852aa05..d89f02f 100644
--- a/include/libdivecomputer/cressi_edy.h
+++ b/src/cressi_edy.h
@@ -22,9 +22,9 @@
#ifndef CRESSI_EDY_H
#define CRESSI_EDY_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/cressi_edy_parser.c b/src/cressi_edy_parser.c
index 2856c3c..c9e1d91 100644
--- a/src/cressi_edy_parser.c
+++ b/src/cressi_edy_parser.c
@@ -21,8 +21,7 @@
#include
-#include
-
+#include "cressi_edy.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/cressi_leonardo.c b/src/cressi_leonardo.c
index 5259fe5..ea3966d 100644
--- a/src/cressi_leonardo.c
+++ b/src/cressi_leonardo.c
@@ -23,8 +23,7 @@
#include // malloc, free
#include // assert
-#include
-
+#include "cressi_leonardo.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/cressi_leonardo.h b/src/cressi_leonardo.h
similarity index 93%
rename from include/libdivecomputer/cressi_leonardo.h
rename to src/cressi_leonardo.h
index 23e4554..df246a1 100644
--- a/include/libdivecomputer/cressi_leonardo.h
+++ b/src/cressi_leonardo.h
@@ -22,9 +22,9 @@
#ifndef CRESSI_LEONARDO_H
#define CRESSI_LEONARDO_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/cressi_leonardo_parser.c b/src/cressi_leonardo_parser.c
index 54ffbb4..3e0d1e4 100644
--- a/src/cressi_leonardo_parser.c
+++ b/src/cressi_leonardo_parser.c
@@ -21,8 +21,7 @@
#include
-#include
-
+#include "cressi_leonardo.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/device.c b/src/device.c
index f94adf2..f32f8d2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -23,20 +23,39 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include "suunto_d9.h"
+#include "suunto_eon.h"
+#include "suunto_eonsteel.h"
+#include "suunto_solution.h"
+#include "suunto_vyper2.h"
+#include "suunto_vyper.h"
+#include "reefnet_sensus.h"
+#include "reefnet_sensuspro.h"
+#include "reefnet_sensusultra.h"
+#include "uwatec_aladin.h"
+#include "uwatec_memomouse.h"
+#include "uwatec_meridian.h"
+#include "uwatec_smart.h"
+#include "oceanic_atom2.h"
+#include "oceanic_veo250.h"
+#include "oceanic_vtpro.h"
+#include "mares_darwin.h"
+#include "mares_iconhd.h"
+#include "mares_nemo.h"
+#include "mares_puck.h"
+#include "hw_frog.h"
+#include "hw_ostc.h"
+#include "hw_ostc3.h"
+#include "cressi_edy.h"
+#include "cressi_leonardo.h"
+#include "zeagle_n2ition3.h"
+#include "atomics_cobalt.h"
+#include "shearwater_petrel.h"
+#include "shearwater_predator.h"
+#include "diverite_nitekq.h"
+#include "citizen_aqualand.h"
+#include "divesystem_idive.h"
+#include "cochran_commander.h"
#include "device-private.h"
#include "context-private.h"
diff --git a/src/diverite_nitekq.c b/src/diverite_nitekq.c
index 1565779..8493153 100644
--- a/src/diverite_nitekq.c
+++ b/src/diverite_nitekq.c
@@ -23,8 +23,7 @@
#include
#include
-#include
-
+#include "diverite_nitekq.h"
#include "context-private.h"
#include "device-private.h"
#include "checksum.h"
diff --git a/include/libdivecomputer/diverite_nitekq.h b/src/diverite_nitekq.h
similarity index 92%
rename from include/libdivecomputer/diverite_nitekq.h
rename to src/diverite_nitekq.h
index d7dd5e8..fd1fa6b 100644
--- a/include/libdivecomputer/diverite_nitekq.h
+++ b/src/diverite_nitekq.h
@@ -22,9 +22,9 @@
#ifndef DIVERITE_NITEKQ_H
#define DIVERITE_NITEKQ_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/diverite_nitekq_parser.c b/src/diverite_nitekq_parser.c
index 6cbd4dc..6c7a05f 100644
--- a/src/diverite_nitekq_parser.c
+++ b/src/diverite_nitekq_parser.c
@@ -22,8 +22,8 @@
#include
#include
-#include
+#include "diverite_nitekq.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/divesystem_idive.c b/src/divesystem_idive.c
index 75a2dbe..759f657 100644
--- a/src/divesystem_idive.c
+++ b/src/divesystem_idive.c
@@ -22,8 +22,7 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "divesystem_idive.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/divesystem_idive.h b/src/divesystem_idive.h
similarity index 92%
rename from include/libdivecomputer/divesystem_idive.h
rename to src/divesystem_idive.h
index 4a9d817..015f44e 100644
--- a/include/libdivecomputer/divesystem_idive.h
+++ b/src/divesystem_idive.h
@@ -22,9 +22,9 @@
#ifndef DIVESYSTEM_IDIVE_H
#define DIVESYSTEM_IDIVE_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/divesystem_idive_parser.c b/src/divesystem_idive_parser.c
index 262d192..0b40945 100644
--- a/src/divesystem_idive_parser.c
+++ b/src/divesystem_idive_parser.c
@@ -21,8 +21,7 @@
#include
-#include
-
+#include "divesystem_idive.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/hw_frog.c b/src/hw_frog.c
index 0ba5342..d8b89ca 100644
--- a/src/hw_frog.c
+++ b/src/hw_frog.c
@@ -22,8 +22,7 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "hw_frog.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/shearwater.h b/src/hw_frog.h
similarity index 66%
rename from include/libdivecomputer/shearwater.h
rename to src/hw_frog.h
index df693e9..260e80d 100644
--- a/include/libdivecomputer/shearwater.h
+++ b/src/hw_frog.h
@@ -19,10 +19,22 @@
* MA 02110-1301 USA
*/
-#ifndef SHEARWATER_H
-#define SHEARWATER_H
+#ifndef HW_FROG_H
+#define HW_FROG_H
-#include "shearwater_predator.h"
-#include "shearwater_petrel.h"
+#include
+#include
+#include
+#include
-#endif /* SHEARWATER_H */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+hw_frog_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* HW_FROG_H */
diff --git a/src/hw_ostc.c b/src/hw_ostc.c
index 1185e81..ce30415 100644
--- a/src/hw_ostc.c
+++ b/src/hw_ostc.c
@@ -22,8 +22,7 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "hw_ostc.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/hw.h b/src/hw_ostc.h
similarity index 55%
rename from include/libdivecomputer/hw.h
rename to src/hw_ostc.h
index 2ac6e29..b7f7aa8 100644
--- a/include/libdivecomputer/hw.h
+++ b/src/hw_ostc.h
@@ -19,11 +19,28 @@
* MA 02110-1301 USA
*/
-#ifndef HW_H
-#define HW_H
+#ifndef HW_OSTC_H
+#define HW_OSTC_H
-#include "hw_ostc.h"
-#include "hw_frog.h"
-#include "hw_ostc3.h"
+#include
+#include
+#include
+#include
-#endif /* HW_H */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+hw_ostc_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+hw_ostc_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
+
+dc_status_t
+hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int hwos);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* HW_OSTC_H */
diff --git a/src/hw_ostc3.c b/src/hw_ostc3.c
index e8df9b5..b8693cb 100644
--- a/src/hw_ostc3.c
+++ b/src/hw_ostc3.c
@@ -24,8 +24,7 @@
#include // malloc, free
#include // FILE, fopen
-#include
-
+#include "hw_ostc3.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/diverite.h b/src/hw_ostc3.h
similarity index 61%
rename from include/libdivecomputer/diverite.h
rename to src/hw_ostc3.h
index 9bf6bf6..eec35b7 100644
--- a/include/libdivecomputer/diverite.h
+++ b/src/hw_ostc3.h
@@ -19,9 +19,25 @@
* MA 02110-1301 USA
*/
-#ifndef DIVERITE_H
-#define DIVERITE_H
+#ifndef HW_OSTC3_H
+#define HW_OSTC3_H
-#include "diverite_nitekq.h"
+#include
+#include
+#include
+#include
-#endif /* DIVERITE_H */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+hw_ostc3_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+hw_ostc3_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* HW_OSTC3_H */
diff --git a/src/hw_ostc_parser.c b/src/hw_ostc_parser.c
index 9ac9c52..b9f947b 100644
--- a/src/hw_ostc_parser.c
+++ b/src/hw_ostc_parser.c
@@ -21,10 +21,10 @@
#include
-#include
-#include
#include "libdivecomputer/units.h"
+#include "hw_ostc.h"
+#include "hw_ostc3.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/libdivecomputer.symbols b/src/libdivecomputer.symbols
index 5a2c18b..c3d372b 100644
--- a/src/libdivecomputer.symbols
+++ b/src/libdivecomputer.symbols
@@ -42,40 +42,10 @@ dc_parser_get_field
dc_parser_samples_foreach
dc_parser_destroy
-reefnet_sensus_parser_create
reefnet_sensus_parser_set_calibration
-reefnet_sensuspro_parser_create
reefnet_sensuspro_parser_set_calibration
-reefnet_sensusultra_parser_create
reefnet_sensusultra_parser_set_calibration
-uwatec_memomouse_parser_create
-uwatec_smart_parser_create
-suunto_vyper_parser_create
-suunto_solution_parser_create
-suunto_eon_parser_create
-suunto_d9_parser_create
-suunto_eonsteel_parser_create
-mares_nemo_parser_create
-mares_darwin_parser_create
-mares_iconhd_parser_create
-oceanic_vtpro_parser_create
-oceanic_vtpro_parser_create2
-oceanic_veo250_parser_create
-oceanic_atom2_parser_create
-hw_ostc_parser_create
-hw_ostc3_parser_create
-cressi_edy_parser_create
-cressi_leonardo_parser_create
-cressi_leonardo_parser_create2
-atomics_cobalt_parser_create
atomics_cobalt_parser_set_calibration
-shearwater_predator_parser_create
-shearwater_petrel_parser_create
-diverite_nitekq_parser_create
-citizen_aqualand_parser_create
-divesystem_idive_parser_create
-divesystem_idive_parser_create2
-cochran_commander_parser_create
dc_device_open
dc_device_close
@@ -88,79 +58,37 @@ dc_device_set_events
dc_device_set_fingerprint
dc_device_write
-cressi_edy_device_open
-cressi_leonardo_device_open
-mares_nemo_device_open
-mares_nemo_extract_dives
-mares_puck_device_open
-mares_puck_extract_dives
-mares_darwin_device_open
-mares_darwin_extract_dives
-mares_iconhd_device_open
-oceanic_atom2_device_open
-oceanic_atom2_device_open2
oceanic_atom2_device_version
oceanic_atom2_device_keepalive
-oceanic_veo250_device_open
oceanic_veo250_device_version
oceanic_veo250_device_keepalive
-oceanic_vtpro_device_open
-oceanic_vtpro_device_open2
oceanic_vtpro_device_version
oceanic_vtpro_device_keepalive
-reefnet_sensus_device_open
reefnet_sensus_device_get_handshake
-reefnet_sensus_extract_dives
-reefnet_sensuspro_device_open
reefnet_sensuspro_device_get_handshake
reefnet_sensuspro_device_write_interval
-reefnet_sensuspro_extract_dives
-reefnet_sensusultra_device_open
reefnet_sensusultra_device_read_user
reefnet_sensusultra_device_sense
reefnet_sensusultra_device_get_handshake
reefnet_sensusultra_device_write_parameter
reefnet_sensusultra_device_write_user
-reefnet_sensusultra_extract_dives
-suunto_d9_device_open
suunto_d9_device_version
suunto_d9_device_reset_maxdepth
-suunto_solution_device_open
-suunto_solution_extract_dives
-suunto_eon_device_open
suunto_eon_device_write_interval
suunto_eon_device_write_name
-suunto_eon_extract_dives
-suunto_vyper2_device_open
suunto_vyper2_device_version
suunto_vyper2_device_reset_maxdepth
-suunto_vyper_device_open
-suunto_vyper_device_read_dive
-suunto_vyper_extract_dives
-suunto_eonsteel_device_open
-uwatec_aladin_device_open
-uwatec_aladin_extract_dives
-uwatec_memomouse_device_open
-uwatec_memomouse_extract_dives
-uwatec_smart_device_open
-uwatec_smart_extract_dives
-uwatec_meridian_device_open
-uwatec_meridian_extract_dives
-hw_ostc_device_open
hw_ostc_device_md2hash
hw_ostc_device_clock
hw_ostc_device_eeprom_read
hw_ostc_device_eeprom_write
hw_ostc_device_reset
hw_ostc_device_screenshot
-hw_ostc_extract_dives
hw_ostc_device_fwupdate
-hw_frog_device_open
hw_frog_device_version
hw_frog_device_clock
hw_frog_device_display
hw_frog_device_customtext
-hw_ostc3_device_open
hw_ostc3_device_version
hw_ostc3_device_hardware
hw_ostc3_device_clock
@@ -170,16 +98,5 @@ hw_ostc3_device_config_read
hw_ostc3_device_config_write
hw_ostc3_device_config_reset
hw_ostc3_device_fwupdate
-zeagle_n2ition3_device_open
-atomics_cobalt_device_open
atomics_cobalt_device_version
atomics_cobalt_device_set_simulation
-shearwater_predator_device_open
-shearwater_predator_extract_dives
-shearwater_petrel_device_open
-diverite_nitekq_device_open
-diverite_nitekq_extract_dives
-citizen_aqualand_device_open
-divesystem_idive_device_open
-divesystem_idive_device_open2
-cochran_commander_device_open
diff --git a/src/mares_darwin.c b/src/mares_darwin.c
index 3f06a4a..3922c75 100644
--- a/src/mares_darwin.c
+++ b/src/mares_darwin.c
@@ -23,12 +23,12 @@
#include
#include
-#include
#include
+#include "mares_darwin.h"
+#include "mares_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "mares_common.h"
#include "array.h"
#define ISINSTANCE(device) dc_device_isinstance((device), &mares_darwin_device_vtable)
diff --git a/include/libdivecomputer/mares_darwin.h b/src/mares_darwin.h
similarity index 92%
rename from include/libdivecomputer/mares_darwin.h
rename to src/mares_darwin.h
index 9d4da9a..3df4578 100644
--- a/include/libdivecomputer/mares_darwin.h
+++ b/src/mares_darwin.h
@@ -22,9 +22,9 @@
#ifndef MARES_DARWIN_H
#define MARES_DARWIN_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/mares_darwin_parser.c b/src/mares_darwin_parser.c
index 73963e5..1201ec6 100644
--- a/src/mares_darwin_parser.c
+++ b/src/mares_darwin_parser.c
@@ -22,9 +22,9 @@
#include
#include
-#include
#include
+#include "mares_darwin.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c
index 28e7717..c78acf7 100644
--- a/src/mares_iconhd.c
+++ b/src/mares_iconhd.c
@@ -23,8 +23,7 @@
#include // malloc, free
#include // assert
-#include
-
+#include "mares_iconhd.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/include/libdivecomputer/mares_iconhd.h b/src/mares_iconhd.h
similarity index 91%
rename from include/libdivecomputer/mares_iconhd.h
rename to src/mares_iconhd.h
index ce0c8c6..bd4b193 100644
--- a/include/libdivecomputer/mares_iconhd.h
+++ b/src/mares_iconhd.h
@@ -22,9 +22,9 @@
#ifndef MARES_ICONHD_H
#define MARES_ICONHD_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/mares_iconhd_parser.c b/src/mares_iconhd_parser.c
index 8e356be..0c45a15 100644
--- a/src/mares_iconhd_parser.c
+++ b/src/mares_iconhd_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "mares_iconhd.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/mares_nemo.c b/src/mares_nemo.c
index 16824ae..dc6b480 100644
--- a/src/mares_nemo.c
+++ b/src/mares_nemo.c
@@ -22,11 +22,10 @@
#include // memcpy, memcmp
#include // malloc, free
-#include
-
+#include "mares_nemo.h"
+#include "mares_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "mares_common.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
diff --git a/include/libdivecomputer/mares_nemo.h b/src/mares_nemo.h
similarity index 92%
rename from include/libdivecomputer/mares_nemo.h
rename to src/mares_nemo.h
index 4ced926..176070e 100644
--- a/include/libdivecomputer/mares_nemo.h
+++ b/src/mares_nemo.h
@@ -22,9 +22,9 @@
#ifndef MARES_NEMO_H
#define MARES_NEMO_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/mares_nemo_parser.c b/src/mares_nemo_parser.c
index 7b24ca4..9a6cbfd 100644
--- a/src/mares_nemo_parser.c
+++ b/src/mares_nemo_parser.c
@@ -22,9 +22,9 @@
#include
#include
-#include
#include
+#include "mares_nemo.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/mares_puck.c b/src/mares_puck.c
index 853ad03..0a75666 100644
--- a/src/mares_puck.c
+++ b/src/mares_puck.c
@@ -23,11 +23,10 @@
#include // malloc, free
#include // assert
-#include
-
+#include "mares_puck.h"
+#include "mares_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "mares_common.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
diff --git a/include/libdivecomputer/mares_puck.h b/src/mares_puck.h
similarity index 91%
rename from include/libdivecomputer/mares_puck.h
rename to src/mares_puck.h
index 6706474..eba37c0 100644
--- a/include/libdivecomputer/mares_puck.h
+++ b/src/mares_puck.h
@@ -22,9 +22,9 @@
#ifndef MARES_PUCK_H
#define MARES_PUCK_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c
index 34cc592..6c5fe67 100644
--- a/src/oceanic_atom2.c
+++ b/src/oceanic_atom2.c
@@ -22,11 +22,10 @@
#include // memcpy
#include // malloc, free
-#include
-
+#include "oceanic_atom2.h"
+#include "oceanic_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "oceanic_common.h"
#include "serial.h"
#include "array.h"
#include "ringbuffer.h"
diff --git a/src/oceanic_atom2.h b/src/oceanic_atom2.h
new file mode 100644
index 0000000..ee0f657
--- /dev/null
+++ b/src/oceanic_atom2.h
@@ -0,0 +1,47 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2008 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef OCEANIC_ATOM2_H
+#define OCEANIC_ATOM2_H
+
+#include
+#include
+#include
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+oceanic_atom2_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+oceanic_atom2_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
+
+dc_status_t
+oceanic_atom2_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* OCEANIC_ATOM2_H */
diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c
index 0b22615..bcc4cd5 100644
--- a/src/oceanic_atom2_parser.c
+++ b/src/oceanic_atom2_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "oceanic_atom2.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "parser-private.h"
diff --git a/src/oceanic_veo250.c b/src/oceanic_veo250.c
index 033081d..d47c532 100644
--- a/src/oceanic_veo250.c
+++ b/src/oceanic_veo250.c
@@ -22,11 +22,10 @@
#include // memcpy
#include // malloc, free
-#include
-
+#include "oceanic_veo250.h"
+#include "oceanic_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "oceanic_common.h"
#include "serial.h"
#include "ringbuffer.h"
#include "checksum.h"
diff --git a/include/libdivecomputer/suunto.h b/src/oceanic_veo250.h
similarity index 59%
rename from include/libdivecomputer/suunto.h
rename to src/oceanic_veo250.h
index 3ff7c88..aefd20e 100644
--- a/include/libdivecomputer/suunto.h
+++ b/src/oceanic_veo250.h
@@ -19,14 +19,26 @@
* MA 02110-1301 USA
*/
-#ifndef SUUNTO_H
-#define SUUNTO_H
+#ifndef OCEANIC_VEO250_H
+#define OCEANIC_VEO250_H
-#include "suunto_solution.h"
-#include "suunto_eon.h"
-#include "suunto_vyper.h"
-#include "suunto_vyper2.h"
-#include "suunto_d9.h"
-#include "suunto_eonsteel.h"
+#include
+#include
+#include
-#endif /* SUUNTO_H */
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+oceanic_veo250_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+oceanic_veo250_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* OCEANIC_VEO250_H */
diff --git a/src/oceanic_veo250_parser.c b/src/oceanic_veo250_parser.c
index 7be86c4..ba69723 100644
--- a/src/oceanic_veo250_parser.c
+++ b/src/oceanic_veo250_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "oceanic_veo250.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "parser-private.h"
diff --git a/src/oceanic_vtpro.c b/src/oceanic_vtpro.c
index 3128079..c16f600 100644
--- a/src/oceanic_vtpro.c
+++ b/src/oceanic_vtpro.c
@@ -23,11 +23,10 @@
#include // malloc, free
#include
-#include
-
+#include "oceanic_vtpro.h"
+#include "oceanic_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "oceanic_common.h"
#include "serial.h"
#include "ringbuffer.h"
#include "checksum.h"
diff --git a/src/oceanic_vtpro.h b/src/oceanic_vtpro.h
new file mode 100644
index 0000000..6beef68
--- /dev/null
+++ b/src/oceanic_vtpro.h
@@ -0,0 +1,50 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2008 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef OCEANIC_VTPRO_H
+#define OCEANIC_VTPRO_H
+
+#include
+#include
+#include
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+oceanic_vtpro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+oceanic_vtpro_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
+
+dc_status_t
+oceanic_vtpro_parser_create (dc_parser_t **parser, dc_context_t *context);
+
+dc_status_t
+oceanic_vtpro_parser_create2 (dc_parser_t **parser, dc_context_t *context, unsigned int model);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* OCEANIC_VTPRO_H */
diff --git a/src/oceanic_vtpro_parser.c b/src/oceanic_vtpro_parser.c
index 1f9d7aa..822f22e 100644
--- a/src/oceanic_vtpro_parser.c
+++ b/src/oceanic_vtpro_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "oceanic_vtpro.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "parser-private.h"
diff --git a/src/parser.c b/src/parser.c
index 8b10e38..1b1e314 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -22,20 +22,40 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include "suunto_d9.h"
+#include "suunto_eon.h"
+#include "suunto_eonsteel.h"
+#include "suunto_solution.h"
+#include "suunto_vyper2.h"
+#include "suunto_vyper.h"
+#include "reefnet_sensus.h"
+#include "reefnet_sensuspro.h"
+#include "reefnet_sensusultra.h"
+#include "uwatec_aladin.h"
+#include "uwatec_memomouse.h"
+#include "uwatec_meridian.h"
+#include "uwatec_smart.h"
+#include "oceanic_atom2.h"
+#include "oceanic_atom2.h"
+#include "oceanic_veo250.h"
+#include "oceanic_vtpro.h"
+#include "mares_darwin.h"
+#include "mares_iconhd.h"
+#include "mares_nemo.h"
+#include "mares_puck.h"
+#include "hw_frog.h"
+#include "hw_ostc.h"
+#include "hw_ostc3.h"
+#include "cressi_edy.h"
+#include "cressi_leonardo.h"
+#include "zeagle_n2ition3.h"
+#include "atomics_cobalt.h"
+#include "shearwater_petrel.h"
+#include "shearwater_predator.h"
+#include "diverite_nitekq.h"
+#include "citizen_aqualand.h"
+#include "divesystem_idive.h"
+#include "cochran_commander.h"
#include "context-private.h"
#include "parser-private.h"
diff --git a/src/reefnet_sensus.c b/src/reefnet_sensus.c
index 09c5266..b20047a 100644
--- a/src/reefnet_sensus.c
+++ b/src/reefnet_sensus.c
@@ -22,8 +22,7 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "reefnet_sensus.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/src/reefnet_sensus.h b/src/reefnet_sensus.h
new file mode 100644
index 0000000..fda47d0
--- /dev/null
+++ b/src/reefnet_sensus.h
@@ -0,0 +1,46 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2008 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef REEFNET_SENSUS_H
+#define REEFNET_SENSUS_H
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+reefnet_sensus_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+reefnet_sensus_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
+
+dc_status_t
+reefnet_sensus_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* REEFNET_SENSUS_H */
diff --git a/src/reefnet_sensus_parser.c b/src/reefnet_sensus_parser.c
index ba4b7de..50fd69e 100644
--- a/src/reefnet_sensus_parser.c
+++ b/src/reefnet_sensus_parser.c
@@ -21,9 +21,9 @@
#include // malloc, free
-#include
#include
+#include "reefnet_sensus.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/reefnet_sensuspro.c b/src/reefnet_sensuspro.c
index b9c08db..c0802de 100644
--- a/src/reefnet_sensuspro.c
+++ b/src/reefnet_sensuspro.c
@@ -22,8 +22,7 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "reefnet_sensuspro.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/src/reefnet_sensuspro.h b/src/reefnet_sensuspro.h
new file mode 100644
index 0000000..91d80b8
--- /dev/null
+++ b/src/reefnet_sensuspro.h
@@ -0,0 +1,46 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2008 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef REEFNET_SENSUSPRO_H
+#define REEFNET_SENSUSPRO_H
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+reefnet_sensuspro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+reefnet_sensuspro_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
+
+dc_status_t
+reefnet_sensuspro_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* REEFNET_SENSUSPRO_H */
diff --git a/src/reefnet_sensuspro_parser.c b/src/reefnet_sensuspro_parser.c
index 70decf8..fe62668 100644
--- a/src/reefnet_sensuspro_parser.c
+++ b/src/reefnet_sensuspro_parser.c
@@ -22,9 +22,9 @@
#include
#include // memcmp
-#include
#include
+#include "reefnet_sensuspro.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/reefnet_sensusultra.c b/src/reefnet_sensusultra.c
index ead2388..4fa8187 100644
--- a/src/reefnet_sensusultra.c
+++ b/src/reefnet_sensusultra.c
@@ -23,8 +23,7 @@
#include // malloc, free
#include // assert
-#include
-
+#include "reefnet_sensusultra.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
diff --git a/src/reefnet_sensusultra.h b/src/reefnet_sensusultra.h
new file mode 100644
index 0000000..a1d21be
--- /dev/null
+++ b/src/reefnet_sensusultra.h
@@ -0,0 +1,46 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2008 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef REEFNET_SENSUSULTRA_H
+#define REEFNET_SENSUSULTRA_H
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+reefnet_sensusultra_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+reefnet_sensusultra_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
+
+dc_status_t
+reefnet_sensusultra_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* REEFNET_SENSUSULTRA_H */
diff --git a/src/reefnet_sensusultra_parser.c b/src/reefnet_sensusultra_parser.c
index d44edfe..8aaacca 100644
--- a/src/reefnet_sensusultra_parser.c
+++ b/src/reefnet_sensusultra_parser.c
@@ -22,9 +22,9 @@
#include
#include // memcmp
-#include
#include
+#include "reefnet_sensusultra.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/shearwater_petrel.c b/src/shearwater_petrel.c
index 13e1496..4966d14 100644
--- a/src/shearwater_petrel.c
+++ b/src/shearwater_petrel.c
@@ -22,10 +22,8 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "shearwater_petrel.h"
#include "shearwater_common.h"
-
#include "context-private.h"
#include "device-private.h"
#include "array.h"
diff --git a/include/libdivecomputer/shearwater_petrel.h b/src/shearwater_petrel.h
similarity index 91%
rename from include/libdivecomputer/shearwater_petrel.h
rename to src/shearwater_petrel.h
index 5092127..8b927d6 100644
--- a/include/libdivecomputer/shearwater_petrel.h
+++ b/src/shearwater_petrel.h
@@ -22,9 +22,9 @@
#ifndef SHEARWATER_PETREL_H
#define SHEARWATER_PETREL_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/shearwater_predator.c b/src/shearwater_predator.c
index 505dd85..efb5eb4 100644
--- a/src/shearwater_predator.c
+++ b/src/shearwater_predator.c
@@ -22,10 +22,8 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "shearwater_predator.h"
#include "shearwater_common.h"
-
#include "context-private.h"
#include "device-private.h"
#include "array.h"
diff --git a/include/libdivecomputer/shearwater_predator.h b/src/shearwater_predator.h
similarity index 92%
rename from include/libdivecomputer/shearwater_predator.h
rename to src/shearwater_predator.h
index 40c7ae2..4e3f5ae 100644
--- a/include/libdivecomputer/shearwater_predator.h
+++ b/src/shearwater_predator.h
@@ -22,9 +22,9 @@
#ifndef SHEARWATER_PREDATOR_H
#define SHEARWATER_PREDATOR_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include
+#include
#ifdef __cplusplus
extern "C" {
diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c
index c3a49c8..039926f 100644
--- a/src/shearwater_predator_parser.c
+++ b/src/shearwater_predator_parser.c
@@ -21,10 +21,10 @@
#include
-#include
-#include
#include
+#include "shearwater_predator.h"
+#include "shearwater_petrel.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/suunto_d9.c b/src/suunto_d9.c
index 00de2ee..2908792 100644
--- a/src/suunto_d9.c
+++ b/src/suunto_d9.c
@@ -23,10 +23,9 @@
#include // malloc, free
#include // assert
-#include
-
-#include "context-private.h"
+#include "suunto_d9.h"
#include "suunto_common2.h"
+#include "context-private.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
diff --git a/include/libdivecomputer/reefnet.h b/src/suunto_d9.h
similarity index 59%
rename from include/libdivecomputer/reefnet.h
rename to src/suunto_d9.h
index ad3fb36..91fe8b2 100644
--- a/include/libdivecomputer/reefnet.h
+++ b/src/suunto_d9.h
@@ -19,11 +19,25 @@
* MA 02110-1301 USA
*/
-#ifndef REEFNET_H
-#define REEFNET_H
+#ifndef SUUNTO_D9_H
+#define SUUNTO_D9_H
-#include "reefnet_sensus.h"
-#include "reefnet_sensuspro.h"
-#include "reefnet_sensusultra.h"
+#include
+#include
+#include
+#include
-#endif /* REEFNET_H */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+suunto_d9_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
+
+dc_status_t
+suunto_d9_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* SUUNTO_D9_H */
diff --git a/src/suunto_d9_parser.c b/src/suunto_d9_parser.c
index 550d515..68e79f9 100644
--- a/src/suunto_d9_parser.c
+++ b/src/suunto_d9_parser.c
@@ -22,8 +22,7 @@
#include
#include // memcmp
-#include
-
+#include "suunto_d9.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/suunto_eon.c b/src/suunto_eon.c
index f7cab8f..30b95bf 100644
--- a/src/suunto_eon.c
+++ b/src/suunto_eon.c
@@ -22,11 +22,10 @@
#include // memcmp, memcpy
#include // malloc, free
-#include
-
+#include "suunto_eon.h"
+#include "suunto_common.h"
#include "context-private.h"
#include "device-private.h"
-#include "suunto_common.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
diff --git a/src/suunto_eon.h b/src/suunto_eon.h
new file mode 100644
index 0000000..19b32a2
--- /dev/null
+++ b/src/suunto_eon.h
@@ -0,0 +1,46 @@
+/*
+ * libdivecomputer
+ *
+ * Copyright (C) 2008 Jef Driesen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef SUUNTO_EON_H
+#define SUUNTO_EON_H
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+dc_status_t
+suunto_eon_device_open (dc_device_t **device, dc_context_t *context, const char *name);
+
+dc_status_t
+suunto_eon_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
+
+dc_status_t
+suunto_eon_parser_create (dc_parser_t **parser, dc_context_t *context, int spyder);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* SUUNTO_EON_H */
diff --git a/src/suunto_eon_parser.c b/src/suunto_eon_parser.c
index 714df34..066c997 100644
--- a/src/suunto_eon_parser.c
+++ b/src/suunto_eon_parser.c
@@ -21,9 +21,9 @@
#include
-#include
#include
+#include "suunto_eon.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
diff --git a/src/suunto_eonsteel.c b/src/suunto_eonsteel.c
index 213f27a..58197ac 100644
--- a/src/suunto_eonsteel.c
+++ b/src/suunto_eonsteel.c
@@ -23,8 +23,7 @@
#include
#include
-#include
-
+#include "suunto_eonsteel.h"
#include "context-private.h"
#include "device-private.h"
#include "array.h"
diff --git a/include/libdivecomputer/suunto_eonsteel.h b/src/suunto_eonsteel.h
similarity index 74%
rename from include/libdivecomputer/suunto_eonsteel.h
rename to src/suunto_eonsteel.h
index 68e2986..4d34478 100644
--- a/include/libdivecomputer/suunto_eonsteel.h
+++ b/src/suunto_eonsteel.h
@@ -22,16 +22,19 @@
#ifndef SUUNTO_EONSTEEL_H
#define SUUNTO_EONSTEEL_H
-#include "context.h"
-#include "device.h"
-#include "parser.h"
+#include
+#include