Diff of /trunk/src/gps.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 53 by harbaum, Wed Aug 12 19:18:53 2009 UTC revision 149 by harbaum, Thu Oct 29 13:59:16 2009 UTC
# Line 149  typedef struct { Line 149  typedef struct {
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
# Line 171  typedef struct gps_state { Line 178  typedef struct gps_state {
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);
# Line 180  float gps_get_heading(appdata_t *appdata Line 190  float gps_get_heading(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

Legend:
Removed from v.53  
changed lines
  Added in v.149