BSB Developer Docs
Loading...
Searching...
No Matches
js_app_settings_geo.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <stdbool.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#define JS_APP_SETTINGS_GEO_NAME_MAX_LENGTH (128u)
14
18typedef enum {
21
22 JsAppSettingsGeoModesCount,
24
28typedef struct {
30 char name[JS_APP_SETTINGS_GEO_NAME_MAX_LENGTH + 1];
31 float latitude;
32 float longitude;
34
42bool js_app_settings_geo_mode_parse(const char* string, JsAppSettingsGeoMode* mode);
43
51
52#ifdef __cplusplus
53}
54#endif
JsAppSettingsGeoMode
Geolocation mode.
Definition js_app_settings_geo.h:18
@ JsAppSettingsGeoModeFixed
Use the given coordinates.
Definition js_app_settings_geo.h:20
@ JsAppSettingsGeoModeAuto
Derive coordinates from the device.
Definition js_app_settings_geo.h:19
bool js_app_settings_geo_mode_parse(const char *string, JsAppSettingsGeoMode *mode)
Parse a geolocation mode string.
Definition js_app_settings_geo.c:14
const char * js_app_settings_geo_mode_format(JsAppSettingsGeoMode mode)
Format a geolocation mode as a string.
Definition js_app_settings_geo.c:30
Geolocation value.
Definition js_app_settings_geo.h:28
float longitude
Degrees within [-180, 180], NAN in auto mode.
Definition js_app_settings_geo.h:32
float latitude
Degrees within [-90, 90], NAN in auto mode.
Definition js_app_settings_geo.h:31
JsAppSettingsGeoMode mode
Coordinate source.
Definition js_app_settings_geo.h:29