From 024cf2f59a7ee23f46140932b7b617f1f3fc1508 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 25 Mar 2025 21:47:16 +0100 Subject: Add tests and some fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libgeome.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'libgeome.h') diff --git a/libgeome.h b/libgeome.h index 48e40e3..1e81494 100644 --- a/libgeome.h +++ b/libgeome.h @@ -10,6 +10,19 @@ #define LIBGEOME_DATUM_LONGITUDE UINT64_C(0x0000000000000002) #define LIBGEOME_DATUM_ALTITUDE UINT64_C(0x0000000000000004) +/** + * The highest bit in `.requested_data` that is used + * in the applications version of `struct libgeome_data` + * + * You can an #if'ed CPP warning to detected when this + * value has been changed, so you can add support for + * new data in your application. When you do this, you + * can also always set the `.requested_data` to + * `LIBGEOME_LAST_DATUM - 1U | LIBGEOME_LAST_DATUM` + * to get all data your application support. + */ +#define LIBGEOME_LAST_DATUM LIBGEOME_DATUM_ALTITUDE + /** * Geolocation data @@ -96,7 +109,7 @@ struct libgeome_netservice { /** * Geolocation data that may be provided by the service * - * 0 if unknown (always known (non-zero) when retreived + * 0 if unknown (always known (non-zero) when retrieved * from libgeome_netservices) * * See `struct libgeome_data.requested_data` @@ -156,7 +169,7 @@ struct libgeome_netservice { * Be aware these services may have terms of use that * restrict how you are allowed to use them. */ -extern struct libgeome_netservice libgeome_netservices[]; +extern const struct libgeome_netservice libgeome_netservices[]; /** * The number of elements in `libgeome_netservices` -- cgit v1.2.3-70-g09d2