Ubuntu Platform API  3.0.0
A library helping with tight integration into the Ubuntu platform
controller.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voß <thomas.voss@canonical.com>
17  */
18 
19 #ifndef UBUNTU_APPLICATION_LOCATION_SERVICE_CONTROLLER_H_
20 #define UBUNTU_APPLICATION_LOCATION_SERVICE_CONTROLLER_H_
21 
22 #include <ubuntu/status.h>
23 #include <ubuntu/visibility.h>
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
34  typedef enum
35  {
41 
43 
44  typedef unsigned int UALocationServiceStatusFlags;
45 
52  void *context);
53 
58  typedef struct UbuntuApplicationLocationServiceController UALocationServiceController;
59 
67  UALocationServiceController *controller);
68 
76  UALocationServiceController *controller);
77 
87  UALocationServiceController *controller,
89  void *context);
90 
99  UALocationServiceController *controller,
100  UALocationServiceStatusFlags *out_flags);
101 
109  UALocationServiceController *controller);
110 
118  UALocationServiceController *controller);
119 
127  UALocationServiceController *controller);
128 
136  UALocationServiceController *controller);
137 
138 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif // UBUNTU_APPLICATION_LOCATION_SERVICE_CONTROLLER_H_
ua_location_service_controller_disable_gps
UBUNTU_DLL_PUBLIC UStatus ua_location_service_controller_disable_gps(UALocationServiceController *controller)
Disables all gps providers known to the location service.
ua_location_service_controller_unref
UBUNTU_DLL_PUBLIC void ua_location_service_controller_unref(UALocationServiceController *controller)
Decrements the reference count of the controller instance.
visibility.h
ua_location_service_controller_query_status
UBUNTU_DLL_PUBLIC UStatus ua_location_service_controller_query_status(UALocationServiceController *controller, UALocationServiceStatusFlags *out_flags)
Query the status of the location service.
UALocationServiceStatusFlags
unsigned int UALocationServiceStatusFlags
Definition: controller.h:44
UbuntuApplicationLocationServiceStatus
UbuntuApplicationLocationServiceStatus
Location service status.
Definition: controller.h:34
ua_location_service_controller_enable_gps
UBUNTU_DLL_PUBLIC UStatus ua_location_service_controller_enable_gps(UALocationServiceController *controller)
Enables all gps providers known to the location service.
ua_location_service_controller_enable_service
UBUNTU_DLL_PUBLIC UStatus ua_location_service_controller_enable_service(UALocationServiceController *controller)
Enables the location service.
ua_location_service_controller_ref
UBUNTU_DLL_PUBLIC void ua_location_service_controller_ref(UALocationServiceController *controller)
Increments the reference count of the controller instance.
UALocationServiceStatus
UbuntuApplicationLocationServiceStatus UALocationServiceStatus
Definition: controller.h:42
UA_LOCATION_SERVICE_DISABLED
@ UA_LOCATION_SERVICE_DISABLED
Definition: controller.h:37
UbuntuStatus
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
UBUNTU_DLL_PUBLIC
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26
ua_location_service_controller_set_status_changed_handler
UBUNTU_DLL_PUBLIC void ua_location_service_controller_set_status_changed_handler(UALocationServiceController *controller, UALocationServiceStatusChangedHandler handler, void *context)
Sets the status changed handler of the controller instance.
ua_location_service_controller_disable_service
UBUNTU_DLL_PUBLIC UStatus ua_location_service_controller_disable_service(UALocationServiceController *controller)
Disables the location service completely.
UALocationServiceStatusChangedHandler
void(* UALocationServiceStatusChangedHandler)(UALocationServiceStatusFlags flags, void *context)
Callback type that is invoked when the location service status changes.
Definition: controller.h:50
UA_LOCATION_SERVICE_ENABLED
@ UA_LOCATION_SERVICE_ENABLED
Definition: controller.h:36
UA_LOCATION_SERVICE_GPS_DISABLED
@ UA_LOCATION_SERVICE_GPS_DISABLED
Definition: controller.h:39
UALocationServiceController
struct UbuntuApplicationLocationServiceController UALocationServiceController
Opaque type encapsulating a controller the location service.
Definition: controller.h:58
status.h
UA_LOCATION_SERVICE_GPS_ENABLED
@ UA_LOCATION_SERVICE_GPS_ENABLED
Definition: controller.h:38