"Initial commit to Gerrit"
[profile/ivi/gpsd.git] / gpsdclient.h
1 /*
2  * gpsdclient.h -- common functions for GPSD clients
3  *
4  * This file is Copyright (c) 2010 by the GPSD project
5  * BSD terms apply: see the file COPYING in the distribution root for details.
6  *
7  */
8
9 #ifndef _GPSD_GPSDCLIENT_H_
10 #define _GPSD_GPSDCLIENT_H_
11 struct fixsource_t 
12 /* describe a data source */
13 {
14     char *spec;         /* pointer to actual storage */
15     char *server;
16     char *port;
17     /*@null@*/char *device;
18 };
19
20 enum unit {unspecified, imperial, nautical, metric};
21 enum unit gpsd_units(void);
22 enum deg_str_type { deg_dd, deg_ddmm, deg_ddmmss };
23
24 extern /*@observer@*/ char *deg_to_str( enum deg_str_type type,  double f);
25
26 extern void gpsd_source_spec(/*@null@*/const char *fromstring, 
27                              /*@out@*/struct fixsource_t *source);
28
29 #endif /* _GPSDCLIENT_H_ */
30 /* gpsdclient.h ends here */