session.h
Go to the documentation of this file.
/*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Thomas Voß <thomas.voss@canonical.com>
*/
#ifndef UBUNTU_APPLICATION_LOCATION_SESSION_H_
#define UBUNTU_APPLICATION_LOCATION_SESSION_H_
#include <ubuntu/status.h>
#include <ubuntu/visibility.h>
#include <ubuntu/application/location/heading_update.h>
#include <ubuntu/application/location/position_update.h>
#include <ubuntu/application/location/velocity_update.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct UbuntuApplicationLocationServiceSession UALocationServiceSession;
typedef void (*UALocationServiceSessionPositionUpdatesHandler)(
UALocationPositionUpdate *position,
void *context);
typedef void (*UALocationServiceSessionHeadingUpdatesHandler)(
UALocationHeadingUpdate *heading,
void *context);
typedef void (*UALocationServiceSessionVelocityUpdatesHandler)(
UALocationVelocityUpdate *heading,
void *context);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_ref(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_unref(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_set_position_updates_handler(
UALocationServiceSession *session,
UALocationServiceSessionPositionUpdatesHandler handler,
void *context);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_set_heading_updates_handler(
UALocationServiceSession *session,
UALocationServiceSessionHeadingUpdatesHandler handler,
void *context);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_set_velocity_updates_handler(
UALocationServiceSession *session,
UALocationServiceSessionVelocityUpdatesHandler handler,
void *context);
UBUNTU_DLL_PUBLIC UStatus
ua_location_service_session_start_position_updates(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_stop_position_updates(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC UStatus
ua_location_service_session_start_heading_updates(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_stop_heading_updates(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC UStatus
ua_location_service_session_start_velocity_updates(
UALocationServiceSession *session);
UBUNTU_DLL_PUBLIC void
ua_location_service_session_stop_velocity_updates(
UALocationServiceSession *session);
#ifdef __cplusplus
}
#endif
#endif // UBUNTU_APPLICATION_LOCATION_SESSION_H_
ua_location_service_session_start_velocity_updates
UBUNTU_DLL_PUBLIC UStatus ua_location_service_session_start_velocity_updates(UALocationServiceSession *session)
Starts velocity updates for the supplied session.
velocity_update.h
ua_location_service_session_start_heading_updates
UBUNTU_DLL_PUBLIC UStatus ua_location_service_session_start_heading_updates(UALocationServiceSession *session)
Starts heading updates for the supplied session.
ua_location_service_session_start_position_updates
UBUNTU_DLL_PUBLIC UStatus ua_location_service_session_start_position_updates(UALocationServiceSession *session)
Starts position updates for the supplied session.
UALocationVelocityUpdate
struct UbuntuApplicationLocationVelocityUpdate UALocationVelocityUpdate
Opaque type encapsulating a velocity update.
Definition: velocity_update.h:36
heading_update.h
UbuntuStatus
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:26
ua_location_service_session_unref
UBUNTU_DLL_PUBLIC void ua_location_service_session_unref(UALocationServiceSession *session)
Decrements the reference count of the session instance.
UALocationServiceSession
struct UbuntuApplicationLocationServiceSession UALocationServiceSession
Opaque type encapsulating a session with the location service.
Definition: session.h:38
UALocationServiceSessionPositionUpdatesHandler
void(* UALocationServiceSessionPositionUpdatesHandler)(UALocationPositionUpdate *position, void *context)
Callback type that is invoked for position updates.
Definition: session.h:44
visibility.h
UALocationServiceSessionVelocityUpdatesHandler
void(* UALocationServiceSessionVelocityUpdatesHandler)(UALocationVelocityUpdate *heading, void *context)
Callback type that is invoked for velocity updates.
Definition: session.h:60
UALocationHeadingUpdate
struct UbuntuApplicationLocationHeadingUpdate UALocationHeadingUpdate
Opaque type encapsulating a heading update.
Definition: heading_update.h:36
ua_location_service_session_stop_velocity_updates
UBUNTU_DLL_PUBLIC void ua_location_service_session_stop_velocity_updates(UALocationServiceSession *session)
Stops velocity updates for the supplied session.
status.h
ua_location_service_session_set_position_updates_handler
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.
UBUNTU_DLL_PUBLIC
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26
ua_location_service_session_stop_position_updates
UBUNTU_DLL_PUBLIC void ua_location_service_session_stop_position_updates(UALocationServiceSession *session)
Stops position updates for the supplied session.
UALocationServiceSessionHeadingUpdatesHandler
void(* UALocationServiceSessionHeadingUpdatesHandler)(UALocationHeadingUpdate *heading, void *context)
Callback type that is invoked for heading updates.
Definition: session.h:52
ua_location_service_session_ref
UBUNTU_DLL_PUBLIC void ua_location_service_session_ref(UALocationServiceSession *session)
Increments the reference count of the session instance.
UALocationPositionUpdate
struct UbuntuApplicationLocationPositionUpdate UALocationPositionUpdate
Opaque type encapsulating a location update.
Definition: position_update.h:36
ua_location_service_session_set_velocity_updates_handler
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.
ua_location_service_session_stop_heading_updates
UBUNTU_DLL_PUBLIC void ua_location_service_session_stop_heading_updates(UALocationServiceSession *session)
Stops heading updates for the supplied session.
position_update.h
ua_location_service_session_set_heading_updates_handler
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.