BSB Developer Docs
Loading...
Searching...
No Matches
js_app_settings_geo.h File Reference

Geolocation type for application settings. More...

#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  JsAppSettingsGeoValue
 Geolocation value. More...
 

Macros

#define JS_APP_SETTINGS_GEO_NAME_MAX_LENGTH   (128u)
 

Enumerations

enum  JsAppSettingsGeoMode { JsAppSettingsGeoModeAuto , JsAppSettingsGeoModeFixed , JsAppSettingsGeoModesCount }
 Geolocation mode. More...
 

Functions

bool js_app_settings_geo_mode_parse (const char *string, JsAppSettingsGeoMode *mode)
 Parse a geolocation mode string.
 
const char * js_app_settings_geo_mode_format (JsAppSettingsGeoMode mode)
 Format a geolocation mode as a string.
 

Detailed Description

Geolocation type for application settings.

Enumeration Type Documentation

◆ JsAppSettingsGeoMode

Geolocation mode.

Enumerator
JsAppSettingsGeoModeAuto 

Derive coordinates from the device.

JsAppSettingsGeoModeFixed 

Use the given coordinates.

Function Documentation

◆ js_app_settings_geo_mode_format()

const char * js_app_settings_geo_mode_format ( JsAppSettingsGeoMode mode)

Format a geolocation mode as a string.

Parameters
[in]modeMode.
Returns
Mode name, "auto" or "fixed".

◆ js_app_settings_geo_mode_parse()

bool js_app_settings_geo_mode_parse ( const char * string,
JsAppSettingsGeoMode * mode )

Parse a geolocation mode string.

Parameters
[in]string"auto" or "fixed".
[out]modeParsed mode.
Returns
true if the string names a mode, false otherwise.