![]() |
![]() |
![]() |
liblocation Reference Manual | ![]() |
---|---|---|---|---|
typedef LocationGPSDControlMethod; #define LOCATION_METHOD_USER_SELECTED #define LOCATION_METHOD_CWP #define LOCATION_METHOD_ACWP #define LOCATION_METHOD_GNSS #define LOCATION_METHOD_AGNSS enum LocationGPSDControlInterval; LocationGPSDControl; LocationGPSDControl* location_gpsd_control_get_default (void); void location_gpsd_control_start (LocationGPSDControl *control); void location_gpsd_control_stop (LocationGPSDControl *control); void location_gpsd_control_request_status (LocationGPSDControl *control);
"maincontext-pointer" gpointer : Write "preferred-interval" gint : Read / Write "preferred-method" gint : Read / Write
"error" : Run First / No Recursion "gpsd-running" : Run First / No Recursion "gpsd-stopped" : Run First / No Recursion
typedef gint LocationGPSDControlMethod;
One of LOCATION_METHOD_AGNSS, LOCATION_METHOD_GNSS, LOCATION_METHOD_ACWP, LOCATION_METHOD_CWP, and LOCATION_METHOD_USER_SELECTED.
Please note that these values are in sync with the ones understood by the lower layers.
#define LOCATION_METHOD_USER_SELECTED 0x0
The method is based on the current device settings. This is the default.
#define LOCATION_METHOD_ACWP 0x2
Use the Assisted Complimentary Wireless Position method.
#define LOCATION_METHOD_GNSS 0x4
Use the Global Navigation Satellite System method.
#define LOCATION_METHOD_AGNSS 0x8
Use the Assisted Global Navigation Satellite System method.
typedef enum { LOCATION_INTERVAL_DEFAULT = 0x0000, LOCATION_INTERVAL_1S = 0x000A, LOCATION_INTERVAL_2S = 0x0014, LOCATION_INTERVAL_5S = 0x0032, LOCATION_INTERVAL_10S = 0x0064, LOCATION_INTERVAL_20S = 0x00C8, LOCATION_INTERVAL_30S = 0x012C, LOCATION_INTERVAL_60S = 0x0258, LOCATION_INTERVAL_120S = 0x04B0, } LocationGPSDControlInterval;
Enum representing valid values for the intervals between fixes. Note that only these constants can be specified for the preferred interval value.
typedef struct _LocationGPSDControl LocationGPSDControl;
The object that controls the daemon processes. An application
obtains a single instance of this object by calling the
location_gpsd_control_get_default()
function.
LocationGPSDControl* location_gpsd_control_get_default (void);
This function is used by applications to obtain a single instance of the LocationGPSDControl object.
Returns : | an instance of the LocationGPSDControl object. |
void location_gpsd_control_start (LocationGPSDControl *control);
Starts an active connection to Location server. In other words, by calling this function the application informs that it wants to use the location service.
control : |
The control context. |
void location_gpsd_control_stop (LocationGPSDControl *control);
Informs the location framework that the application is no longer interested about the current location. Location service is kept running as long as there is at least one application using it. Please note that LocationGPSDevice still sends data as long as the location framework is running.
control : |
The control context. |
void location_gpsd_control_request_status (LocationGPSDControl *control);
location_gpsd_control_request_status
is deprecated and should not be used in newly-written code.
control : |
The control context. |
"maincontext-pointer"
property"maincontext-pointer" gpointer : Write
Set the main context address.
"preferred-interval"
property"preferred-interval" gint : Read / Write
The interval between fixes the application prefers. The actual rate may be different.
Allowed values: >= -1
Default value: -1
"error"
signalvoid user_function (LocationGPSDControl *locationgpsdcontrol, gpointer user_data) : Run First / No Recursion
locationgpsdcontrol : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
"gpsd-running"
signalvoid user_function (LocationGPSDControl *locationgpsdcontrol, gpointer user_data) : Run First / No Recursion
locationgpsdcontrol : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
"gpsd-stopped"
signalvoid user_function (LocationGPSDControl *locationgpsdcontrol, gpointer user_data) : Run First / No Recursion
locationgpsdcontrol : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |