diff --git a/include/libdivecomputer/suunto_nautic.h b/include/libdivecomputer/suunto_nautic.h index 005b704..06426b7 100644 --- a/include/libdivecomputer/suunto_nautic.h +++ b/include/libdivecomputer/suunto_nautic.h @@ -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//... 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 diff --git a/src/suunto_nautic.c b/src/suunto_nautic.c index 531d183..c9a9472 100644 --- a/src/suunto_nautic.c +++ b/src/suunto_nautic.c @@ -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) {