LocationGPSDControl

LocationGPSDControl — Object for controlling location services

Synopsis

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);

Object Hierarchy

  GObject
   +----LocationGPSDControl

Properties

  "preferred-interval"       gint                  : Read / Write
  "preferred-method"         gint                  : Read / Write

Signals

  "error"                                          : Run First / No Recursion
  "gpsd-running"                                   : Run First / No Recursion
  "gpsd-stopped"                                   : Run First / No Recursion

Description

A singleton wrapper object that starts and stops location services.

Details

LocationGPSDControlMethod

typedef gint LocationGPSDControlMethod;

Please note that these values are in sync with the ones understood by the lower layers.


LOCATION_METHOD_USER_SELECTED

#define LOCATION_METHOD_USER_SELECTED 0x0


LOCATION_METHOD_CWP

#define LOCATION_METHOD_CWP 0x1


LOCATION_METHOD_ACWP

#define LOCATION_METHOD_ACWP 0x2


LOCATION_METHOD_GNSS

#define LOCATION_METHOD_GNSS 0x4


LOCATION_METHOD_AGNSS

#define LOCATION_METHOD_AGNSS 0x8


enum LocationGPSDControlInterval

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

LOCATION_INTERVAL_DEFAULT Default value for the system
LOCATION_INTERVAL_1S 1 second between subsequent fixes
LOCATION_INTERVAL_2S 2 seconds between subsequent fixes
LOCATION_INTERVAL_5S 5 seconds between subsequent fixes
LOCATION_INTERVAL_10S 10 seconds between subsequent fixes
LOCATION_INTERVAL_20S 20 seconds between subsequent fixes
LOCATION_INTERVAL_30S 30 seconds between subsequent fixes
LOCATION_INTERVAL_60S 60 seconds between subsequent fixes
LOCATION_INTERVAL_120S 120 seconds between subsequent fixes

LocationGPSDControl

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.


location_gpsd_control_get_default ()

LocationGPSDControl* location_gpsd_control_get_default  (void);

This function is used by applications to obtain a single instance of the LocationGPSDControl object.

Returns :

location_gpsd_control_start ()

void                location_gpsd_control_start         (LocationGPSDControl *control);

Starts an active connection to Location server ie. the application informs that it wants to use the location service.

control : The control context

location_gpsd_control_stop ()

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

location_gpsd_control_request_status ()

void                location_gpsd_control_request_status
                                                        (LocationGPSDControl *control);

This function is deprecated and should not be used.

control :

Property Details

The "preferred-interval" property

  "preferred-interval"       gint                  : Read / Write

The interval between fixes the application prefers. The actual rate may different.

Allowed values: >= -1

Default value: -1


The "preferred-method" property

  "preferred-method"         gint                  : Read / Write

The positioning method the application would like to use.

Allowed values: [0,15]

Default value: 0

Signal Details

The "error" signal

void                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.

The "gpsd-running" signal

void                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.

The "gpsd-stopped" signal

void                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.