Cleanup the extract dives functions
After being removed from the public api, these functions can be changed into local, static functions. And in a few cases, they are no longer necessary and can be removed completely.
This commit is contained in:
parent
c5f089b4a6
commit
468418193b
@ -70,6 +70,9 @@ static const dc_device_vtable_t cressi_leonardo_device_vtable = {
|
||||
cressi_leonardo_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
cressi_leonardo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
static void
|
||||
cressi_leonardo_make_ascii (const unsigned char raw[], unsigned int rsize, unsigned char ascii[], unsigned int asize)
|
||||
{
|
||||
@ -433,7 +436,7 @@ cressi_leonardo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
|
||||
return rc;
|
||||
}
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
cressi_leonardo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
cressi_leonardo_device_t *device = (cressi_leonardo_device_t *) abstract;
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
cressi_leonardo_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
cressi_leonardo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
cressi_leonardo_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
|
||||
|
||||
|
||||
@ -72,6 +72,8 @@ static const dc_device_vtable_t diverite_nitekq_device_vtable = {
|
||||
diverite_nitekq_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
diverite_nitekq_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
static dc_status_t
|
||||
diverite_nitekq_send (diverite_nitekq_device_t *device, unsigned char cmd)
|
||||
@ -352,7 +354,7 @@ diverite_nitekq_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
diverite_nitekq_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
diverite_nitekq_device_t *device = (diverite_nitekq_device_t *) abstract;
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
diverite_nitekq_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
diverite_nitekq_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
diverite_nitekq_parser_create (dc_parser_t **parser, dc_context_t *context);
|
||||
|
||||
|
||||
@ -83,6 +83,8 @@ static const dc_device_vtable_t hw_ostc_device_vtable = {
|
||||
hw_ostc_device_close /* close */
|
||||
};
|
||||
|
||||
static 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);
|
||||
|
||||
static dc_status_t
|
||||
hw_ostc_send (hw_ostc_device_t *device, unsigned char cmd, unsigned int echo)
|
||||
@ -632,7 +634,7 @@ hw_ostc_device_screenshot (dc_device_t *abstract, dc_buffer_t *buffer, hw_ostc_f
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
hw_ostc_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
hw_ostc_device_t *device = (hw_ostc_device_t *) abstract;
|
||||
|
||||
@ -34,9 +34,6 @@ extern "C" {
|
||||
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);
|
||||
|
||||
|
||||
@ -93,6 +93,8 @@ static const mares_darwin_layout_t mares_darwinair_layout = {
|
||||
3 /* samplesize */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
mares_darwin_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
mares_darwin_device_open (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
|
||||
@ -262,7 +264,7 @@ mares_darwin_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback,
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
mares_darwin_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
mares_darwin_device_t *device = (mares_darwin_device_t *) abstract;
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
mares_darwin_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
|
||||
|
||||
dc_status_t
|
||||
mares_darwin_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
mares_darwin_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
|
||||
|
||||
|
||||
@ -282,6 +282,8 @@ mares_nemo_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
|
||||
static dc_status_t
|
||||
mares_nemo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
mares_nemo_device_t *device = (mares_nemo_device_t *) abstract;
|
||||
|
||||
dc_buffer_t *buffer = dc_buffer_new (MEMORYSIZE);
|
||||
if (buffer == NULL)
|
||||
return DC_STATUS_NOMEMORY;
|
||||
@ -300,28 +302,6 @@ mares_nemo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, v
|
||||
devinfo.serial = array_uint16_be (data + 8);
|
||||
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
|
||||
|
||||
rc = mares_nemo_extract_dives (abstract, data, MEMORYSIZE, callback, userdata);
|
||||
|
||||
dc_buffer_free (buffer);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
mares_nemo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
mares_nemo_device_t *device = (mares_nemo_device_t*) abstract;
|
||||
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
if (size < PACKETSIZE)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
|
||||
dc_context_t *context = (abstract ? abstract->context : NULL);
|
||||
unsigned char *fingerprint = (device ? device->fingerprint : NULL);
|
||||
|
||||
const mares_common_layout_t *layout = NULL;
|
||||
switch (data[1]) {
|
||||
case NEMO:
|
||||
@ -332,12 +312,14 @@ mares_nemo_extract_dives (dc_device_t *abstract, const unsigned char data[], uns
|
||||
layout = &mares_nemo_apneist_layout;
|
||||
break;
|
||||
default: // Unknown, try nemo
|
||||
WARNING (abstract->context, "Unsupported model %02x detected!", data[1]);
|
||||
layout = &mares_nemo_layout;
|
||||
break;
|
||||
}
|
||||
|
||||
if (size < layout->memsize)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
rc = mares_common_extract_dives (abstract->context, layout, device->fingerprint, data, callback, userdata);
|
||||
|
||||
return mares_common_extract_dives (context, layout, fingerprint, data, callback, userdata);
|
||||
dc_buffer_free (buffer);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
mares_nemo_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
mares_nemo_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
mares_nemo_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
|
||||
|
||||
|
||||
@ -266,41 +266,3 @@ mares_puck_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, v
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
mares_puck_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
mares_puck_device_t *device = (mares_puck_device_t*) abstract;
|
||||
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
if (size < PACKETSIZE)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
|
||||
dc_context_t *context = (abstract ? abstract->context : NULL);
|
||||
unsigned char *fingerprint = (device ? device->fingerprint : NULL);
|
||||
|
||||
const mares_common_layout_t *layout = NULL;
|
||||
switch (data[1]) {
|
||||
case NEMOWIDE:
|
||||
layout = &mares_nemowide_layout;
|
||||
break;
|
||||
case NEMOAIR:
|
||||
case PUCKAIR:
|
||||
layout = &mares_nemoair_layout;
|
||||
break;
|
||||
case PUCK:
|
||||
layout = &mares_puck_layout;
|
||||
break;
|
||||
default: // Unknown, try puck
|
||||
layout = &mares_puck_layout;
|
||||
break;
|
||||
}
|
||||
|
||||
if (size < layout->memsize)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
|
||||
return mares_common_extract_dives (context, layout, fingerprint, data, callback, userdata);
|
||||
}
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
mares_puck_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
mares_puck_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@ -60,6 +60,8 @@ static const dc_device_vtable_t reefnet_sensus_device_vtable = {
|
||||
reefnet_sensus_device_close /* close */
|
||||
};
|
||||
|
||||
static 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);
|
||||
|
||||
static dc_status_t
|
||||
reefnet_sensus_cancel (reefnet_sensus_device_t *device)
|
||||
@ -368,7 +370,7 @@ reefnet_sensus_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
reefnet_sensus_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
reefnet_sensus_device_t *device = (reefnet_sensus_device_t*) abstract;
|
||||
|
||||
@ -34,9 +34,6 @@ extern "C" {
|
||||
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);
|
||||
|
||||
|
||||
@ -59,6 +59,8 @@ static const dc_device_vtable_t reefnet_sensuspro_device_vtable = {
|
||||
reefnet_sensuspro_device_close /* close */
|
||||
};
|
||||
|
||||
static 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_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
||||
@ -361,7 +363,7 @@ reefnet_sensuspro_device_write_interval (dc_device_t *abstract, unsigned char in
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
reefnet_sensuspro_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
reefnet_sensuspro_device_t *device = (reefnet_sensuspro_device_t*) abstract;
|
||||
|
||||
@ -34,9 +34,6 @@ extern "C" {
|
||||
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);
|
||||
|
||||
|
||||
@ -749,18 +749,3 @@ reefnet_sensusultra_device_foreach (dc_device_t *abstract, dc_dive_callback_t ca
|
||||
|
||||
return DC_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
reefnet_sensusultra_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
reefnet_sensusultra_device_t *device = (reefnet_sensusultra_device_t *) abstract;
|
||||
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
unsigned int remaining = size;
|
||||
unsigned int previous = size;
|
||||
|
||||
return reefnet_sensusultra_parse (device, data, &remaining, &previous, NULL, callback, userdata);
|
||||
}
|
||||
|
||||
@ -34,9 +34,6 @@ extern "C" {
|
||||
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);
|
||||
|
||||
|
||||
@ -60,6 +60,8 @@ static const dc_device_vtable_t shearwater_predator_device_vtable = {
|
||||
shearwater_predator_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
shearwater_predator_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
shearwater_predator_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
||||
@ -337,7 +339,7 @@ shearwater_predator_extract_petrel (dc_device_t *abstract, const unsigned char d
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
shearwater_predator_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
shearwater_predator_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
shearwater_predator_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
shearwater_predator_parser_create (dc_parser_t **parser, dc_context_t *context);
|
||||
|
||||
|
||||
@ -216,6 +216,8 @@ suunto_eon_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
|
||||
static dc_status_t
|
||||
suunto_eon_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
suunto_common_device_t *device = (suunto_common_device_t *) abstract;
|
||||
|
||||
dc_buffer_t *buffer = dc_buffer_new (SZ_MEMORY);
|
||||
if (buffer == NULL)
|
||||
return DC_STATUS_NOMEMORY;
|
||||
@ -238,8 +240,7 @@ suunto_eon_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, v
|
||||
}
|
||||
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
|
||||
|
||||
rc = suunto_eon_extract_dives (abstract,
|
||||
dc_buffer_get_data (buffer), dc_buffer_get_size (buffer), callback, userdata);
|
||||
rc = suunto_common_extract_dives (device, &suunto_eon_layout, data, callback, userdata);
|
||||
|
||||
dc_buffer_free (buffer);
|
||||
|
||||
@ -291,18 +292,3 @@ suunto_eon_device_write_interval (dc_device_t *abstract, unsigned char interval)
|
||||
|
||||
return DC_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
suunto_eon_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
suunto_common_device_t *device = (suunto_common_device_t*) abstract;
|
||||
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
if (size < SZ_MEMORY)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
|
||||
return suunto_common_extract_dives (device, &suunto_eon_layout, data, callback, userdata);
|
||||
}
|
||||
|
||||
@ -34,9 +34,6 @@ extern "C" {
|
||||
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);
|
||||
|
||||
|
||||
@ -57,6 +57,8 @@ static const dc_device_vtable_t suunto_solution_device_vtable = {
|
||||
suunto_solution_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
suunto_solution_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
suunto_solution_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
||||
@ -281,7 +283,7 @@ suunto_solution_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
suunto_solution_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
suunto_solution_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
suunto_solution_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
suunto_solution_parser_create (dc_parser_t **parser, dc_context_t *context);
|
||||
|
||||
|
||||
@ -442,16 +442,6 @@ suunto_vyper_read_dive (dc_device_t *abstract, dc_buffer_t *buffer, int init, dc
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
suunto_vyper_device_read_dive (dc_device_t *abstract, dc_buffer_t *buffer, int init)
|
||||
{
|
||||
if (!ISINSTANCE (abstract))
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
return suunto_vyper_read_dive (abstract, buffer, init, NULL);
|
||||
}
|
||||
|
||||
|
||||
static dc_status_t
|
||||
suunto_vyper_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
|
||||
{
|
||||
@ -553,22 +543,3 @@ suunto_vyper_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback,
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
suunto_vyper_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
suunto_common_device_t *device = (suunto_common_device_t*) abstract;
|
||||
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
if (size < SZ_MEMORY)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
|
||||
const suunto_common_layout_t *layout = &suunto_vyper_layout;
|
||||
if (data[HDR_DEVINFO_VYPER] == 20 || data[HDR_DEVINFO_VYPER] == 30 || data[HDR_DEVINFO_VYPER] == 60)
|
||||
layout = &suunto_spyder_layout;
|
||||
|
||||
return suunto_common_extract_dives (device, layout, data, callback, userdata);
|
||||
}
|
||||
|
||||
@ -33,12 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
suunto_vyper_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
suunto_vyper_device_read_dive (dc_device_t *device, dc_buffer_t *buffer, int init);
|
||||
|
||||
dc_status_t
|
||||
suunto_vyper_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
suunto_vyper_parser_create (dc_parser_t **parser, dc_context_t *context);
|
||||
|
||||
|
||||
@ -65,6 +65,8 @@ static const dc_device_vtable_t uwatec_aladin_device_vtable = {
|
||||
uwatec_aladin_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
uwatec_aladin_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
uwatec_aladin_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
||||
@ -282,7 +284,7 @@ uwatec_aladin_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
uwatec_aladin_extract_dives (dc_device_t *abstract, const unsigned char* data, unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
uwatec_aladin_device_t *device = (uwatec_aladin_device_t*) abstract;
|
||||
|
||||
@ -32,9 +32,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
uwatec_aladin_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
uwatec_aladin_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@ -61,6 +61,8 @@ static const dc_device_vtable_t uwatec_memomouse_device_vtable = {
|
||||
uwatec_memomouse_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
uwatec_memomouse_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
uwatec_memomouse_device_open (dc_device_t **out, dc_context_t *context, const char *name)
|
||||
@ -500,7 +502,7 @@ uwatec_memomouse_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
uwatec_memomouse_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
uwatec_memomouse_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
uwatec_memomouse_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
uwatec_memomouse_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
|
||||
|
||||
|
||||
@ -59,6 +59,8 @@ static const dc_device_vtable_t uwatec_meridian_device_vtable = {
|
||||
uwatec_meridian_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
uwatec_meridian_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
static dc_status_t
|
||||
uwatec_meridian_transfer (uwatec_meridian_device_t *device, const unsigned char command[], unsigned int csize, unsigned char answer[], unsigned int asize)
|
||||
@ -462,7 +464,7 @@ uwatec_meridian_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
uwatec_meridian_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
uwatec_meridian_device_open (dc_device_t **device, dc_context_t *context, const char *name);
|
||||
|
||||
dc_status_t
|
||||
uwatec_meridian_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@ -55,6 +55,8 @@ static const dc_device_vtable_t uwatec_smart_device_vtable = {
|
||||
uwatec_smart_device_close /* close */
|
||||
};
|
||||
|
||||
static dc_status_t
|
||||
uwatec_smart_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
static void
|
||||
uwatec_smart_discovery (unsigned int address, const char *name, unsigned int charset, unsigned int hints, void *userdata)
|
||||
@ -402,7 +404,7 @@ uwatec_smart_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback,
|
||||
}
|
||||
|
||||
|
||||
dc_status_t
|
||||
static dc_status_t
|
||||
uwatec_smart_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
|
||||
{
|
||||
if (abstract && !ISINSTANCE (abstract))
|
||||
|
||||
@ -33,9 +33,6 @@ extern "C" {
|
||||
dc_status_t
|
||||
uwatec_smart_device_open (dc_device_t **device, dc_context_t *context);
|
||||
|
||||
dc_status_t
|
||||
uwatec_smart_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
|
||||
|
||||
dc_status_t
|
||||
uwatec_smart_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model, unsigned int devtime, dc_ticks_t systime);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user