Ubuntu Platform API  2.3.0
A library helping with tight integration into the Ubuntu platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
session.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_SESSION_H_
20 #define UBUNTU_APPLICATION_LOCATION_SESSION_H_
21 
22 #include <ubuntu/status.h>
23 #include <ubuntu/visibility.h>
24 
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
38  typedef struct UbuntuApplicationLocationServiceSession UALocationServiceSession;
39 
45  UALocationPositionUpdate *position,
46  void *context);
47 
53  UALocationHeadingUpdate *heading,
54  void *context);
55 
61  UALocationVelocityUpdate *heading,
62  void *context);
63 
71  UALocationServiceSession *session);
72 
80  UALocationServiceSession *session);
81 
90  UALocationServiceSession *session,
92  void *context);
93 
100  UBUNTU_DLL_PUBLIC void
102  UALocationServiceSession *session,
104  void *context);
105 
112  UBUNTU_DLL_PUBLIC void
114  UALocationServiceSession *session,
116  void *context);
117 
126  UALocationServiceSession *session);
127 
133  UBUNTU_DLL_PUBLIC void
135  UALocationServiceSession *session);
136 
145  UALocationServiceSession *session);
146 
152  UBUNTU_DLL_PUBLIC void
154  UALocationServiceSession *session);
155 
164  UALocationServiceSession *session);
165 
171  UBUNTU_DLL_PUBLIC void
173  UALocationServiceSession *session);
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif // UBUNTU_APPLICATION_LOCATION_SESSION_H_
UBUNTU_DLL_PUBLIC UStatus ua_location_service_session_start_velocity_updates(UALocationServiceSession *session)
Starts velocity updates for the supplied session.
void(* UALocationServiceSessionHeadingUpdatesHandler)(UALocationHeadingUpdate *heading, void *context)
Callback type that is invoked for heading updates.
Definition: session.h:52
UBUNTU_DLL_PUBLIC UStatus ua_location_service_session_start_heading_updates(UALocationServiceSession *session)
Starts heading updates for the supplied session.
UBUNTU_DLL_PUBLIC UStatus ua_location_service_session_start_position_updates(UALocationServiceSession *session)
Starts position updates for the supplied session.
struct UbuntuApplicationLocationVelocityUpdate UALocationVelocityUpdate
Opaque type encapsulating a velocity update.
void(* UALocationServiceSessionPositionUpdatesHandler)(UALocationPositionUpdate *position, void *context)
Callback type that is invoked for position updates.
Definition: session.h:44
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
void(* UALocationServiceSessionVelocityUpdatesHandler)(UALocationVelocityUpdate *heading, void *context)
Callback type that is invoked for velocity updates.
Definition: session.h:60
UBUNTU_DLL_PUBLIC void ua_location_service_session_unref(UALocationServiceSession *session)
Decrements the reference count of the session instance.
struct UbuntuApplicationLocationServiceSession UALocationServiceSession
Opaque type encapsulating a session with the location service.
Definition: session.h:38
struct UbuntuApplicationLocationHeadingUpdate UALocationHeadingUpdate
Opaque type encapsulating a heading update.
UBUNTU_DLL_PUBLIC void ua_location_service_session_stop_velocity_updates(UALocationServiceSession *session)
Stops velocity updates for the supplied session.
UBUNTU_DLL_PUBLIC void ua_location_service_session_set_position_updates_handler(UALocationServiceSession *session, UALocationServiceSessionPositionUpdatesHandler handler, void *context)
Installs an app-specific position update handler for the session.
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26
UBUNTU_DLL_PUBLIC void ua_location_service_session_stop_position_updates(UALocationServiceSession *session)
Stops position updates for the supplied session.
UBUNTU_DLL_PUBLIC void ua_location_service_session_ref(UALocationServiceSession *session)
Increments the reference count of the session instance.
struct UbuntuApplicationLocationPositionUpdate UALocationPositionUpdate
Opaque type encapsulating a location update.
UBUNTU_DLL_PUBLIC void ua_location_service_session_set_velocity_updates_handler(UALocationServiceSession *session, UALocationServiceSessionVelocityUpdatesHandler handler, void *context)
Installs an app-specific velocity update handler for the session.
UBUNTU_DLL_PUBLIC void ua_location_service_session_stop_heading_updates(UALocationServiceSession *session)
Stops heading updates for the supplied session.
UBUNTU_DLL_PUBLIC void ua_location_service_session_set_heading_updates_handler(UALocationServiceSession *session, UALocationServiceSessionHeadingUpdatesHandler handler, void *context)
Installs an app-specific heading update handler for the session.