149 |
int *used; |
int *used; |
150 |
} gps_sat_t; |
} gps_sat_t; |
151 |
|
|
152 |
|
typedef void (*gps_cb)(struct gps_state *, gpointer data); |
153 |
|
#define GPS_CB(f) ((gps_cb)(f)) |
154 |
|
|
155 |
|
typedef struct { |
156 |
|
gps_cb cb; |
157 |
|
gpointer data; |
158 |
|
} gps_cb_t; |
159 |
|
|
160 |
typedef struct gps_state { |
typedef struct gps_state { |
161 |
#ifndef ENABLE_LIBLOCATION |
#ifndef ENABLE_LIBLOCATION |
178 |
double heading, eph; |
double heading, eph; |
179 |
gps_sat_t sats; |
gps_sat_t sats; |
180 |
#endif |
#endif |
181 |
|
|
182 |
|
GSList *cb; |
183 |
|
|
184 |
} gps_state_t; |
} gps_state_t; |
185 |
|
|
186 |
void gps_init(appdata_t *appdata); |
void gps_init(appdata_t *appdata); |
190 |
float gps_get_eph(appdata_t *appdata); |
float gps_get_eph(appdata_t *appdata); |
191 |
gps_sat_t *gps_get_sats(appdata_t *appdata); |
gps_sat_t *gps_get_sats(appdata_t *appdata); |
192 |
|
|
193 |
|
void *gps_register_callback(appdata_t *appdata, gps_cb cb, gpointer data); |
194 |
|
void gps_unregister_callback(appdata_t *appdata, void *cb); |
195 |
|
|
196 |
#endif // GPS_H |
#endif // GPS_H |