Loading...
Searching...
No Matches
location_store.h
Go to the documentation of this file.
1
9#pragma once
10#include <pebble.h>
11
16
20typedef struct
21{
22 bool live;
23 uint32_t persist_key;
25
31typedef struct
32{
33 const char *lat;
34 const char *lon;
36
44
46void location_store_subscribe(void (*cb)(void));
47
49const char *location_store_lat(void);
50
52const char *location_store_lon(void);
53
void location_store_init(LocationConfig cfg, const LocationSeed *seed)
Start the store with its rules. Pass seed = NULL for normal use.
Definition location_store.c:108
void location_store_subscribe(void(*cb)(void))
Hand it the function to call when the coordinates change (the screen redraw).
Definition location_store.c:103
const char * location_store_lon(void)
The longitude string, or empty if we have not got one yet.
Definition location_store.c:144
const char * location_store_lat(void)
The latitude string, or empty if we have not got one yet.
Definition location_store.c:143
The rules a face hands the store.
Definition location_store.h:21
uint32_t persist_key
Slot for the last good fix so the face owns the key instead of the store.
Definition location_store.h:23
bool live
True subscribes the coordinates channel and false just keeps the fake data for screenshots.
Definition location_store.h:22
Optional prefill, or pinned coords when live = false. On a live store a seed takes the place of resto...
Definition location_store.h:32
const char * lon
Longitude string.
Definition location_store.h:34
const char * lat
Latitude string.
Definition location_store.h:33