Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/libdivecomputer/suunto_nautic.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ suunto_nautic_device_list (dc_device_t *device, dc_buffer_t *ids);
unsigned int
suunto_nautic_extract_entry_ids (const unsigned char data[], size_t size, unsigned int *ids, unsigned int max_ids);

/*
* Paged 0x0D fetch of any resource (GET -> every page -> release), up to
* MAX_PAGES. For multi-page /Logbook/byId/<id>/... resources such as
* Descriptors; `response` receives the data bytes with page headers stripped.
*/
dc_status_t
suunto_nautic_device_fetch_paged (dc_device_t *device, const char *path, dc_buffer_t *response);

/*
* Download a dive's /Summary (metadata: gradient factors, gas mix, ...).
* Uses the paginated 0x0D fetch; `summary` receives the raw, uncompressed
Expand Down
9 changes: 9 additions & 0 deletions src/suunto_nautic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,15 @@ suunto_nautic_device_fetch_raw (dc_device_t *abstract, const char *path, dc_buff
return suunto_nautic_short_fetch_frame (abstract, path, response, 1);
}

dc_status_t
suunto_nautic_device_fetch_paged (dc_device_t *abstract, const char *path, dc_buffer_t *response)
{
if (abstract == NULL || abstract->vtable->type != DC_FAMILY_SUUNTO_NAUTIC || path == NULL || response == NULL)
return DC_STATUS_INVALIDARGS;

return suunto_nautic_device_paginated_fetch (abstract, path, response);
}

dc_status_t
suunto_nautic_device_download_summary (dc_device_t *abstract, const char *logbook_id, dc_buffer_t *summary)
{
Expand Down
Loading