diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 01:59:16 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 11:19:27 -0800 |
commit | cd28e88bee085b1f12561764b87a9b8ffc0a8212 (patch) | |
tree | 1e4861e7e963c61cf78e27f3b49b9d614174b234 /divesite.h | |
parent | ccf833b45cf7cc9f0bc1ddd3220148835062593d (diff) | |
download | subsurface-cd28e88bee085b1f12561764b87a9b8ffc0a8212.tar.gz |
Improve helper functions
Sometimes we want to create a dive site just based on a name, sometimes we
have both a name and GPS coordinates. Let's make a helper for either case.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesite.h')
-rw-r--r-- | divesite.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/divesite.h b/divesite.h index 2a4d8c616..b3487c341 100644 --- a/divesite.h +++ b/divesite.h @@ -4,6 +4,10 @@ #include "units.h" #include <stdlib.h> +#ifdef __cplusplus +extern "C" { +#endif + struct dive_site { uint32_t uuid; @@ -53,7 +57,11 @@ static inline uint32_t get_dive_site_uuid_by_name(const char *name) } struct dive_site *alloc_dive_site(); -uint32_t create_dive_site(const char *name, degrees_t latitude, degrees_t longitude); +uint32_t create_dive_site(const char *name); +uint32_t create_dive_site_with_gps(const char *name, degrees_t latitude, degrees_t longitude); uint32_t dive_site_uuid_by_name(const char *name); +#ifdef __cplusplus +} +#endif #endif // DIVESITE_H |