Merge lp:~gerboland/platform-api/exposeOrientation into lp:~gerboland/platform-api/devel-213

Proposed by Gerry Boland
Status: Superseded
Proposed branch: lp:~gerboland/platform-api/exposeOrientation
Merge into: lp:~gerboland/platform-api/devel-213
Diff against target: 10186 lines (+6020/-2076)
127 files modified
CMakeLists.txt (+10/-31)
android/default/default_ubuntu_application_sensor.cpp (+261/-2)
android/default/default_ubuntu_application_ui.cpp (+16/-0)
android/hybris/test_sensors_c_api.cpp (+31/-7)
android/hybris/ubuntu_application_gps_for_hybris.cpp (+88/-6)
android/hybris/ubuntu_application_sensors_for_hybris.cpp (+5/-0)
android/include/private/application/sensors/events.h (+34/-0)
android/include/private/application/sensors/sensor.h (+3/-0)
android/include/private/application/ui/input/event.h (+0/-106)
android/include/private/application/ui/input/listener.h (+1/-1)
data/CMakeLists.txt (+6/-2)
data/ubuntu-platform-hardware-api.pc.in (+10/-0)
debian/changelog (+211/-3)
debian/control (+127/-87)
debian/libplatform-api1-hybris-tests.install (+0/-6)
debian/libubuntu-application-api-dev.install (+0/-2)
debian/libubuntu-application-api-doc.install (+1/-1)
debian/libubuntu-application-api-headers.install (+1/-0)
debian/libubuntu-application-api-mirclient1.install (+0/-1)
debian/libubuntu-application-api-mirclient1.symbols (+0/-126)
debian/libubuntu-application-api-mirserver1.install (+0/-1)
debian/libubuntu-application-api-mirserver1.symbols (+0/-128)
debian/libubuntu-application-api2.symbols (+45/-27)
debian/libubuntu-platform-hardware-api-dev.install (+1/-1)
debian/libubuntu-platform-hardware-api2.symbols (+13/-1)
debian/rules (+8/-1)
debian/ubuntu-application-api2-desktop.install (+2/-0)
debian/ubuntu-application-api2-examples.install (+7/-0)
debian/ubuntu-application-api2-test.docs (+1/-1)
debian/ubuntu-application-api2-touch.install (+2/-0)
examples/CMakeLists.txt (+29/-0)
examples/test_c_api.cpp (+6/-6)
examples/test_haptic_device.cpp (+44/-0)
examples/test_location_api.cpp (+5/-5)
examples/test_multiple_surfaces_event_delivery.cpp (+8/-8)
examples/test_sensors_api.cpp (+24/-4)
examples/test_session_c_api.cpp (+4/-4)
include/ubuntu/application/CMakeLists.txt (+1/-0)
include/ubuntu/application/init.h (+63/-0)
include/ubuntu/application/location/position_update.h (+40/-0)
include/ubuntu/application/sensors/CMakeLists.txt (+3/-2)
include/ubuntu/application/sensors/accelerometer.h (+12/-0)
include/ubuntu/application/sensors/event/CMakeLists.txt (+2/-1)
include/ubuntu/application/sensors/event/orientation.h (+83/-0)
include/ubuntu/application/sensors/haptic.h (+98/-0)
include/ubuntu/application/sensors/light.h (+12/-0)
include/ubuntu/application/sensors/orientation.h (+144/-0)
include/ubuntu/application/sensors/proximity.h (+12/-0)
include/ubuntu/application/sensors/ubuntu_application_sensors.h (+0/-160)
include/ubuntu/application/ui/CMakeLists.txt (+1/-0)
include/ubuntu/application/ui/input/CMakeLists.txt (+4/-8)
include/ubuntu/application/ui/input/event.h (+115/-72)
include/ubuntu/application/ui/input/event_deprecated.h (+88/-0)
include/ubuntu/application/ui/window.h (+13/-1)
include/ubuntu/application/ui/window_orientation.h (+27/-0)
include/ubuntu/application/ui/window_properties.h (+12/-2)
include/ubuntu/hardware/CMakeLists.txt (+2/-1)
include/ubuntu/hardware/alarm.h (+104/-0)
include/ubuntu/hardware/gps.h (+156/-27)
include/ubuntu/visibility.h (+2/-0)
src/bridge/bridge.h (+63/-0)
src/bridge/bridge_defs.h (+136/-0)
src/ubuntu/CMakeLists.txt (+2/-0)
src/ubuntu/application/CMakeLists.txt (+38/-23)
src/ubuntu/application/base_module.h (+107/-0)
src/ubuntu/application/common/CMakeLists.txt (+8/-0)
src/ubuntu/application/common/application/CMakeLists.txt (+1/-0)
src/ubuntu/application/common/application/location/controller.cpp (+100/-10)
src/ubuntu/application/common/application/location/controller_p.h (+1/-0)
src/ubuntu/application/common/application/location/heading_update.cpp (+1/-1)
src/ubuntu/application/common/application/location/instance.h (+143/-0)
src/ubuntu/application/common/application/location/position_update.cpp (+32/-4)
src/ubuntu/application/common/application/location/ref_counted.h (+1/-1)
src/ubuntu/application/common/application/location/service.cpp (+43/-43)
src/ubuntu/application/common/application/location/session.cpp (+86/-36)
src/ubuntu/application/common/application/location/session_p.h (+100/-4)
src/ubuntu/application/common/application/location/velocity_update.cpp (+1/-1)
src/ubuntu/application/common/application/sensors/CMakeLists.txt (+21/-0)
src/ubuntu/application/common/application/sensors/sensors_p.h (+55/-0)
src/ubuntu/application/common/application/sensors/service.cpp (+131/-0)
src/ubuntu/application/common/application/sensors/usensord_service.h (+80/-0)
src/ubuntu/application/common/mirclient/CMakeLists.txt (+6/-15)
src/ubuntu/application/common/mirclient/ubuntu_application_api_mirclient.cpp (+25/-8)
src/ubuntu/application/common/mirclient/window_mirclient.cpp (+73/-21)
src/ubuntu/application/common/mirclient/window_mirclient_priv.h (+27/-4)
src/ubuntu/application/common/mirclient/window_properties_mirclient.cpp (+22/-10)
src/ubuntu/application/common/mirclient/window_properties_mirclient_priv.h (+14/-3)
src/ubuntu/application/common/mircommon/CMakeLists.txt (+1/-15)
src/ubuntu/application/common/mircommon/event_helpers_mir.cpp (+98/-2)
src/ubuntu/application/common/mircommon/event_helpers_mir.h (+6/-1)
src/ubuntu/application/common/mirserver/CMakeLists.txt (+8/-20)
src/ubuntu/application/common/mirserver/application_instance_mirserver.cpp (+3/-1)
src/ubuntu/application/common/mirserver/ubuntu_application_api_mirserver.cpp (+20/-8)
src/ubuntu/application/common/mirserver/window_mirserver.cpp (+1/-1)
src/ubuntu/application/desktop/CMakeLists.txt (+66/-0)
src/ubuntu/application/desktop/module.cpp (+28/-0)
src/ubuntu/application/desktop/module_version.h (+3/-0)
src/ubuntu/application/desktop/ubuntu_application_sensors_desktop.cpp (+114/-3)
src/ubuntu/application/testbackend/CMakeLists.txt (+11/-1)
src/ubuntu/application/testbackend/module.cpp (+28/-0)
src/ubuntu/application/testbackend/module_version.h (+3/-0)
src/ubuntu/application/testbackend/test_stubs.cpp (+477/-0)
src/ubuntu/application/testbackend/ubuntu_application_sensors.cpp (+125/-1)
src/ubuntu/application/touch/CMakeLists.txt (+68/-0)
src/ubuntu/application/touch/hybris/CMakeLists.txt (+7/-48)
src/ubuntu/application/touch/hybris/hybris_module.h (+24/-183)
src/ubuntu/application/touch/hybris/ubuntu_application_api_hybris.cpp (+5/-1)
src/ubuntu/application/touch/hybris/ubuntu_application_sensors_hybris.cpp (+22/-1)
src/ubuntu/application/touch/module.cpp (+28/-0)
src/ubuntu/application/touch/module_version.h (+3/-0)
src/ubuntu/application/ubuntu_application_api.cpp (+250/-0)
src/ubuntu/hardware/CMakeLists.txt (+45/-0)
src/ubuntu/hardware/alarms/CMakeLists.txt (+9/-0)
src/ubuntu/hardware/alarms/alarm.cpp (+304/-0)
src/ubuntu/hardware/android_hw_module.h (+61/-0)
src/ubuntu/hardware/tests/CMakeLists.txt (+17/-0)
src/ubuntu/hardware/tests/test_alarms_api.cpp (+62/-0)
src/ubuntu/hardware/tests/test_gps_api.cpp (+287/-0)
src/ubuntu/hardware/ubuntu_platform_hardware_api.cpp (+103/-0)
src/ubuntu/hybris/tests/CMakeLists.txt (+0/-29)
src/ubuntu/hybris/tests/test_gps_api.cpp (+0/-252)
src/ubuntu/hybris/ubuntu_platform_hardware_api.cpp (+0/-78)
src/ubuntu/mirserver/ubuntu_application_api_mirserver_priv.h (+0/-43)
tests/CMakeLists.txt (+36/-17)
tests/test_ua_sensors_mock.cpp (+268/-0)
tests/test_ua_sensors_real.cpp (+114/-0)
tests/test_ubuntu_application_sensors.cpp (+0/-345)
To merge this branch: bzr merge lp:~gerboland/platform-api/exposeOrientation
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+232249@code.launchpad.net

Commit message

Add readonly notifyable property "orientation" to Window

Description of the change

Add window orientation property

To post a comment you must log in.
261. By Gerry Boland

Add newline to warning message

262. By Gerry Boland

[debian] symbols file - let magic release scripts figure out new symbol version

263. By Gerry Boland

Merge trunk. Bump to version 2.4.0

Unmerged revisions

263. By Gerry Boland

Merge trunk. Bump to version 2.4.0

262. By Gerry Boland

[debian] symbols file - let magic release scripts figure out new symbol version

261. By Gerry Boland

Add newline to warning message

260. By Gerry Boland

Merge trunk & update changelog

259. By Gerry Boland

Small tweaks to fix build and syntax

258. By Gerry Boland

Add readonly notifyable property "orientation" to Window

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-05-07 12:21:22 +0000
+++ CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -2,8 +2,8 @@
22
3project(ubuntu-platform-api)3project(ubuntu-platform-api)
44
5set(UBUNTU_PLATFORM_API_VERSION_MAJOR 1)5set(UBUNTU_PLATFORM_API_VERSION_MAJOR 2)
6set(UBUNTU_PLATFORM_API_VERSION_MINOR 1)6set(UBUNTU_PLATFORM_API_VERSION_MINOR 2)
7set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)7set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)
88
9set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")9set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
@@ -57,35 +57,13 @@
57 ON57 ON
58)58)
5959
60option(60find_package(PkgConfig)
61 ENABLE_MIRSERVER_IMPLEMENTATION61pkg_check_modules(MIRSERVER REQUIRED mirserver)
62 "Enable mirserver based platorm API implementation"62pkg_check_modules(MIRCLIENT REQUIRED mirclient)
63 OFF63
64)64find_package(Protobuf REQUIRED)
6565if(PROTOBUF_PROTOC_EXECUTABLE STREQUAL "PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND")
66if(ENABLE_MIRSERVER_IMPLEMENTATION)66 message(SEND_ERROR "protoc executable not found! Missing protobuf-compiler package?")
67 find_package(PkgConfig)
68 pkg_check_modules(MIRSERVER REQUIRED mirserver)
69endif(ENABLE_MIRSERVER_IMPLEMENTATION)
70
71option(
72 ENABLE_MIRCLIENT_IMPLEMENTATION
73 "Enable mirclient based platform API implementation"
74 OFF
75)
76
77if(ENABLE_MIRCLIENT_IMPLEMENTATION)
78 find_package(PkgConfig)
79 pkg_check_modules(MIRCLIENT REQUIRED mirclient)
80
81 find_package(Protobuf REQUIRED)
82 if(PROTOBUF_PROTOC_EXECUTABLE STREQUAL "PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND")
83 message(SEND_ERROR "protoc executable not found! Missing protobuf-compiler package?")
84 endif()
85endif(ENABLE_MIRCLIENT_IMPLEMENTATION)
86
87if(ENABLE_MIRCLIENT_IMPLEMENTATION OR ENABLE_MIRSERVER_IMPLEMENTATION)
88 pkg_check_modules(MIRCOMMON REQUIRED mircommon)
89endif()67endif()
9068
91# Try to find hybris, and disable hybris from build if not found69# Try to find hybris, and disable hybris from build if not found
@@ -105,6 +83,7 @@
105add_subdirectory(doc/)83add_subdirectory(doc/)
106add_subdirectory(include/)84add_subdirectory(include/)
107add_subdirectory(src/)85add_subdirectory(src/)
86add_subdirectory(examples/)
10887
109#### Enable tests88#### Enable tests
110include(CTest)89include(CTest)
11190
=== modified file 'android/default/default_ubuntu_application_sensor.cpp'
--- android/default/default_ubuntu_application_sensor.cpp 2014-02-13 14:04:30 +0000
+++ android/default/default_ubuntu_application_sensor.cpp 2014-08-26 16:06:15 +0000
@@ -17,10 +17,10 @@
17 * Ricardo Mendoza <ricardo.mendoza@canonical.com>17 * Ricardo Mendoza <ricardo.mendoza@canonical.com>
18 */18 */
1919
20#include <ubuntu/application/sensors/ubuntu_application_sensors.h>
21#include <ubuntu/application/sensors/accelerometer.h>20#include <ubuntu/application/sensors/accelerometer.h>
22#include <ubuntu/application/sensors/proximity.h>21#include <ubuntu/application/sensors/proximity.h>
23#include <ubuntu/application/sensors/light.h>22#include <ubuntu/application/sensors/light.h>
23#include <ubuntu/application/sensors/orientation.h>
2424
25#include <private/application/sensors/sensor.h>25#include <private/application/sensors/sensor.h>
26#include <private/application/sensors/sensor_listener.h>26#include <private/application/sensors/sensor_listener.h>
@@ -55,7 +55,8 @@
55{55{
56 SensorListener() : on_accelerometer_event(NULL),56 SensorListener() : on_accelerometer_event(NULL),
57 on_proximity_event(NULL),57 on_proximity_event(NULL),
58 on_light_event(NULL)58 on_light_event(NULL),
59 on_orientation_event(NULL)
59 {60 {
60 }61 }
6162
@@ -63,6 +64,25 @@
63 {64 {
64 switch(sensor_type)65 switch(sensor_type)
65 {66 {
67 case ubuntu::application::sensors::sensor_type_orientation:
68 {
69 if (!on_orientation_event)
70 return;
71
72 ubuntu::application::sensors::OrientationEvent::Ptr ev(
73 new ubuntu::application::sensors::OrientationEvent(
74 reading->timestamp,
75 reading->vector[0],
76 reading->vector[1],
77 reading->vector[2])
78 );
79
80 on_orientation_event(
81 make_holder(ev), this->context
82 );
83
84 break;
85 }
66 case ubuntu::application::sensors::sensor_type_accelerometer:86 case ubuntu::application::sensors::sensor_type_accelerometer:
67 {87 {
68 if (!on_accelerometer_event)88 if (!on_accelerometer_event)
@@ -122,12 +142,15 @@
122 on_accelerometer_event_cb on_accelerometer_event;142 on_accelerometer_event_cb on_accelerometer_event;
123 on_proximity_event_cb on_proximity_event;143 on_proximity_event_cb on_proximity_event;
124 on_light_event_cb on_light_event;144 on_light_event_cb on_light_event;
145 on_orientation_event_cb on_orientation_event;
125 void *context;146 void *context;
126};147};
127148
149ubuntu::application::sensors::Sensor::Ptr orientation;
128ubuntu::application::sensors::Sensor::Ptr accelerometer;150ubuntu::application::sensors::Sensor::Ptr accelerometer;
129ubuntu::application::sensors::Sensor::Ptr proximity;151ubuntu::application::sensors::Sensor::Ptr proximity;
130ubuntu::application::sensors::Sensor::Ptr light;152ubuntu::application::sensors::Sensor::Ptr light;
153ubuntu::application::sensors::SensorListener::Ptr orientation_listener;
131ubuntu::application::sensors::SensorListener::Ptr accelerometer_listener;154ubuntu::application::sensors::SensorListener::Ptr accelerometer_listener;
132ubuntu::application::sensors::SensorListener::Ptr proximity_listener;155ubuntu::application::sensors::SensorListener::Ptr proximity_listener;
133ubuntu::application::sensors::SensorListener::Ptr light_listener;156ubuntu::application::sensors::SensorListener::Ptr light_listener;
@@ -266,6 +289,22 @@
266 s->register_listener(proximity_listener);289 s->register_listener(proximity_listener);
267}290}
268291
292UStatus
293ua_sensors_proximity_set_event_rate(
294 UASensorsProximity* sensor,
295 uint32_t rate)
296{
297 if (sensor == NULL)
298 return U_STATUS_ERROR;
299
300 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
301 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
302 if (!s->set_event_rate(rate))
303 return U_STATUS_ERROR;
304
305 return U_STATUS_SUCCESS;
306}
307
269uint64_t308uint64_t
270uas_proximity_event_get_timestamp(309uas_proximity_event_get_timestamp(
271 UASProximityEvent* event)310 UASProximityEvent* event)
@@ -410,6 +449,22 @@
410 s->register_listener(light_listener);449 s->register_listener(light_listener);
411}450}
412451
452UStatus
453ua_sensors_light_set_event_rate(
454 UASensorsLight* sensor,
455 uint32_t rate)
456{
457 if (sensor == NULL)
458 return U_STATUS_ERROR;
459
460 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
461 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
462 if (!s->set_event_rate(rate))
463 return U_STATUS_ERROR;
464
465 return U_STATUS_SUCCESS;
466}
467
413uint64_t468uint64_t
414uas_light_event_get_timestamp(469uas_light_event_get_timestamp(
415 UASLightEvent* event)470 UASLightEvent* event)
@@ -554,6 +609,22 @@
554 s->register_listener(accelerometer_listener);609 s->register_listener(accelerometer_listener);
555}610}
556611
612UStatus
613ua_sensors_accelerometer_set_event_rate(
614 UASensorsAccelerometer* sensor,
615 uint32_t rate)
616{
617 if (sensor == NULL)
618 return U_STATUS_ERROR;
619
620 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
621 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
622 if (!s->set_event_rate(rate))
623 return U_STATUS_ERROR;
624
625 return U_STATUS_SUCCESS;
626}
627
557uint64_t628uint64_t
558uas_accelerometer_event_get_timestamp(629uas_accelerometer_event_get_timestamp(
559 UASAccelerometerEvent* event)630 UASAccelerometerEvent* event)
@@ -603,3 +674,191 @@
603674
604 return U_STATUS_SUCCESS;675 return U_STATUS_SUCCESS;
605}676}
677
678/*
679 * Orientation Sensor
680 */
681
682UASensorsOrientation*
683ua_sensors_orientation_new()
684{
685 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
686 orientation =
687 ubuntu::application::sensors::SensorService::sensor_for_type(
688 ubuntu::application::sensors::sensor_type_orientation);
689
690 return orientation.get();
691}
692
693UStatus
694ua_sensors_orientation_enable(
695 UASensorsOrientation* sensor)
696{
697 if (sensor == NULL)
698 return U_STATUS_ERROR;
699
700 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
701 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
702
703 s->enable();
704
705 return U_STATUS_SUCCESS;
706}
707
708UStatus
709ua_sensors_orientation_disable(
710 UASensorsOrientation* sensor)
711{
712 if (sensor == NULL)
713 return U_STATUS_ERROR;
714
715 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
716 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
717 s->disable();
718
719 return U_STATUS_SUCCESS;
720}
721
722uint32_t
723ua_sensors_orientation_get_min_delay(
724 UASensorsOrientation* sensor)
725{
726 if (sensor == NULL)
727 return -1;
728
729 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
730 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
731 return toHz(s->min_delay());
732}
733
734UStatus
735ua_sensors_orientation_get_min_value(
736 UASensorsOrientation* sensor,
737 float* value)
738{
739 if (sensor == NULL || value == NULL)
740 return U_STATUS_ERROR;
741
742 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
743 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
744 *value = s->min_value();
745
746 return U_STATUS_SUCCESS;
747}
748
749UStatus
750ua_sensors_orientation_get_max_value(
751 UASensorsOrientation* sensor,
752 float* value)
753{
754 if (sensor == NULL || value == NULL)
755 return U_STATUS_ERROR;
756
757 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
758 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
759 *value = s->max_value();
760
761 return U_STATUS_SUCCESS;
762}
763
764UStatus
765ua_sensors_orientation_get_resolution(
766 UASensorsOrientation* sensor,
767 float* value)
768{
769 if (sensor == NULL || value == NULL)
770 return U_STATUS_ERROR;
771
772 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
773 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
774 *value = s->resolution();
775
776 return U_STATUS_SUCCESS;
777}
778
779void
780ua_sensors_orientation_set_reading_cb(
781 UASensorsOrientation* sensor,
782 on_orientation_event_cb cb,
783 void *ctx)
784{
785 if (sensor == NULL)
786 return;
787
788 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
789
790 SensorListener<ubuntu::application::sensors::sensor_type_orientation>* sl
791 = new SensorListener<ubuntu::application::sensors::sensor_type_orientation>();
792
793 sl->on_orientation_event = cb;
794 sl->context = ctx;
795
796 orientation_listener = sl;
797 s->register_listener(orientation_listener);
798}
799
800UStatus
801ua_sensors_orientation_set_event_rate(
802 UASensorsOrientation* sensor,
803 uint32_t rate)
804{
805 if (sensor == NULL)
806 return U_STATUS_ERROR;
807
808 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
809 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
810 if (!s->set_event_rate(rate))
811 return U_STATUS_ERROR;
812
813 return U_STATUS_SUCCESS;
814}
815
816uint64_t
817uas_orientation_event_get_timestamp(
818 UASOrientationEvent* event)
819{
820 auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
821 return ev->value->get_timestamp();
822}
823
824UStatus
825uas_orientation_event_get_azimuth(
826 UASOrientationEvent* event,
827 float* value)
828{
829 if (event == NULL || value == NULL)
830 return U_STATUS_ERROR;
831
832 auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
833 *value = ev->value->get_azimuth();
834
835 return U_STATUS_SUCCESS;
836}
837
838UStatus
839uas_orientation_event_get_pitch(
840 UASOrientationEvent* event,
841 float* value)
842{
843 if (event == NULL || value == NULL)
844 return U_STATUS_ERROR;
845
846 auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
847 *value = ev->value->get_pitch();
848
849 return U_STATUS_SUCCESS;
850}
851
852UStatus
853uas_orientation_event_get_roll(
854 UASOrientationEvent* event,
855 float* value)
856{
857 if (event == NULL || value == NULL)
858 return U_STATUS_ERROR;
859
860 auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
861 *value = ev->value->get_roll();
862
863 return U_STATUS_SUCCESS;
864}
606865
=== modified file 'android/default/default_ubuntu_application_ui.cpp'
--- android/default/default_ubuntu_application_ui.cpp 2013-12-11 06:11:34 +0000
+++ android/default/default_ubuntu_application_ui.cpp 2014-08-26 16:06:15 +0000
@@ -229,6 +229,11 @@
229}229}
230230
231void231void
232ua_ui_window_properties_set_event_cb_and_ctx(UAUiWindowProperties*, UAUiWindowEventCb, void *)
233{
234}
235
236void
232ua_ui_window_properties_set_dimensions(237ua_ui_window_properties_set_dimensions(
233 UAUiWindowProperties *properties,238 UAUiWindowProperties *properties,
234 uint32_t width,239 uint32_t width,
@@ -438,3 +443,14 @@
438 auto p = static_cast<Holder<ubuntu::application::ui::Surface::Ptr>*>(window);443 auto p = static_cast<Holder<ubuntu::application::ui::Surface::Ptr>*>(window);
439 return p->value->to_native_window_type();444 return p->value->to_native_window_type();
440}445}
446
447UApplicationUiWindowOrientation
448ua_ui_window_get_orientation(
449 UAUiWindow *window)
450{
451 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
452
453 auto p = static_cast<Holder<ubuntu::application::ui::Surface::Ptr>*>(window);
454 return p->value->get_orientation();
455}
456
441457
=== modified file 'android/hybris/test_sensors_c_api.cpp'
--- android/hybris/test_sensors_c_api.cpp 2014-02-13 14:06:55 +0000
+++ android/hybris/test_sensors_c_api.cpp 2014-08-26 16:06:15 +0000
@@ -19,18 +19,22 @@
19#include <stdint.h>19#include <stdint.h>
20#include <stdio.h>20#include <stdio.h>
21#include <string.h>21#include <string.h>
22#define __STDC_FORMAT_MACROS
23#include <inttypes.h>
2224
23#include <ubuntu/application/sensors/accelerometer.h>25#include <ubuntu/application/sensors/accelerometer.h>
24#include <ubuntu/application/sensors/proximity.h>26#include <ubuntu/application/sensors/proximity.h>
25#include <ubuntu/application/sensors/light.h>27#include <ubuntu/application/sensors/light.h>
28#include <ubuntu/application/sensors/orientation.h>
2629
27void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)30void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)
28{31{
29 printf("%s \n", __PRETTY_FUNCTION__);
30 float x; uas_accelerometer_event_get_acceleration_x(event, &x);32 float x; uas_accelerometer_event_get_acceleration_x(event, &x);
31 float y; uas_accelerometer_event_get_acceleration_x(event, &y);33 float y; uas_accelerometer_event_get_acceleration_y(event, &y);
32 float z; uas_accelerometer_event_get_acceleration_x(event, &z);34 float z; uas_accelerometer_event_get_acceleration_z(event, &z);
33 printf("\ttime: %llu\n", uas_accelerometer_event_get_timestamp(event));35
36 printf("%s \n", __PRETTY_FUNCTION__);
37 printf("\ttime: %" PRIu64 "\n", uas_accelerometer_event_get_timestamp(event));
34 printf("\tx: %f\n", x);38 printf("\tx: %f\n", x);
35 printf("\ty: %f\n", y);39 printf("\ty: %f\n", y);
36 printf("\tz: %f\n", z);40 printf("\tz: %f\n", z);
@@ -39,7 +43,7 @@
39void on_new_proximity_event(UASProximityEvent* event, void* context)43void on_new_proximity_event(UASProximityEvent* event, void* context)
40{44{
41 printf("%s \n", __PRETTY_FUNCTION__);45 printf("%s \n", __PRETTY_FUNCTION__);
42 printf("\ttime: %llu\n", uas_proximity_event_get_timestamp(event));46 printf("\ttime: %" PRIu64 "\n", uas_proximity_event_get_timestamp(event));
4347
44 switch (uas_proximity_event_get_distance(event))48 switch (uas_proximity_event_get_distance(event))
45 {49 {
@@ -58,17 +62,32 @@
5862
59void on_new_light_event(UASLightEvent* event, void* context)63void on_new_light_event(UASLightEvent* event, void* context)
60{64{
65 float light = -1.f; uas_light_event_get_light(event, &light);
66
61 printf("%s \n", __PRETTY_FUNCTION__);67 printf("%s \n", __PRETTY_FUNCTION__);
62 printf("\ttime: %llu\n", uas_light_event_get_timestamp(event));68 printf("\ttime: %" PRIu64 "\n", uas_light_event_get_timestamp(event));
63 float light; uas_light_event_get_light(event, &light);
64 printf("\tlight: %f\n", light);69 printf("\tlight: %f\n", light);
65}70}
6671
72void on_new_orientation_event(UASOrientationEvent* event, void* context)
73{
74 float x; uas_orientation_event_get_azimuth(event, &x);
75 float y; uas_orientation_event_get_pitch(event, &y);
76 float z; uas_orientation_event_get_roll(event, &z);
77
78 printf("%s \n", __PRETTY_FUNCTION__);
79 printf("\ttime: %" PRIu64 "\n", uas_orientation_event_get_timestamp(event));
80 printf("\tx: %f\n", x);
81 printf("\ty: %f\n", y);
82 printf("\tz: %f\n", z);
83}
84
67int main(int argc, char** argv)85int main(int argc, char** argv)
68{86{
69 UASensorsAccelerometer* accelerometer = ua_sensors_accelerometer_new();87 UASensorsAccelerometer* accelerometer = ua_sensors_accelerometer_new();
70 UASensorsProximity* proximity = ua_sensors_proximity_new();88 UASensorsProximity* proximity = ua_sensors_proximity_new();
71 UASensorsLight* ambientlight = ua_sensors_light_new();89 UASensorsLight* ambientlight = ua_sensors_light_new();
90 UASensorsOrientation* orientation = ua_sensors_orientation_new();
7291
73 ua_sensors_accelerometer_set_reading_cb(accelerometer,92 ua_sensors_accelerometer_set_reading_cb(accelerometer,
74 on_new_accelerometer_event,93 on_new_accelerometer_event,
@@ -82,9 +101,14 @@
82 on_new_light_event,101 on_new_light_event,
83 NULL);102 NULL);
84103
104 ua_sensors_orientation_set_reading_cb(orientation,
105 on_new_orientation_event,
106 NULL);
107
85 ua_sensors_accelerometer_enable(accelerometer);108 ua_sensors_accelerometer_enable(accelerometer);
86 ua_sensors_proximity_enable(proximity);109 ua_sensors_proximity_enable(proximity);
87 ua_sensors_light_enable(ambientlight);110 ua_sensors_light_enable(ambientlight);
111 ua_sensors_orientation_enable(orientation);
88112
89 while(true)113 while(true)
90 {114 {
91115
=== modified file 'android/hybris/ubuntu_application_gps_for_hybris.cpp'
--- android/hybris/ubuntu_application_gps_for_hybris.cpp 2013-06-14 11:42:24 +0000
+++ android/hybris/ubuntu_application_gps_for_hybris.cpp 2014-08-26 16:06:15 +0000
@@ -36,7 +36,15 @@
36 bool stop();36 bool stop();
37 void inject_time(int64_t time, int64_t timeReference, int uncertainty);37 void inject_time(int64_t time, int64_t timeReference, int uncertainty);
38 void inject_location(double latitude, double longitude, float accuracy);38 void inject_location(double latitude, double longitude, float accuracy);
39 void delete_aiding_data(uint16_t flags);39 void delete_aiding_data(UHardwareGpsAidingData flags);
40
41 void set_server_for_type(UHardwareGpsAGpsType type, const char* hostname, uint16_t port);
42 void set_reference_location(UHardwareGpsAGpsRefLocation* location, size_t size_of_struct);
43
44 void notify_connection_is_open(const char* apn);
45 void notify_connection_is_closed();
46 void notify_connection_not_available();
47
40 bool set_position_mode(uint32_t mode, uint32_t recurrence, uint32_t min_interval,48 bool set_position_mode(uint32_t mode, uint32_t recurrence, uint32_t min_interval,
41 uint32_t preferred_accuracy, uint32_t preferred_time);49 uint32_t preferred_accuracy, uint32_t preferred_time);
42 void inject_xtra_data(char* data, int length);50 void inject_xtra_data(char* data, int length);
@@ -344,7 +352,7 @@
344352
345void UHardwareGps_::inject_location(double latitude, double longitude, float accuracy)353void UHardwareGps_::inject_location(double latitude, double longitude, float accuracy)
346{354{
347 if (gps_interface)355 if (gps_interface && gps_interface->inject_location)
348 gps_interface->inject_location(latitude, longitude, accuracy);356 gps_interface->inject_location(latitude, longitude, accuracy);
349}357}
350358
@@ -354,6 +362,44 @@
354 gps_interface->delete_aiding_data(flags);362 gps_interface->delete_aiding_data(flags);
355}363}
356364
365void UHardwareGps_::set_server_for_type(UHardwareGpsAGpsType type, const char* hostname, uint16_t port)
366{
367 if (agps_interface && agps_interface->set_server)
368 agps_interface->set_server(type, hostname, port);
369}
370
371void UHardwareGps_::set_reference_location(UHardwareGpsAGpsRefLocation* location, size_t size_of_struct)
372{
373 AGpsRefLocation ref_loc;
374 ref_loc.type = location->type;
375 ref_loc.u.cellID.type = location->u.cellID.type;
376 ref_loc.u.cellID.mcc = location->u.cellID.mcc;
377 ref_loc.u.cellID.mnc = location->u.cellID.mnc;
378 ref_loc.u.cellID.lac = location->u.cellID.lac;
379 ref_loc.u.cellID.cid = location->u.cellID.cid;
380
381 if (agps_ril_interface && agps_ril_interface->set_ref_location)
382 agps_ril_interface->set_ref_location(&ref_loc, sizeof(ref_loc));
383}
384
385void UHardwareGps_::notify_connection_is_open(const char* apn)
386{
387 if (agps_interface && agps_interface->data_conn_open)
388 agps_interface->data_conn_open(apn);
389}
390
391void UHardwareGps_::notify_connection_is_closed()
392{
393 if (agps_interface && agps_interface->data_conn_closed)
394 agps_interface->data_conn_closed();
395}
396
397void UHardwareGps_::notify_connection_not_available()
398{
399 if (agps_interface && agps_interface->data_conn_failed)
400 agps_interface->data_conn_failed();
401}
402
357bool UHardwareGps_::set_position_mode(uint32_t mode, uint32_t recurrence, uint32_t min_interval,403bool UHardwareGps_::set_position_mode(uint32_t mode, uint32_t recurrence, uint32_t min_interval,
358 uint32_t preferred_accuracy, uint32_t preferred_time)404 uint32_t preferred_accuracy, uint32_t preferred_time)
359{405{
@@ -413,17 +459,53 @@
413 self->inject_time(time, time_reference, uncertainty);459 self->inject_time(time, time_reference, uncertainty);
414}460}
415461
416void u_hardware_gps_inject_location(UHardwareGps self, double latitude, double longitude,462void u_hardware_gps_inject_location(UHardwareGps self,
417 float accuracy)463 UHardwareGpsLocation location)
418{464{
419 self->inject_location(latitude, longitude, accuracy);465 self->inject_location(location.latitude, location.longitude,
466 location.accuracy);
420}467}
421468
422void u_hardware_gps_delete_aiding_data(UHardwareGps self, uint16_t flags)469void u_hardware_gps_delete_aiding_data(UHardwareGps self, UHardwareGpsAidingData flags)
423{470{
424 self->delete_aiding_data(flags);471 self->delete_aiding_data(flags);
425}472}
426473
474void u_hardware_gps_agps_set_server_for_type(
475 UHardwareGps self,
476 UHardwareGpsAGpsType type,
477 const char* hostname,
478 uint16_t port)
479{
480 self->set_server_for_type(type, hostname, port);
481}
482
483void u_hardware_gps_agps_set_reference_location(
484 UHardwareGps self,
485 UHardwareGpsAGpsRefLocation *location,
486 size_t size_of_struct)
487{
488 self->set_reference_location(location, size_of_struct);
489}
490
491void u_hardware_gps_agps_notify_connection_is_open(
492 UHardwareGps self,
493 const char *apn)
494{
495 self->notify_connection_is_open(apn);
496}
497
498void u_hardware_gps_agps_notify_connection_is_closed(UHardwareGps self)
499{
500 self->notify_connection_is_closed();
501}
502
503void u_hardware_gps_agps_notify_connection_not_available(UHardwareGps self)
504{
505 self->notify_connection_not_available();
506}
507
508
427bool u_hardware_gps_set_position_mode(UHardwareGps self, uint32_t mode, uint32_t recurrence,509bool u_hardware_gps_set_position_mode(UHardwareGps self, uint32_t mode, uint32_t recurrence,
428 uint32_t min_interval, uint32_t preferred_accuracy,510 uint32_t min_interval, uint32_t preferred_accuracy,
429 uint32_t preferred_time)511 uint32_t preferred_time)
430512
=== modified file 'android/hybris/ubuntu_application_sensors_for_hybris.cpp'
--- android/hybris/ubuntu_application_sensors_for_hybris.cpp 2013-05-30 02:03:42 +0000
+++ android/hybris/ubuntu_application_sensors_for_hybris.cpp 2014-08-26 16:06:15 +0000
@@ -162,6 +162,11 @@
162 return sensor->getPowerUsage();162 return sensor->getPowerUsage();
163 }163 }
164164
165 int set_event_rate(uint32_t nsecs)
166 {
167 return sensor_event_queue->setEventRate(sensor, nsecs);
168 }
169
165 const android::Sensor* sensor;170 const android::Sensor* sensor;
166 ubuntu::application::sensors::SensorListener::Ptr listener;171 ubuntu::application::sensors::SensorListener::Ptr listener;
167 android::List<ubuntu::application::sensors::SensorListener::Ptr> listeners;172 android::List<ubuntu::application::sensors::SensorListener::Ptr> listeners;
168173
=== modified file 'android/include/private/application/sensors/events.h'
--- android/include/private/application/sensors/events.h 2013-05-30 02:03:42 +0000
+++ android/include/private/application/sensors/events.h 2014-08-26 16:06:15 +0000
@@ -28,6 +28,40 @@
28{28{
29namespace sensors29namespace sensors
30{30{
31class OrientationEvent : public platform::ReferenceCountedBase
32{
33public:
34 OrientationEvent(uint64_t timestamp, float azimuth, float pitch, float roll)
35 : timestamp(timestamp),
36 azimuth(azimuth),
37 pitch(pitch),
38 roll(roll)
39 {}
40
41 typedef ubuntu::platform::shared_ptr<OrientationEvent> Ptr;
42
43 uint64_t get_timestamp()
44 {
45 return this->timestamp;
46 }
47
48 float get_azimuth() { return this->azimuth; }
49 float get_pitch() { return this->pitch; }
50 float get_roll() { return this->roll; }
51
52private:
53 uint64_t timestamp;
54 float azimuth;
55 float pitch;
56 float roll;
57
58protected:
59 virtual ~OrientationEvent() {}
60
61 OrientationEvent(const OrientationEvent&) = delete;
62 OrientationEvent& operator=(const OrientationEvent&) = delete;
63};
64
31class AccelerometerEvent : public platform::ReferenceCountedBase65class AccelerometerEvent : public platform::ReferenceCountedBase
32{66{
33public:67public:
3468
=== modified file 'android/include/private/application/sensors/sensor.h'
--- android/include/private/application/sensors/sensor.h 2013-05-30 02:03:42 +0000
+++ android/include/private/application/sensors/sensor.h 2014-08-26 16:06:15 +0000
@@ -66,6 +66,9 @@
66 /** Returns an estimate of the sensor's power consumption, normalized to [0,1]. */66 /** Returns an estimate of the sensor's power consumption, normalized to [0,1]. */
67 virtual float power_consumption() = 0;67 virtual float power_consumption() = 0;
6868
69 /** Set event delivery rate for the given sensor, in nanoseconds */
70 virtual int set_event_rate(uint32_t nsecs) = 0;
71
69 /** Returns the minimum delay between two consecutive sensor readings. */72 /** Returns the minimum delay between two consecutive sensor readings. */
70 virtual int32_t min_delay() = 0;73 virtual int32_t min_delay() = 0;
7174
7275
=== removed file 'android/include/private/application/ui/input/event.h'
--- android/include/private/application/ui/input/event.h 2013-05-21 20:54:48 +0000
+++ android/include/private/application/ui/input/event.h 1970-01-01 00:00:00 +0000
@@ -1,106 +0,0 @@
1/*
2 * Copyright © 2012 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#ifndef UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
19#define UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
20
21#include <stddef.h>
22#include <stdint.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28 /** Maximum number of pointers reported within one input event. */
29#define UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT (16)
30
31 /** Reference timebase, nanoseconds as measured by CLOCK_MONOTONIC. */
32 typedef int64_t nsecs_t;
33
34 /** Describes the different event types. */
35 typedef enum
36 {
37 KEY_EVENT_TYPE, ///< Event originates from a keyboard.
38 MOTION_EVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
39 HW_SWITCH_EVENT_TYPE ///< Event originates from an additional button attached to the device's HW, e.g., power button.
40 } EventType;
41
42 /** Models an input event. */
43 typedef struct
44 {
45 EventType type; ///< Type of the event.
46 int32_t device_id; ///< Device that this event originated from.
47 int32_t source_id; ///< Source that this event originated from.
48 int32_t action; ///< Action signalled by this event.
49 int32_t flags; ///< Flags associated with this event.
50 int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
51 /** Information specific to key/motion event types. */
52 union
53 {
54 /** Information describing an event originating from a HW switch. */
55 struct HardwareSwitchEvent
56 {
57 nsecs_t event_time; ///< Timestamp when the event happened.
58 uint32_t policy_flags; ///< Policy flags.
59 int32_t switch_code; ///< The scan code of the switch.
60 int32_t switch_value; ///< The value reported by the switch.
61 } hw_switch;
62 /** Information describing an event originating from a keyboard key. */
63 struct KeyEvent
64 {
65 int32_t key_code;
66 int32_t scan_code;
67 int32_t repeat_count;
68 nsecs_t down_time;
69 nsecs_t event_time;
70 int is_system_key; ///< \deprecated Do not use.
71 } key;
72 /** Information describing an event originating from a
73 * "moving" device, e.g., a mouse, a mouse-wheel, a finger
74 * on a touchpad.
75 */
76 struct MotionEvent
77 {
78 int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
79 int32_t button_state; ///< State of buttons of the device
80 float x_offset; ///< Movement in x direction since down event
81 float y_offset; ///< Movement in y direction since down event
82 float x_precision; ///< Sampling precision in x direction
83 float y_precision; ///< Sampling precision in y direction
84 nsecs_t down_time; ///< Timestamp that marks the down event
85 nsecs_t event_time; ///< Timestamp that marks when this event happened
86 size_t pointer_count; ///< Number of pointers reported in this event
87 struct PointerCoordinate
88 {
89 int id; ///< Unique id of the pointer
90 float x, raw_x; ///< Processed and raw x coordinates
91 float y, raw_y; ///< Processed and raw y coordinates
92 float touch_major; ///< Touch major coordinate
93 float touch_minor; ///< Touch minor coordinate
94 float size; ///< Size of the pointer/touch
95 float pressure; ///< Pressure of the touch
96 float orientation; ///< Orientation
97 } pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
98 } motion;
99 } details;
100 } Event;
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif // UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
1070
=== modified file 'android/include/private/application/ui/input/listener.h'
--- android/include/private/application/ui/input/listener.h 2013-05-21 20:54:48 +0000
+++ android/include/private/application/ui/input/listener.h 2014-08-26 16:06:15 +0000
@@ -18,7 +18,7 @@
18#ifndef UBUNTU_APPLICATION_UI_INPUT_LISTENER_H_18#ifndef UBUNTU_APPLICATION_UI_INPUT_LISTENER_H_
19#define UBUNTU_APPLICATION_UI_INPUT_LISTENER_H_19#define UBUNTU_APPLICATION_UI_INPUT_LISTENER_H_
2020
21#include "private/application/ui/input/event.h"21#include "ubuntu/application/ui/input/event.h"
22#include "private/platform/shared_ptr.h"22#include "private/platform/shared_ptr.h"
2323
24namespace ubuntu24namespace ubuntu
2525
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2013-06-13 12:04:14 +0000
+++ data/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -2,7 +2,11 @@
2 ubuntu-platform-api.pc.in ubuntu-platform-api.pc @ONLY2 ubuntu-platform-api.pc.in ubuntu-platform-api.pc @ONLY
3)3)
44
5configure_file(
6 ubuntu-platform-hardware-api.pc.in ubuntu-platform-hardware-api.pc @ONLY
7)
8
5install(9install(
6 FILES ${CMAKE_CURRENT_BINARY_DIR}/ubuntu-platform-api.pc10 FILES ${CMAKE_CURRENT_BINARY_DIR}/ubuntu-platform-api.pc ${CMAKE_CURRENT_BINARY_DIR}/ubuntu-platform-hardware-api.pc
7 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig11 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig
8)
9\ No newline at end of file12\ No newline at end of file
13)
1014
=== added file 'data/ubuntu-platform-hardware-api.pc.in'
--- data/ubuntu-platform-hardware-api.pc.in 1970-01-01 00:00:00 +0000
+++ data/ubuntu-platform-hardware-api.pc.in 2014-08-26 16:06:15 +0000
@@ -0,0 +1,10 @@
1prefix=@CMAKE_INSTALL_PREFIX@
2exec_prefix=${prefix}
3libdir=${prefix}/@LIB_INSTALL_DIR@
4includedir=${exec_prefix}/include
5
6Name: ubuntu_platform_hardware_api
7Description: Ubuntu's platform hardware abstraction layer.
8Version: @UBUNTU_PLATFORM_API_VERSION_MAJOR@.@UBUNTU_PLATFORM_API_VERSION_MINOR@.@UBUNTU_PLATFORM_API_VERSION_PATCH@
9Libs: -L${libdir} -lubuntu_platform_hardware_api
10Cflags: -I${includedir}/ubuntu
011
=== modified file 'debian/changelog'
--- debian/changelog 2014-05-14 22:05:06 +0000
+++ debian/changelog 2014-08-26 16:06:15 +0000
@@ -1,12 +1,220 @@
1platform-api (1.1.0-0ubuntu1) UNRELEASED; urgency=medium1platform-api (2.2.1) UNRELEASED; urgency=medium
22
3 * Add window orientation property (readonly, notifyable)
4
5 -- Gerry Boland <gerry.boland@canonical.com> Wed, 20 Aug 2014 18:10:51 +0100
6
7platform-api (2.2.0+14.10.20140825-0ubuntu1) utopic; urgency=low
8
9 [ thomas-voss ]
10 * Implement installation of changed handlers. Subscribe to state
11 properties. (LP: #1348334)
12
13 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 25 Aug 2014 08:34:53 +0000
14
15platform-api (2.2.0+14.10.20140821-0ubuntu1) utopic; urgency=low
16
17 [ Iain Lane ]
18 * Fix error by pulling out and sharing a struct instead of defining it
19 twice. (LP: #1350874)
20
21 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 21 Aug 2014 09:32:54 +0000
22
23platform-api (2.2.0+14.10.20140812-0ubuntu1) utopic; urgency=low
24
25 [ Cemil Azizoglu ]
26 * Bump ABI for Mir 0.6.0 release.
27
28 [ Alan Griffiths ]
29 * Bump ABI for Mir 0.6.0 release.
30
31 [ Kevin Gunn ]
32 * Bump ABI for Mir 0.6.0 release.
33
34 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 12 Aug 2014 18:49:40 +0000
35
36platform-api (2.2.0+14.10.20140808-0ubuntu1) utopic; urgency=low
37
38 [ thomas-voss ]
39 * Implement installation of changed handlers. Subscribe to state
40 properties. (LP: #1348334)
41
42 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 08 Aug 2014 02:07:56 +0000
43
44platform-api (2.2.0+14.10.20140801-0ubuntu1) utopic; urgency=low
45
46 [ Ricardo Mendoza ]
47 * Remove stale event.h header, use public one instead.
48
49 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 01 Aug 2014 10:16:51 +0000
50
51platform-api (2.2.0+14.10.20140730-0ubuntu1) utopic; urgency=low
52
53 [ thomas-voss ]
54 * Check for null in functions accessing a session object. Make sure
55 that exceptions cannot propagate for controller interactions. (LP:
56 #1338610)
57
58 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 30 Jul 2014 07:26:34 +0000
59
60platform-api (2.2.0+14.10.20140728-0ubuntu1) utopic; urgency=medium
61
62 [ Gerry Boland ]
63 * Add window resize support
64 * Add window focus event
65
66 [ Ubuntu daily release ]
67 * debian/libubuntu-application-api2.symbols: auto-update to released
68 version
69 * New rebuild forced
70
71 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 28 Jul 2014 02:53:27 +0000
72
73platform-api (2.1.0+14.10.20140721-0ubuntu1) utopic; urgency=low
74
75 [ thomas-voss ]
76 * Explicitly select g++-4.9 to prevent from ABI breaks.
77
78 [ Steve Langasek ]
79 * Explicitly select g++-4.9 to prevent from ABI breaks.
80
81 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 21 Jul 2014 08:47:18 +0000
82
83platform-api (2.1.0+14.10.20140717-0ubuntu1) utopic; urgency=low
84
85 [ Cemil Azizoglu ]
86 * Mir display server 0.5.0 release.
87
88 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 17 Jul 2014 08:03:12 +0000
89
90platform-api (2.1.0+14.10.20140715-0ubuntu1) utopic; urgency=low
91
92 * New rebuild forced
93
94 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 15 Jul 2014 14:20:04 +0000
95
96platform-api (2.1.0+14.10.20140702-0ubuntu1) utopic; urgency=low
97
98 [ Alberto Aguirre ]
99 * Bump Mir dependencies to 0.4.0.
100
101 [ Cemil Azizoglu ]
102 * Bump Mir dependencies to 0.4.0.
103
104 [ Kevin Gunn ]
105 * Bump Mir dependencies to 0.4.0.
106
107 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 02 Jul 2014 02:11:11 +0000
108
109platform-api (2.1.0+14.10.20140701-0ubuntu1) utopic; urgency=low
110
111 [ Sergio Schvezov ]
112 * Setting -Wl,--no-as-needed for sensors.
113
114 [ Ricardo Mendoza ]
115 * Run thread for dbus client connection (sensors service)
116
117 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 01 Jul 2014 15:17:32 +0000
118
119platform-api (2.1.0+14.10.20140630-0ubuntu1) utopic; urgency=low
120
121 [ Ubuntu daily release ]
122 * debian/*symbols: auto-update new symbols to released version
123
124 [ thomas-voss ]
125 * Adjust to API changes in location service. Implement controller
126 interface. Add functions to query the accuracy estimates for a
127 position update. (LP: #1281817)
128
129 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 30 Jun 2014 08:54:28 +0000
130
131platform-api (2.1.0+14.10.20140624.4-0ubuntu1) utopic; urgency=low
132
133 [ Ricardo Mendoza ]
134 * Add missing enable/disable functions for haptic
135
136 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 24 Jun 2014 20:22:48 +0000
137
138platform-api (2.1.0+14.10.20140623.1-0ubuntu1) utopic; urgency=medium
139
140 [ Ricardo Mendoza ]
141 * Added orientation sensor, extended existing sensor API to allow
142 for dynamic event rate setting.
143
144 [ Ubuntu daily release ]
145 * debian/*symbols: auto-update new symbols to released version
146
147 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 23 Jun 2014 16:39:59 +0000
148
149platform-api (2.0.0+14.10.20140618.1-0ubuntu1) utopic; urgency=low
150
151 [ Tarmac ]
152 * Updated for Mir 0.3.0 release.
153
154 [ Ubuntu daily release ]
155 * New rebuild forced
156
157 [ Cemil Azizoglu ]
158 * Updated for Mir 0.3.0 release.
159
160 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 18 Jun 2014 19:31:24 +0000
161
162platform-api (2.0.0+14.10.20140612-0ubuntu1) utopic; urgency=medium
163
164 [ Ricardo Mendoza ]
165 * Bump API version to 2.0
166 * Introduce support for dynamic backend loading
167 * Package naming changes
168 * Further support for test backend
169 * Unified bridge
170
171 [ Ubuntu daily release ]
172 * debian/*symbols: auto-update new symbols to released version
173 * New rebuild forced
174
175 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 12 Jun 2014 09:48:31 +0000
176
177platform-api (1.2.0+14.10.20140605-0ubuntu1) utopic; urgency=low
178
179 [ Ubuntu daily release ]
180 * New rebuild forced
181
182 [ Cemil Azizoglu ]
183 * staging 0.2.0
184
185 [ Kevin Gunn ]
186 * staging 0.2.0
187
188 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 05 Jun 2014 14:08:48 +0000
189
190platform-api (1.2.0+14.10.20140522.1-0ubuntu1) utopic; urgency=medium
191
192 [ Manuel de la Pena ]
193 * Add agps hooks in the hardware api to allow the use of supl.
194
195 [ Ubuntu daily release ]
196 * debian/*symbols: auto-update new symbols to released version
197
198 [ thomas-voss ]
199 * Add hw alarm api implementation for android's /dev/alarm. Add simple
200 test executable for hw alarm api implementation on android. Adjust
201 interface signatures to make sure that status of operations is
202 reported correctly. Add HW Alarms API interface definition. Add
203 Ubuntu implementation that will bridge over to the android world.
204 (LP: #1299916)
205
206 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 22 May 2014 15:29:47 +0000
207
208platform-api (1.1.0+14.10.20140515.1-0ubuntu1) utopic; urgency=medium
209
210 [ Gerry Boland ]
3 [Daniel d'Andrada]211 [Daniel d'Andrada]
4 * Add ua_ui_window_get_size().212 * Add ua_ui_window_get_size().
5 213
6 [Gerry Boland]214 [Gerry Boland]
7 * Bump package version to match library version.215 * Bump package version to match library version.
8216
9 -- Gerry Boland <gerry.boland@canonical.com> Tue, 13 May 2014 16:18:07 +0100217 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 15 May 2014 17:18:39 +0000
10218
11platform-api (0.21+14.10.20140507-0ubuntu1) utopic; urgency=medium219platform-api (0.21+14.10.20140507-0ubuntu1) utopic; urgency=medium
12220
13221
=== modified file 'debian/control'
--- debian/control 2014-05-07 07:39:57 +0000
+++ debian/control 2014-08-26 16:06:15 +0000
@@ -2,19 +2,24 @@
2Priority: optional2Priority: optional
3Section: devel3Section: devel
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: cmake,5Build-Depends: android-headers,
6 cmake,
6 debhelper (>= 9),7 debhelper (>= 9),
7 doxygen,8 doxygen,
8 graphviz,9 graphviz,
10# We rely on C++11 features, and to prevent from ABI breaks
11# in libstdc++ causing us issues, we explicitly select a G++
12# version.
13 g++-4.9,
9 libgles2-mesa-dev,14 libgles2-mesa-dev,
10 libhybris-common-dev,15 libhybris-common-dev,
11 pkg-config,16 pkg-config,
12 libmirclient-dev (>= 0.1.8),17 libmirclient-dev (>= 0.6.0),
13 libmirserver-dev (>= 0.1.9),18 libmirserver-dev (>= 0.6.0),
14 liburl-dispatcher1-dev,19 liburl-dispatcher1-dev,
15 libdbus-1-dev,20 libdbus-1-dev,
16 libdbus-cpp-dev (>= 2.0.0),21 libdbus-cpp-dev (>= 4.0.0),
17 libubuntu-location-service-dev,22 libubuntu-location-service-dev (>= 1.0.0),
18 libgtest-dev,23 libgtest-dev,
19 libprocess-cpp-dev (>= 0.0.1+14.04.20131212),24 libprocess-cpp-dev (>= 0.0.1+14.04.20131212),
20 libproperties-cpp-dev,25 libproperties-cpp-dev,
@@ -26,9 +31,11 @@
26# just go ahead. ~phablet-team will notice and sync up the code again.31# just go ahead. ~phablet-team will notice and sync up the code again.
27Vcs-Browser: https://code.launchpad.net/platform-api32Vcs-Browser: https://code.launchpad.net/platform-api
2833
29Package: libplatform-api-headers34Package: libubuntu-application-api-headers
30Section: libdevel35Section: libdevel
31Architecture: any36Architecture: any
37Replaces: libplatform-api-headers (<< 2.0.0)
38Breaks: libplatform-api-headers (<< 2.0.0)
32Pre-Depends: ${misc:Pre-Depends},39Pre-Depends: ${misc:Pre-Depends},
33Multi-Arch: same40Multi-Arch: same
34Depends: ${misc:Depends},41Depends: ${misc:Depends},
@@ -39,9 +46,11 @@
39 should build depend on the libplatform-api-dev package instead, which46 should build depend on the libplatform-api-dev package instead, which
40 will pull this package as well.47 will pull this package as well.
4148
42Package: libplatform-hardware-api-headers49Package: libubuntu-platform-hardware-api-headers
43Section: libdevel50Section: libdevel
44Architecture: any51Architecture: any
52Replaces: libplatform-hardware-api-headers (<< 2.0.0)
53Breaks: libplatform-hardware-api-headers (<< 2.0.0)
45Pre-Depends: ${misc:Pre-Depends},54Pre-Depends: ${misc:Pre-Depends},
46Multi-Arch: same55Multi-Arch: same
47Depends: ${misc:Depends},56Depends: ${misc:Depends},
@@ -50,75 +59,81 @@
50 This package provides the library headers for the hw-access parts of the Platform API.59 This package provides the library headers for the hw-access parts of the Platform API.
51 .60 .
52 Unless a new backend for the Platform API is developed, packages61 Unless a new backend for the Platform API is developed, packages
53 should build depend on the libplatform-hardware-api-dev package instead, which62 should build depend on the libubuntu-platform-hardware-api-dev package instead, which
54 will pull this package as well.63 will pull this package as well.
5564
56Package: libplatform-api1-dev65Package: libubuntu-application-api-dev
57Section: libdevel66Section: libdevel
58Architecture: any67Architecture: any
68Replaces: libplatform-api1-dev (<< 2.0.0)
69Breaks: libplatform-api1-dev (<< 2.0.0)
59Pre-Depends: ${misc:Pre-Depends},70Pre-Depends: ${misc:Pre-Depends},
60Multi-Arch: same71Multi-Arch: same
61Depends: ${misc:Depends},72Depends: ${misc:Depends},
62 libgles2-mesa-dev,73 libgles2-mesa-dev,
63 libplatform-api-headers (= ${binary:Version}),74 libubuntu-application-api-headers (= ${binary:Version}),
64 libubuntu-application-api1 | libplatform-api1,75 libubuntu-application-api2,
65 libubuntu-application-api-mirserver1 (= ${binary:Version}),76 ubuntu-application-api2-touch (= ${binary:Version}),
66 libubuntu-application-api-mirclient1 (= ${binary:Version}),77 ubuntu-application-api2-desktop (= ${binary:Version}),
67 ${misc:Depends},78 ${misc:Depends},
68Suggests: libplatform-api1-doc,79Suggests: libubuntu-application-api-doc,
69Description: Platform API for system level capabilities (development)80Description: Ubuntu Application API for system level capabilities (development)
70 This package provides the development library and headers (via81 This package provides the development library and headers (via
71 dependency) for the Platform API.82 dependency) for the Ubuntu Application API.
7283
73Package: libubuntu-application-api-mirserver184Package: ubuntu-application-api2-touch
74Section: libs85Section: libs
75Pre-Depends: ${misc:Pre-Depends},86Pre-Depends: ${misc:Pre-Depends},
76Multi-Arch: same87Multi-Arch: same
77Architecture: any88Architecture: any
78Depends: ${misc:Depends},89Depends: ${misc:Depends},
79 ${shlibs:Depends},90 ${shlibs:Depends},
80Description: Implementation of the Platform API for a Mir server91 libubuntu-application-api2 (= ${binary:Version}),
81 This package provides the implementation of the Platform API to92Description: Implementation of the Platform API for Ubuntu Touch
82 provide a server instance of Mir.93 This package provides the implementation of the Platform API to
8394 bring up an Ubuntu Touch system.
84Package: libubuntu-application-api-mirclient195
85Section: libs96Package: ubuntu-application-api2-desktop
86Pre-Depends: ${misc:Pre-Depends},97Section: libs
87Multi-Arch: same98Pre-Depends: ${misc:Pre-Depends},
88Architecture: any99Multi-Arch: same
89Depends: ${misc:Depends},100Architecture: any
90 ${shlibs:Depends},101Depends: ${misc:Depends},
91Description: Implementation of the Platform API for a Mir client102 ${shlibs:Depends},
92 This package provides the implementation of the Platform API to103 libubuntu-application-api2 (= ${binary:Version}),
93 allow a client to connect to a Mir server.104Description: Implementation of the Platform API for Ubuntu Desktop
94105 This package provides the implementation of the Platform API to
95Package: libplatform-hardware-api1-dev106 bring up an Ubuntu Desktop system.
107
108Package: libubuntu-platform-hardware-api-dev
96Section: libdevel109Section: libdevel
97Architecture: any110Architecture: any
111Replaces: libplatform-hardware-api1-dev (<< 2.0.0)
112Breaks: libplatform-hardware-api1-dev (<< 2.0.0)
98Pre-Depends: ${misc:Pre-Depends},113Pre-Depends: ${misc:Pre-Depends},
99Multi-Arch: same114Multi-Arch: same
100Depends: ${misc:Depends},115Depends: ${misc:Depends},
101 libgles2-mesa-dev,116 libgles2-mesa-dev,
102 libplatform-hardware-api-headers (= ${binary:Version}),117 libubuntu-platform-hardware-api-headers (= ${binary:Version}),
103 libubuntu-platform-hardware-api1 | libplatform-hardware-api1,118 libubuntu-platform-hardware-api2
104Suggests: libplatform-api1-doc,119Suggests: libubuntu-application-api-doc,
105Description: Platform API for system level capabilities (development)120Description: Platform API for system level capabilities (development)
106 This package provides the development library and headers (via121 This package provides the development library and headers (via
107 dependency) for the hw-access portions of the Platform API.122 dependency) for the hw-access portions of the Platform API.
108123
109Package: libplatform-api1-doc124Package: libubuntu-application-api-doc
110Section: doc125Section: doc
111Architecture: all126Architecture: all
127Replaces: libplatform-api1-doc (<< 2.0.0)
128Breaks: libplatform-api1-doc (<< 2.0.0)
112Depends: ${misc:Depends},129Depends: ${misc:Depends},
113 libplatform-api1-dev,130 libubuntu-application-api-dev,
114Description: Platform API for system level capabilities (development)131Description: Platform API for system level capabilities (development)
115 This package provides the developer documentation for the Platform API.132 This package provides the developer documentation for the Platform API.
116133
117Package: libubuntu-platform-hardware-api1134Package: libubuntu-platform-hardware-api2
118Section: libs135Section: libs
119Architecture: any136Architecture: any
120Replaces: libplatform-hardware-api1-hybris (<< 0.18.3)
121Breaks: libplatform-hardware-api1-hybris (<< 0.18.3)
122Pre-Depends: ${misc:Pre-Depends},137Pre-Depends: ${misc:Pre-Depends},
123Multi-Arch: same138Multi-Arch: same
124Depends: ${misc:Depends},139Depends: ${misc:Depends},
@@ -129,11 +144,9 @@
129 The produced library should be used via libhybris, to communicate with the144 The produced library should be used via libhybris, to communicate with the
130 Android userspace, which is where the device drivers live.145 Android userspace, which is where the device drivers live.
131146
132Package: libubuntu-application-api1147Package: libubuntu-application-api2
133Section: libs148Section: libs
134Architecture: any149Architecture: any
135Replaces: libplatform-api1-hybris (<< 0.18.3)
136Breaks: libplatform-api1-hybris (<< 0.18.3)
137Pre-Depends: ${misc:Pre-Depends},150Pre-Depends: ${misc:Pre-Depends},
138Multi-Arch: same151Multi-Arch: same
139Depends: ${misc:Depends},152Depends: ${misc:Depends},
@@ -144,13 +157,14 @@
144 The produced library should be used via libhybris, to communicate with the157 The produced library should be used via libhybris, to communicate with the
145 Android userspace, which is where the Ubuntu Application Manager lives.158 Android userspace, which is where the Ubuntu Application Manager lives.
146159
147Package: libubuntu-application-api-test1160Package: ubuntu-application-api2-test
148Section: libs161Section: libs
149Architecture: any162Architecture: any
150Pre-Depends: ${misc:Pre-Depends},163Pre-Depends: ${misc:Pre-Depends},
151Multi-Arch: same164Multi-Arch: same
152Depends: ${misc:Depends},165Depends: ${misc:Depends},
153 ${shlibs:Depends},166 ${shlibs:Depends},
167 libubuntu-application-api2 (= ${binary:Version}),
154Description: test implementation of the Platform API168Description: test implementation of the Platform API
155 This package provides an implementation of the Platform API for testing. It169 This package provides an implementation of the Platform API for testing. It
156 does not communicate with actual hardware, but reads input from a text file.170 does not communicate with actual hardware, but reads input from a text file.
@@ -160,40 +174,66 @@
160 .174 .
161 For now this provides simulated sensors.175 For now this provides simulated sensors.
162176
177Package: ubuntu-application-api2-examples
178Architecture: any
179Replaces: libplatform-api1-hybris-tests (<< 2.0.0)
180Breaks: libplatform-api1-hybris-tests (<< 2.0.0)
181Depends: ${misc:Depends},
182 ${shlibs:Depends},
183 ubuntu-application-api2-test,
184 ubuntu-application-api2-touch | ubuntu-application-api2-desktop,
185Description: Binary examples for Ubuntu Application API
186 This package provides a set of example programs that excercise most the
187 set of APIs provided by the Application API.
188
189Package: libplatform-api-headers
190Section: oldlibs
191Architecture: all
192Depends: libubuntu-application-api-headers,
193 ${misc:Depends},
194Description: dummy transitional package for libplatform-api-headers
195 This is a dummy transitional package, please use libubuntu-application-api-headers
196 instead.
197
198Package: libplatform-hardware-api-headers
199Section: oldlibs
200Architecture: all
201Depends: libubuntu-platform-hardware-api-headers,
202 ${misc:Depends},
203Description: dummy transitional package for libplatform-hardware-api-headers
204 This is a dummy transitional package, please use libubuntu-platform-hardware-api-headers
205 instead.
206
207Package: libplatform-api1-dev
208Section: oldlibs
209Architecture: all
210Depends: libubuntu-application-api-dev,
211 ${misc:Depends},
212Description: dummy transitional package for libplatform-api1-dev
213 This is a dummy transitional package, please use libubuntu-application-api-dev
214
215Package: libplatform-hardware-api1-dev
216Section: oldlibs
217Architecture: all
218Depends: libubuntu-platform-hardware-api-dev,
219 ${misc:Depends},
220Description: dummy transitional package for libplatform-hardware-api1-dev
221 This is a dummy transitional package, please use libubuntu-platform-hardware-api-dev
222 instead.
223
163Package: libplatform-api1-hybris-tests224Package: libplatform-api1-hybris-tests
164Architecture: any225Section: oldlibs
165Depends: ${misc:Depends},226Architecture: all
166 ${shlibs:Depends},227Depends: ubuntu-application-api2-examples,
167 libubuntu-application-api1 (= ${binary:Version}),228 ${misc:Depends},
168Description: Hybris implementation of the Platform API (tests)229Description: dummy transitional package for libplatform-api1-hybris-tests
169 This package provides the test cases for the hybris implementation230 This is a dummy transitional package, please use ubuntu-application-api2-examples
170 of the Platform API.231
171232Package: libplatform-api1-doc
172Package: libubuntu-platform-api1-dev233Section: oldlibs
173Section: oldlibs234Architecture: all
174Architecture: all235Depends: libubuntu-application-api-doc,
175Depends: ${misc:Depends},236 ${misc:Depends},
176 libplatform-api1-dev (= ${binary:Version}),237Description: dummy transitional package for libplatform-api1-doc
177Description: dummy transitional package for libplatform-api1-dev238 This is a dummy transitional package, please use libubuntu-application-api-doc
178 This is dummy transitional package, please use libplatform-api1-dev instead.
179 .
180 This package can be safely removed.
181
182Package: libplatform-api1-hybris
183Section: oldlibs
184Architecture: all
185Depends: libubuntu-application-api1,
186 ${misc:Depends},
187Description: dummy transitional package for libplatform-api1-hybris
188 This is a dummy transitional package, please use libubuntu-application-api1
189 instead.
190
191Package: libplatform-hardware-api1-hybris
192Section: oldlibs
193Architecture: all
194Depends: libubuntu-platform-hardware-api1,
195 ${misc:Depends},
196Description: dummy transitional package for libplatform-hardware-api1-hybris
197 This is a dummy transitional package, please use libubuntu-platform-hardware-api1
198 instead.
199239
200240
=== removed file 'debian/libplatform-api1-hybris-tests.install'
--- debian/libplatform-api1-hybris-tests.install 2013-08-17 05:22:31 +0000
+++ debian/libplatform-api1-hybris-tests.install 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1usr/bin/test_android_gps_api
2usr/bin/test_android_sensors_api
3usr/bin/test_android_ubuntu_app_api
4usr/bin/test_android_ubuntu_app_api_multiple_surfaces
5usr/bin/test_android_ubuntu_session_api
6usr/bin/test_ubuntu_app_api_location_service
7\ No newline at end of file0\ No newline at end of file
81
=== renamed file 'debian/libplatform-api1-dev.install' => 'debian/libubuntu-application-api-dev.install'
--- debian/libplatform-api1-dev.install 2013-08-23 13:53:42 +0000
+++ debian/libubuntu-application-api-dev.install 2014-08-26 16:06:15 +0000
@@ -1,4 +1,2 @@
1usr/lib/*/libubuntu_application_api.so1usr/lib/*/libubuntu_application_api.so
2usr/lib/*/libubuntu_application_api_mirclient.so
3usr/lib/*/libubuntu_application_api_mirserver.so
4usr/lib/*/pkgconfig/ubuntu-platform-api.pc2usr/lib/*/pkgconfig/ubuntu-platform-api.pc
53
=== renamed file 'debian/libplatform-api1-doc.doc-base' => 'debian/libubuntu-application-api-doc.doc-base'
=== renamed file 'debian/libplatform-api1-doc.install' => 'debian/libubuntu-application-api-doc.install'
--- debian/libplatform-api1-doc.install 2013-07-05 13:50:50 +0000
+++ debian/libubuntu-application-api-doc.install 2014-08-26 16:06:15 +0000
@@ -1,1 +1,1 @@
1usr/share/doc/ubuntu-platform-api
2\ No newline at end of file1\ No newline at end of file
2usr/share/doc/ubuntu-platform-api
33
=== renamed file 'debian/libplatform-api-headers.install' => 'debian/libubuntu-application-api-headers.install'
--- debian/libplatform-api-headers.install 2014-01-09 18:47:45 +0000
+++ debian/libubuntu-application-api-headers.install 2014-08-26 16:06:15 +0000
@@ -2,6 +2,7 @@
2usr/include/ubuntu/unit.h2usr/include/ubuntu/unit.h
3usr/include/ubuntu/visibility.h3usr/include/ubuntu/visibility.h
4usr/include/ubuntu/application4usr/include/ubuntu/application
5usr/include/ubuntu/application/init.h
5usr/include/ubuntu/ui6usr/include/ubuntu/ui
6usr/include/ubuntu/application/location7usr/include/ubuntu/application/location
7usr/include/ubuntu/application/url_dispatcher8usr/include/ubuntu/application/url_dispatcher
89
=== removed file 'debian/libubuntu-application-api-mirclient1.install'
--- debian/libubuntu-application-api-mirclient1.install 2013-08-08 17:41:19 +0000
+++ debian/libubuntu-application-api-mirclient1.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1usr/lib/*/libubuntu_application_api_mirclient.so.*
20
=== removed file 'debian/libubuntu-application-api-mirclient1.symbols'
--- debian/libubuntu-application-api-mirclient1.symbols 2013-09-23 05:39:42 +0000
+++ debian/libubuntu-application-api-mirclient1.symbols 1970-01-01 00:00:00 +0000
@@ -1,126 +0,0 @@
1libubuntu_application_api_mirclient.so.1 libubuntu-application-api-mirclient1 #MINVER#
2 u_application_description_destroy@Base 0.18.3+13.10.20130813
3 u_application_description_get_application_id@Base 0.18.3+13.10.20130813
4 u_application_description_get_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
5 u_application_description_new@Base 0.18.3+13.10.20130813
6 u_application_description_set_application_id@Base 0.18.3+13.10.20130813
7 u_application_description_set_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
8 u_application_id_compare@Base 0.18.3+13.10.20130813
9 u_application_id_destroy@Base 0.18.3+13.10.20130813
10 u_application_id_new_from_stringn@Base 0.18.3+13.10.20130813
11 u_application_instance_destroy@Base 0.18.3+13.10.20130813
12 u_application_instance_new_from_description_with_options@Base 0.18.3+13.10.20130813
13 u_application_instance_ref@Base 0.18.3+13.10.20130813
14 u_application_instance_run@Base 0.18.3+13.10.20130813
15 u_application_instance_unref@Base 0.18.3+13.10.20130813
16 u_application_lifecycle_delegate_destroy@Base 0.18.3+13.10.20130813
17 u_application_lifecycle_delegate_get_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
18 u_application_lifecycle_delegate_get_application_resumed_cb@Base 0.18.3+13.10.20130813
19 u_application_lifecycle_delegate_get_context@Base 0.18.3+13.10.20130813
20 u_application_lifecycle_delegate_new@Base 0.18.3+13.10.20130813
21 u_application_lifecycle_delegate_ref@Base 0.18.3+13.10.20130813
22 u_application_lifecycle_delegate_set_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
23 u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.3+13.10.20130813
24 u_application_lifecycle_delegate_set_context@Base 0.18.3+13.10.20130813
25 u_application_lifecycle_delegate_unref@Base 0.18.3+13.10.20130813
26 u_application_options_destroy@Base 0.18.3+13.10.20130813
27 u_application_options_get_form_factor@Base 0.18.3+13.10.20130813
28 u_application_options_get_operation_mode@Base 0.18.3+13.10.20130813
29 u_application_options_get_stage@Base 0.18.3+13.10.20130813
30 u_application_options_new_from_cmd_line@Base 0.18.3+13.10.20130813
31 ua_sensors_accelerometer_disable@Base 0.18.3+13.10.20130813
32 ua_sensors_accelerometer_enable@Base 0.18.3+13.10.20130813
33 ua_sensors_accelerometer_get_max_value@Base 0.18.3+13.10.20130813
34 ua_sensors_accelerometer_get_min_delay@Base 0.18.3+13.10.20130813
35 ua_sensors_accelerometer_get_min_value@Base 0.18.3+13.10.20130813
36 ua_sensors_accelerometer_get_resolution@Base 0.18.3+13.10.20130813
37 ua_sensors_accelerometer_new@Base 0.18.3+13.10.20130813
38 ua_sensors_accelerometer_set_reading_cb@Base 0.18.3+13.10.20130813
39 ua_sensors_light_disable@Base 0.18.3+13.10.20130813
40 ua_sensors_light_enable@Base 0.18.3+13.10.20130813
41 ua_sensors_light_get_max_value@Base 0.18.3+13.10.20130813
42 ua_sensors_light_get_min_delay@Base 0.18.3+13.10.20130813
43 ua_sensors_light_get_min_value@Base 0.18.3+13.10.20130813
44 ua_sensors_light_get_resolution@Base 0.18.3+13.10.20130813
45 ua_sensors_light_new@Base 0.18.3+13.10.20130813
46 ua_sensors_light_set_reading_cb@Base 0.18.3+13.10.20130813
47 ua_sensors_proximity_disable@Base 0.18.3+13.10.20130813
48 ua_sensors_proximity_enable@Base 0.18.3+13.10.20130813
49 ua_sensors_proximity_get_max_value@Base 0.18.3+13.10.20130813
50 ua_sensors_proximity_get_min_delay@Base 0.18.3+13.10.20130813
51 ua_sensors_proximity_get_min_value@Base 0.18.3+13.10.20130813
52 ua_sensors_proximity_get_resolution@Base 0.18.3+13.10.20130813
53 ua_sensors_proximity_new@Base 0.18.3+13.10.20130813
54 ua_sensors_proximity_set_reading_cb@Base 0.18.3+13.10.20130813
55 ua_ui_display_destroy@Base 0.18.3+13.10.20130813
56 ua_ui_display_get_native_type@Base 0.18.3+13.10.20130813
57 ua_ui_display_new_with_index@Base 0.18.3+13.10.20130813
58 ua_ui_display_query_horizontal_res@Base 0.18.3+13.10.20130813
59 ua_ui_display_query_vertical_res@Base 0.18.3+13.10.20130813
60 ua_ui_get_clipboard_content@Base 0.18.3+13.10.20130813
61 ua_ui_session_new_with_properties@Base 0.18.3+13.10.20130813
62 ua_ui_session_properties_new@Base 0.18.3+13.10.20130813
63 ua_ui_session_properties_set_remote_pid@Base 0.18.3+13.10.20130813
64 ua_ui_session_properties_set_type@Base 0.18.3+13.10.20130813
65 ua_ui_set_clipboard_content@Base 0.18.3+13.10.20130813
66 ua_ui_window_destroy@Base 0.18.3+13.10.20130813
67 ua_ui_window_get_native_type@Base 0.18.3+13.10.20130813
68 ua_ui_window_hide@Base 0.18.3+13.10.20130813
69 ua_ui_window_move@Base 0.18.3+13.10.20130813
70 ua_ui_window_new_for_application_with_properties@Base 0.18.3+13.10.20130813
71 ua_ui_window_properties_destroy@Base 0.18.3+13.10.20130813
72 ua_ui_window_properties_get_title@Base 0.18.3+13.10.20130813
73 ua_ui_window_properties_new_for_normal_window@Base 0.18.3+13.10.20130813
74 ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.3+13.10.20130813
75 ua_ui_window_properties_set_role@Base 0.18.3+13.10.20130813
76 ua_ui_window_properties_set_titlen@Base 0.18.3+13.10.20130813
77 ua_ui_window_request_fullscreen@Base 0.18.3+13.10.20130813
78 ua_ui_window_resize@Base 0.18.3+13.10.20130813
79 ua_ui_window_show@Base 0.18.3+13.10.20130813
80 uas_accelerometer_event_get_acceleration_x@Base 0.18.3+13.10.20130813
81 uas_accelerometer_event_get_acceleration_y@Base 0.18.3+13.10.20130813
82 uas_accelerometer_event_get_acceleration_z@Base 0.18.3+13.10.20130813
83 uas_accelerometer_event_get_timestamp@Base 0.18.3+13.10.20130813
84 uas_light_event_get_light@Base 0.18.3+13.10.20130813
85 uas_light_event_get_timestamp@Base 0.18.3+13.10.20130813
86 uas_proximity_event_get_distance@Base 0.18.3+13.10.20130813
87 uas_proximity_event_get_timestamp@Base 0.18.3+13.10.20130813
88 ua_location_heading_update_get_heading_in_degree@Base 0.19+13.10.20130919.3
89 ua_location_heading_update_get_timestamp@Base 0.19+13.10.20130919.3
90 ua_location_heading_update_ref@Base 0.19+13.10.20130919.3
91 ua_location_heading_update_unref@Base 0.19+13.10.20130919.3
92 ua_location_position_update_get_altitude_in_meter@Base 0.19+13.10.20130919.3
93 ua_location_position_update_get_latitude_in_degree@Base 0.19+13.10.20130919.3
94 ua_location_position_update_get_longitude_in_degree@Base 0.19+13.10.20130919.3
95 ua_location_position_update_get_timestamp@Base 0.19+13.10.20130919.3
96 ua_location_position_update_has_altitude@Base 0.19+13.10.20130919.3
97 ua_location_position_update_ref@Base 0.19+13.10.20130919.3
98 ua_location_position_update_unref@Base 0.19+13.10.20130919.3
99 ua_location_service_controller_disable_gps@Base 0.19+13.10.20130919.3
100 ua_location_service_controller_disable_service@Base 0.19+13.10.20130919.3
101 ua_location_service_controller_enable_gps@Base 0.19+13.10.20130919.3
102 ua_location_service_controller_enable_service@Base 0.19+13.10.20130919.3
103 ua_location_service_controller_query_status@Base 0.19+13.10.20130919.3
104 ua_location_service_controller_ref@Base 0.19+13.10.20130919.3
105 ua_location_service_controller_set_status_changed_handler@Base 0.19+13.10.20130919.3
106 ua_location_service_controller_unref@Base 0.19+13.10.20130919.3
107 ua_location_service_create_controller@Base 0.19+13.10.20130919.3
108 ua_location_service_create_session_for_high_accuracy@Base 0.19+13.10.20130919.3
109 ua_location_service_create_session_for_low_accuracy@Base 0.19+13.10.20130919.3
110 ua_location_service_session_ref@Base 0.19+13.10.20130919.3
111 ua_location_service_session_set_heading_updates_handler@Base 0.19+13.10.20130919.3
112 ua_location_service_session_set_position_updates_handler@Base 0.19+13.10.20130919.3
113 ua_location_service_session_set_velocity_updates_handler@Base 0.19+13.10.20130919.3
114 ua_location_service_session_start_heading_updates@Base 0.19+13.10.20130919.3
115 ua_location_service_session_start_position_updates@Base 0.19+13.10.20130919.3
116 ua_location_service_session_start_velocity_updates@Base 0.19+13.10.20130919.3
117 ua_location_service_session_stop_heading_updates@Base 0.19+13.10.20130919.3
118 ua_location_service_session_stop_position_updates@Base 0.19+13.10.20130919.3
119 ua_location_service_session_stop_velocity_updates@Base 0.19+13.10.20130919.3
120 ua_location_service_session_unref@Base 0.19+13.10.20130919.3
121 ua_location_velocity_update_get_timestamp@Base 0.19+13.10.20130919.3
122 ua_location_velocity_update_get_velocity_in_meters_per_second@Base 0.19+13.10.20130919.3
123 ua_location_velocity_update_ref@Base 0.19+13.10.20130919.3
124 ua_location_velocity_update_unref@Base 0.19+13.10.20130919.3
125 ua_url_dispatcher_session@Base 0.19+13.10.20130919.3
126 ua_url_dispatcher_session_open@Base 0.19+13.10.20130919.3
127\ No newline at end of file0\ No newline at end of file
1281
=== removed file 'debian/libubuntu-application-api-mirserver1.install'
--- debian/libubuntu-application-api-mirserver1.install 2013-08-08 17:41:19 +0000
+++ debian/libubuntu-application-api-mirserver1.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1usr/lib/*/libubuntu_application_api_mirserver.so.*
20
=== removed file 'debian/libubuntu-application-api-mirserver1.symbols'
--- debian/libubuntu-application-api-mirserver1.symbols 2013-09-23 05:39:42 +0000
+++ debian/libubuntu-application-api-mirserver1.symbols 1970-01-01 00:00:00 +0000
@@ -1,128 +0,0 @@
1libubuntu_application_api_mirserver.so.1 libubuntu-application-api-mirserver1 #MINVER#
2 u_application_description_destroy@Base 0.18.3+13.10.20130813
3 u_application_description_get_application_id@Base 0.18.3+13.10.20130813
4 u_application_description_get_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
5 u_application_description_new@Base 0.18.3+13.10.20130813
6 u_application_description_set_application_id@Base 0.18.3+13.10.20130813
7 u_application_description_set_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
8 u_application_id_compare@Base 0.18.3+13.10.20130813
9 u_application_id_destroy@Base 0.18.3+13.10.20130813
10 u_application_id_new_from_stringn@Base 0.18.3+13.10.20130813
11 u_application_instance_destroy@Base 0.18.3+13.10.20130813
12 u_application_instance_new_from_description_with_options@Base 0.18.3+13.10.20130813
13 u_application_instance_ref@Base 0.18.3+13.10.20130813
14 u_application_instance_run@Base 0.18.3+13.10.20130813
15 u_application_instance_unref@Base 0.18.3+13.10.20130813
16 u_application_lifecycle_delegate_destroy@Base 0.18.3+13.10.20130813
17 u_application_lifecycle_delegate_get_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
18 u_application_lifecycle_delegate_get_application_resumed_cb@Base 0.18.3+13.10.20130813
19 u_application_lifecycle_delegate_get_context@Base 0.18.3+13.10.20130813
20 u_application_lifecycle_delegate_new@Base 0.18.3+13.10.20130813
21 u_application_lifecycle_delegate_ref@Base 0.18.3+13.10.20130813
22 u_application_lifecycle_delegate_set_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
23 u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.3+13.10.20130813
24 u_application_lifecycle_delegate_set_context@Base 0.18.3+13.10.20130813
25 u_application_lifecycle_delegate_unref@Base 0.18.3+13.10.20130813
26 u_application_options_destroy@Base 0.18.3+13.10.20130813
27 u_application_options_get_form_factor@Base 0.18.3+13.10.20130813
28 u_application_options_get_operation_mode@Base 0.18.3+13.10.20130813
29 u_application_options_get_stage@Base 0.18.3+13.10.20130813
30 u_application_options_new_from_cmd_line@Base 0.18.3+13.10.20130813
31 ua_sensors_accelerometer_disable@Base 0.18.3+13.10.20130813
32 ua_sensors_accelerometer_enable@Base 0.18.3+13.10.20130813
33 ua_sensors_accelerometer_get_max_value@Base 0.18.3+13.10.20130813
34 ua_sensors_accelerometer_get_min_delay@Base 0.18.3+13.10.20130813
35 ua_sensors_accelerometer_get_min_value@Base 0.18.3+13.10.20130813
36 ua_sensors_accelerometer_get_resolution@Base 0.18.3+13.10.20130813
37 ua_sensors_accelerometer_new@Base 0.18.3+13.10.20130813
38 ua_sensors_accelerometer_set_reading_cb@Base 0.18.3+13.10.20130813
39 ua_sensors_light_disable@Base 0.18.3+13.10.20130813
40 ua_sensors_light_enable@Base 0.18.3+13.10.20130813
41 ua_sensors_light_get_max_value@Base 0.18.3+13.10.20130813
42 ua_sensors_light_get_min_delay@Base 0.18.3+13.10.20130813
43 ua_sensors_light_get_min_value@Base 0.18.3+13.10.20130813
44 ua_sensors_light_get_resolution@Base 0.18.3+13.10.20130813
45 ua_sensors_light_new@Base 0.18.3+13.10.20130813
46 ua_sensors_light_set_reading_cb@Base 0.18.3+13.10.20130813
47 ua_sensors_proximity_disable@Base 0.18.3+13.10.20130813
48 ua_sensors_proximity_enable@Base 0.18.3+13.10.20130813
49 ua_sensors_proximity_get_max_value@Base 0.18.3+13.10.20130813
50 ua_sensors_proximity_get_min_delay@Base 0.18.3+13.10.20130813
51 ua_sensors_proximity_get_min_value@Base 0.18.3+13.10.20130813
52 ua_sensors_proximity_get_resolution@Base 0.18.3+13.10.20130813
53 ua_sensors_proximity_new@Base 0.18.3+13.10.20130813
54 ua_sensors_proximity_set_reading_cb@Base 0.18.3+13.10.20130813
55 ua_ui_display_destroy@Base 0.18.3+13.10.20130813
56 ua_ui_display_get_native_type@Base 0.18.3+13.10.20130813
57 ua_ui_display_new_with_index@Base 0.18.3+13.10.20130813
58 ua_ui_display_query_horizontal_res@Base 0.18.3+13.10.20130813
59 ua_ui_display_query_vertical_res@Base 0.18.3+13.10.20130813
60 ua_ui_get_clipboard_content@Base 0.18.3+13.10.20130813
61 ua_ui_mirserver_finish@Base 0.18.3+13.10.20130823
62 ua_ui_mirserver_init@Base 0.18.3+13.10.20130823
63 ua_ui_session_new_with_properties@Base 0.18.3+13.10.20130813
64 ua_ui_session_properties_new@Base 0.18.3+13.10.20130813
65 ua_ui_session_properties_set_remote_pid@Base 0.18.3+13.10.20130813
66 ua_ui_session_properties_set_type@Base 0.18.3+13.10.20130813
67 ua_ui_set_clipboard_content@Base 0.18.3+13.10.20130813
68 ua_ui_window_destroy@Base 0.18.3+13.10.20130813
69 ua_ui_window_get_native_type@Base 0.18.3+13.10.20130813
70 ua_ui_window_hide@Base 0.18.3+13.10.20130813
71 ua_ui_window_move@Base 0.18.3+13.10.20130813
72 ua_ui_window_new_for_application_with_properties@Base 0.18.3+13.10.20130813
73 ua_ui_window_properties_destroy@Base 0.18.3+13.10.20130813
74 ua_ui_window_properties_get_title@Base 0.18.3+13.10.20130813
75 ua_ui_window_properties_new_for_normal_window@Base 0.18.3+13.10.20130813
76 ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.3+13.10.20130813
77 ua_ui_window_properties_set_role@Base 0.18.3+13.10.20130813
78 ua_ui_window_properties_set_titlen@Base 0.18.3+13.10.20130813
79 ua_ui_window_request_fullscreen@Base 0.18.3+13.10.20130813
80 ua_ui_window_resize@Base 0.18.3+13.10.20130813
81 ua_ui_window_show@Base 0.18.3+13.10.20130813
82 uas_accelerometer_event_get_acceleration_x@Base 0.18.3+13.10.20130813
83 uas_accelerometer_event_get_acceleration_y@Base 0.18.3+13.10.20130813
84 uas_accelerometer_event_get_acceleration_z@Base 0.18.3+13.10.20130813
85 uas_accelerometer_event_get_timestamp@Base 0.18.3+13.10.20130813
86 uas_light_event_get_light@Base 0.18.3+13.10.20130813
87 uas_light_event_get_timestamp@Base 0.18.3+13.10.20130813
88 uas_proximity_event_get_distance@Base 0.18.3+13.10.20130813
89 uas_proximity_event_get_timestamp@Base 0.18.3+13.10.20130813
90 ua_location_heading_update_get_heading_in_degree@Base 0.19+13.10.20130919.3
91 ua_location_heading_update_get_timestamp@Base 0.19+13.10.20130919.3
92 ua_location_heading_update_ref@Base 0.19+13.10.20130919.3
93 ua_location_heading_update_unref@Base 0.19+13.10.20130919.3
94 ua_location_position_update_get_altitude_in_meter@Base 0.19+13.10.20130919.3
95 ua_location_position_update_get_latitude_in_degree@Base 0.19+13.10.20130919.3
96 ua_location_position_update_get_longitude_in_degree@Base 0.19+13.10.20130919.3
97 ua_location_position_update_get_timestamp@Base 0.19+13.10.20130919.3
98 ua_location_position_update_has_altitude@Base 0.19+13.10.20130919.3
99 ua_location_position_update_ref@Base 0.19+13.10.20130919.3
100 ua_location_position_update_unref@Base 0.19+13.10.20130919.3
101 ua_location_service_controller_disable_gps@Base 0.19+13.10.20130919.3
102 ua_location_service_controller_disable_service@Base 0.19+13.10.20130919.3
103 ua_location_service_controller_enable_gps@Base 0.19+13.10.20130919.3
104 ua_location_service_controller_enable_service@Base 0.19+13.10.20130919.3
105 ua_location_service_controller_query_status@Base 0.19+13.10.20130919.3
106 ua_location_service_controller_ref@Base 0.19+13.10.20130919.3
107 ua_location_service_controller_set_status_changed_handler@Base 0.19+13.10.20130919.3
108 ua_location_service_controller_unref@Base 0.19+13.10.20130919.3
109 ua_location_service_create_controller@Base 0.19+13.10.20130919.3
110 ua_location_service_create_session_for_high_accuracy@Base 0.19+13.10.20130919.3
111 ua_location_service_create_session_for_low_accuracy@Base 0.19+13.10.20130919.3
112 ua_location_service_session_ref@Base 0.19+13.10.20130919.3
113 ua_location_service_session_set_heading_updates_handler@Base 0.19+13.10.20130919.3
114 ua_location_service_session_set_position_updates_handler@Base 0.19+13.10.20130919.3
115 ua_location_service_session_set_velocity_updates_handler@Base 0.19+13.10.20130919.3
116 ua_location_service_session_start_heading_updates@Base 0.19+13.10.20130919.3
117 ua_location_service_session_start_position_updates@Base 0.19+13.10.20130919.3
118 ua_location_service_session_start_velocity_updates@Base 0.19+13.10.20130919.3
119 ua_location_service_session_stop_heading_updates@Base 0.19+13.10.20130919.3
120 ua_location_service_session_stop_position_updates@Base 0.19+13.10.20130919.3
121 ua_location_service_session_stop_velocity_updates@Base 0.19+13.10.20130919.3
122 ua_location_service_session_unref@Base 0.19+13.10.20130919.3
123 ua_location_velocity_update_get_timestamp@Base 0.19+13.10.20130919.3
124 ua_location_velocity_update_get_velocity_in_meters_per_second@Base 0.19+13.10.20130919.3
125 ua_location_velocity_update_ref@Base 0.19+13.10.20130919.3
126 ua_location_velocity_update_unref@Base 0.19+13.10.20130919.3
127 ua_url_dispatcher_session@Base 0.19+13.10.20130919.3
128 ua_url_dispatcher_session_open@Base 0.19+13.10.20130919.3
129\ No newline at end of file0\ No newline at end of file
1301
=== renamed file 'debian/libubuntu-application-api1.install' => 'debian/libubuntu-application-api2.install'
=== renamed file 'debian/libubuntu-application-api1.symbols' => 'debian/libubuntu-application-api2.symbols'
--- debian/libubuntu-application-api1.symbols 2013-08-26 18:07:34 +0000
+++ debian/libubuntu-application-api2.symbols 2014-08-26 16:06:15 +0000
@@ -1,11 +1,13 @@
1libubuntu_application_api.so.1 libubuntu-application-api1 #MINVER#1libubuntu_application_api.so.2 libubuntu-application-api2 #MINVER#
2 u_application_description_destroy@Base 0.18.1daily13.06.212 u_application_description_destroy@Base 0.18.1daily13.06.21
3 u_application_description_new@Base 0.18.1daily13.06.213 u_application_description_new@Base 0.18.1daily13.06.21
4 u_application_description_set_application_id@Base 0.18.1daily13.06.214 u_application_description_set_application_id@Base 0.18.1daily13.06.21
5 u_application_description_set_application_lifecycle_delegate@Base 0.18.1daily13.06.215 u_application_description_set_application_lifecycle_delegate@Base 0.18.1daily13.06.21
6 u_application_finish@Base 2.0.0+14.10.20140612
6 u_application_id_compare@Base 0.18.1daily13.06.217 u_application_id_compare@Base 0.18.1daily13.06.21
7 u_application_id_destroy@Base 0.18.1daily13.06.218 u_application_id_destroy@Base 0.18.1daily13.06.21
8 u_application_id_new_from_stringn@Base 0.18.1daily13.06.219 u_application_id_new_from_stringn@Base 0.18.1daily13.06.21
10 u_application_init@Base 2.0.0+14.10.20140612
9 u_application_instance_new_from_description_with_options@Base 0.18.1daily13.06.2111 u_application_instance_new_from_description_with_options@Base 0.18.1daily13.06.21
10 u_application_lifecycle_delegate_new@Base 0.18.1daily13.06.2112 u_application_lifecycle_delegate_new@Base 0.18.1daily13.06.21
11 u_application_lifecycle_delegate_ref@Base 0.18.1daily13.06.2113 u_application_lifecycle_delegate_ref@Base 0.18.1daily13.06.21
@@ -13,24 +15,37 @@
13 u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.1daily13.06.2115 u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.1daily13.06.21
14 u_application_lifecycle_delegate_set_context@Base 0.18.1daily13.06.2116 u_application_lifecycle_delegate_set_context@Base 0.18.1daily13.06.21
15 u_application_lifecycle_delegate_unref@Base 0.18.1daily13.06.2117 u_application_lifecycle_delegate_unref@Base 0.18.1daily13.06.21
18 u_application_module_version@Base 2.0.0+14.10.20140612
16 u_application_options_destroy@Base 0.18.1daily13.06.2119 u_application_options_destroy@Base 0.18.1daily13.06.21
17 u_application_options_get_form_factor@Base 0.18.1daily13.06.2120 u_application_options_get_form_factor@Base 0.18.1daily13.06.21
18 u_application_options_get_stage@Base 0.18.1daily13.06.2121 u_application_options_get_stage@Base 0.18.1daily13.06.21
19 u_application_options_new_from_cmd_line@Base 0.18.1daily13.06.2122 u_application_options_new_from_cmd_line@Base 0.18.1daily13.06.21
23 ua_location_heading_update_get_heading_in_degree@Base 0.18.3+13.10.20130815.1
20 ua_location_heading_update_get_timestamp@Base 0.18.3+13.10.2013080724 ua_location_heading_update_get_timestamp@Base 0.18.3+13.10.20130807
21 ua_location_heading_update_ref@Base 0.18.3+13.10.2013080725 ua_location_heading_update_ref@Base 0.18.3+13.10.20130807
22 ua_location_heading_update_unref@Base 0.18.3+13.10.2013080726 ua_location_heading_update_unref@Base 0.18.3+13.10.20130807
23 ua_location_heading_update_get_heading_in_degree@Base 0.18.3+13.10.20130815.1
24 ua_location_position_update_get_altitude_in_meter@Base 0.18.3+13.10.2013080727 ua_location_position_update_get_altitude_in_meter@Base 0.18.3+13.10.20130807
28 ua_location_position_update_get_horizontal_accuracy_in_meter@Base 2.1.0+14.10.20140630
25 ua_location_position_update_get_latitude_in_degree@Base 0.18.3+13.10.2013080729 ua_location_position_update_get_latitude_in_degree@Base 0.18.3+13.10.20130807
26 ua_location_position_update_get_longitude_in_degree@Base 0.18.3+13.10.2013080730 ua_location_position_update_get_longitude_in_degree@Base 0.18.3+13.10.20130807
27 ua_location_position_update_get_timestamp@Base 0.18.3+13.10.2013080731 ua_location_position_update_get_timestamp@Base 0.18.3+13.10.20130807
32 ua_location_position_update_get_vertical_accuracy_in_meter@Base 2.1.0+14.10.20140630
28 ua_location_position_update_has_altitude@Base 0.18.3+13.10.2013080733 ua_location_position_update_has_altitude@Base 0.18.3+13.10.20130807
34 ua_location_position_update_has_horizontal_accuracy@Base 2.1.0+14.10.20140630
35 ua_location_position_update_has_vertical_accuracy@Base 2.1.0+14.10.20140630
29 ua_location_position_update_ref@Base 0.18.3+13.10.2013080736 ua_location_position_update_ref@Base 0.18.3+13.10.20130807
30 ua_location_position_update_unref@Base 0.18.3+13.10.2013080737 ua_location_position_update_unref@Base 0.18.3+13.10.20130807
38 ua_location_service_controller_disable_gps@Base 0.18.3+13.10.20130826
39 ua_location_service_controller_disable_service@Base 0.18.3+13.10.20130826
40 ua_location_service_controller_enable_gps@Base 0.18.3+13.10.20130826
41 ua_location_service_controller_enable_service@Base 0.18.3+13.10.20130826
42 ua_location_service_controller_query_status@Base 0.18.3+13.10.20130826
43 ua_location_service_controller_ref@Base 0.18.3+13.10.20130826
44 ua_location_service_controller_set_status_changed_handler@Base 0.18.3+13.10.20130826
45 ua_location_service_controller_unref@Base 0.18.3+13.10.20130826
46 ua_location_service_create_controller@Base 0.18.3+13.10.20130826.3
31 ua_location_service_create_session_for_high_accuracy@Base 0.18.3+13.10.2013080747 ua_location_service_create_session_for_high_accuracy@Base 0.18.3+13.10.20130807
32 ua_location_service_create_session_for_low_accuracy@Base 0.18.3+13.10.2013080748 ua_location_service_create_session_for_low_accuracy@Base 0.18.3+13.10.20130807
33 ua_location_service_create_controller@Base 0.18.3+13.10.20130826.3
34 ua_location_service_session_ref@Base 0.18.3+13.10.2013080749 ua_location_service_session_ref@Base 0.18.3+13.10.20130807
35 ua_location_service_session_set_heading_updates_handler@Base 0.18.3+13.10.2013080750 ua_location_service_session_set_heading_updates_handler@Base 0.18.3+13.10.20130807
36 ua_location_service_session_set_position_updates_handler@Base 0.18.3+13.10.2013080751 ua_location_service_session_set_position_updates_handler@Base 0.18.3+13.10.20130807
@@ -53,15 +68,31 @@
53 ua_sensors_accelerometer_get_min_value@Base 0.18.1daily13.06.2168 ua_sensors_accelerometer_get_min_value@Base 0.18.1daily13.06.21
54 ua_sensors_accelerometer_get_resolution@Base 0.18.1daily13.06.2169 ua_sensors_accelerometer_get_resolution@Base 0.18.1daily13.06.21
55 ua_sensors_accelerometer_new@Base 0.18.1daily13.06.2170 ua_sensors_accelerometer_new@Base 0.18.1daily13.06.21
71 ua_sensors_accelerometer_set_event_rate@Base 2.1.0+14.10.20140623.1
56 ua_sensors_accelerometer_set_reading_cb@Base 0.18.1daily13.06.2172 ua_sensors_accelerometer_set_reading_cb@Base 0.18.1daily13.06.21
73 ua_sensors_haptic_disable@Base 2.0.0+14.10.20140612
74 ua_sensors_haptic_enable@Base 2.0.0+14.10.20140612
75 ua_sensors_haptic_new@Base 2.0.0+14.10.20140612
76 ua_sensors_haptic_vibrate_once@Base 2.0.0+14.10.20140612
77 ua_sensors_haptic_vibrate_with_pattern@Base 2.0.0+14.10.20140612
78 ua_sensors_light_disable@Base 0.18.2+13.10.20130708
57 ua_sensors_light_enable@Base 0.18.1daily13.06.2179 ua_sensors_light_enable@Base 0.18.1daily13.06.21
58 ua_sensors_light_disable@Base 0.18.2+13.10.20130708
59 ua_sensors_light_get_max_value@Base 0.18.1daily13.06.2180 ua_sensors_light_get_max_value@Base 0.18.1daily13.06.21
60 ua_sensors_light_get_min_delay@Base 0.18.1daily13.06.2181 ua_sensors_light_get_min_delay@Base 0.18.1daily13.06.21
61 ua_sensors_light_get_min_value@Base 0.18.1daily13.06.2182 ua_sensors_light_get_min_value@Base 0.18.1daily13.06.21
62 ua_sensors_light_get_resolution@Base 0.18.1daily13.06.2183 ua_sensors_light_get_resolution@Base 0.18.1daily13.06.21
63 ua_sensors_light_new@Base 0.18.1daily13.06.2184 ua_sensors_light_new@Base 0.18.1daily13.06.21
85 ua_sensors_light_set_event_rate@Base 2.1.0+14.10.20140623.1
64 ua_sensors_light_set_reading_cb@Base 0.18.1daily13.06.2186 ua_sensors_light_set_reading_cb@Base 0.18.1daily13.06.21
87 ua_sensors_orientation_disable@Base 2.1.0+14.10.20140623.1
88 ua_sensors_orientation_enable@Base 2.1.0+14.10.20140623.1
89 ua_sensors_orientation_get_max_value@Base 2.1.0+14.10.20140623.1
90 ua_sensors_orientation_get_min_delay@Base 2.1.0+14.10.20140623.1
91 ua_sensors_orientation_get_min_value@Base 2.1.0+14.10.20140623.1
92 ua_sensors_orientation_get_resolution@Base 2.1.0+14.10.20140623.1
93 ua_sensors_orientation_new@Base 2.1.0+14.10.20140623.1
94 ua_sensors_orientation_set_event_rate@Base 2.1.0+14.10.20140623.1
95 ua_sensors_orientation_set_reading_cb@Base 2.1.0+14.10.20140623.1
65 ua_sensors_proximity_disable@Base 0.18.1daily13.06.2196 ua_sensors_proximity_disable@Base 0.18.1daily13.06.21
66 ua_sensors_proximity_enable@Base 0.18.1daily13.06.2197 ua_sensors_proximity_enable@Base 0.18.1daily13.06.21
67 ua_sensors_proximity_get_max_value@Base 0.18.1daily13.06.2198 ua_sensors_proximity_get_max_value@Base 0.18.1daily13.06.21
@@ -69,6 +100,7 @@
69 ua_sensors_proximity_get_min_value@Base 0.18.1daily13.06.21100 ua_sensors_proximity_get_min_value@Base 0.18.1daily13.06.21
70 ua_sensors_proximity_get_resolution@Base 0.18.1daily13.06.21101 ua_sensors_proximity_get_resolution@Base 0.18.1daily13.06.21
71 ua_sensors_proximity_new@Base 0.18.1daily13.06.21102 ua_sensors_proximity_new@Base 0.18.1daily13.06.21
103 ua_sensors_proximity_set_event_rate@Base 2.1.0+14.10.20140623.1
72 ua_sensors_proximity_set_reading_cb@Base 0.18.1daily13.06.21104 ua_sensors_proximity_set_reading_cb@Base 0.18.1daily13.06.21
73 ua_ui_display_destroy@Base 0.18.1daily13.06.21105 ua_ui_display_destroy@Base 0.18.1daily13.06.21
74 ua_ui_display_get_native_type@Base 0.18.1daily13.06.21106 ua_ui_display_get_native_type@Base 0.18.1daily13.06.21
@@ -83,13 +115,18 @@
83 ua_ui_set_clipboard_content@Base 0.18.1daily13.06.21115 ua_ui_set_clipboard_content@Base 0.18.1daily13.06.21
84 ua_ui_window_destroy@Base 0.18.1daily13.06.21116 ua_ui_window_destroy@Base 0.18.1daily13.06.21
85 ua_ui_window_get_native_type@Base 0.18.1daily13.06.21117 ua_ui_window_get_native_type@Base 0.18.1daily13.06.21
118 ua_ui_window_get_orientation@Base 2.2.1+14.10.20140812
119 ua_ui_window_get_size@Base 2.0.0+14.10.20140612
86 ua_ui_window_hide@Base 0.18.1daily13.06.21120 ua_ui_window_hide@Base 0.18.1daily13.06.21
121 ua_ui_window_is_focused@Base 2.2.0+14.10.20140728
87 ua_ui_window_move@Base 0.18.1daily13.06.21122 ua_ui_window_move@Base 0.18.1daily13.06.21
88 ua_ui_window_new_for_application_with_properties@Base 0.18.1daily13.06.21123 ua_ui_window_new_for_application_with_properties@Base 0.18.1daily13.06.21
89 ua_ui_window_properties_destroy@Base 0.18.1daily13.06.21124 ua_ui_window_properties_destroy@Base 0.18.1daily13.06.21
90 ua_ui_window_properties_get_title@Base 0.18.1daily13.06.21125 ua_ui_window_properties_get_title@Base 0.18.1daily13.06.21
91 ua_ui_window_properties_new_for_normal_window@Base 0.18.1daily13.06.21126 ua_ui_window_properties_new_for_normal_window@Base 0.18.1daily13.06.21
127 ua_ui_window_properties_set_dimensions@Base 2.0.0+14.10.20140612
92 ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.1daily13.06.21128 ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.1daily13.06.21
129 ua_ui_window_properties_set_event_cb_and_ctx@Base 2.2.0+14.10.20140728
93 ua_ui_window_properties_set_role@Base 0.18.1daily13.06.21130 ua_ui_window_properties_set_role@Base 0.18.1daily13.06.21
94 ua_ui_window_properties_set_titlen@Base 0.18.1daily13.06.21131 ua_ui_window_properties_set_titlen@Base 0.18.1daily13.06.21
95 ua_ui_window_request_fullscreen@Base 0.18.1daily13.06.21132 ua_ui_window_request_fullscreen@Base 0.18.1daily13.06.21
@@ -103,28 +140,9 @@
103 uas_accelerometer_event_get_timestamp@Base 0.18.1daily13.06.21140 uas_accelerometer_event_get_timestamp@Base 0.18.1daily13.06.21
104 uas_light_event_get_light@Base 0.18.1daily13.06.21141 uas_light_event_get_light@Base 0.18.1daily13.06.21
105 uas_light_event_get_timestamp@Base 0.18.1daily13.06.21142 uas_light_event_get_timestamp@Base 0.18.1daily13.06.21
143 uas_orientation_event_get_azimuth@Base 2.1.0+14.10.20140623.1
144 uas_orientation_event_get_pitch@Base 2.1.0+14.10.20140623.1
145 uas_orientation_event_get_roll@Base 2.1.0+14.10.20140623.1
146 uas_orientation_event_get_timestamp@Base 2.1.0+14.10.20140623.1
106 uas_proximity_event_get_distance@Base 0.18.1daily13.06.21147 uas_proximity_event_get_distance@Base 0.18.1daily13.06.21
107 uas_proximity_event_get_timestamp@Base 0.18.1daily13.06.21148 uas_proximity_event_get_timestamp@Base 0.18.1daily13.06.21
108 ubuntu_ui_install_task_controller@Base 0.18.1daily13.06.21
109 ubuntu_ui_report_notification_invisible@Base 0.18.1daily13.06.21
110 ubuntu_ui_report_notification_visible@Base 0.18.1daily13.06.21
111 ubuntu_ui_report_osk_invisible@Base 0.18.1daily13.06.21
112 ubuntu_ui_report_osk_visible@Base 0.18.1daily13.06.21
113 ubuntu_ui_session_focus_running_session_with_id@Base 0.18.1daily13.06.21
114 ubuntu_ui_session_install_session_lifecycle_observer@Base 0.18.1daily13.06.21
115 ubuntu_ui_session_properties_get_application_instance_id@Base 0.18.1daily13.06.21
116 ubuntu_ui_session_properties_get_application_stage_hint@Base 0.18.1daily13.06.21
117 ubuntu_ui_session_properties_get_desktop_file_hint@Base 0.18.1daily13.06.21
118 ubuntu_ui_session_snapshot_running_session_with_id@Base 0.18.1daily13.06.21
119 ubuntu_ui_session_trigger_switch_to_well_known_application@Base 0.18.1daily13.06.21
120 ubuntu_ui_session_unfocus_running_sessions@Base 0.18.1daily13.06.21
121 ubuntu_ui_set_surface_trap@Base 0.18.1daily13.06.21
122 ubuntu_ui_unset_surface_trap@Base 0.18.1daily13.06.21
123 ua_location_service_controller_disable_gps@Base 0.18.3+13.10.20130826
124 ua_location_service_controller_disable_service@Base 0.18.3+13.10.20130826
125 ua_location_service_controller_enable_gps@Base 0.18.3+13.10.20130826
126 ua_location_service_controller_enable_service@Base 0.18.3+13.10.20130826
127 ua_location_service_controller_query_status@Base 0.18.3+13.10.20130826
128 ua_location_service_controller_ref@Base 0.18.3+13.10.20130826
129 ua_location_service_controller_set_status_changed_handler@Base 0.18.3+13.10.20130826
130 ua_location_service_controller_unref@Base 0.18.3+13.10.20130826
131149
=== renamed file 'debian/libplatform-hardware-api1-dev.install' => 'debian/libubuntu-platform-hardware-api-dev.install'
--- debian/libplatform-hardware-api1-dev.install 2013-07-08 10:39:36 +0000
+++ debian/libubuntu-platform-hardware-api-dev.install 2014-08-26 16:06:15 +0000
@@ -1,2 +1,2 @@
1usr/lib/*/libubuntu_platform_hardware_api.so1usr/lib/*/libubuntu_platform_hardware_api.so
22usr/lib/*/pkgconfig/ubuntu-platform-hardware-api.pc
33
=== renamed file 'debian/libplatform-hardware-api-headers.install' => 'debian/libubuntu-platform-hardware-api-headers.install'
=== renamed file 'debian/libubuntu-platform-hardware-api1.install' => 'debian/libubuntu-platform-hardware-api2.install'
=== renamed file 'debian/libubuntu-platform-hardware-api1.symbols' => 'debian/libubuntu-platform-hardware-api2.symbols'
--- debian/libubuntu-platform-hardware-api1.symbols 2013-07-17 14:29:04 +0000
+++ debian/libubuntu-platform-hardware-api2.symbols 2014-08-26 16:06:15 +0000
@@ -1,4 +1,11 @@
1libubuntu_platform_hardware_api.so.1 libubuntu-platform-hardware-api1 #MINVER#1libubuntu_platform_hardware_api.so.2 libubuntu-platform-hardware-api2 #MINVER#
2 u_hardware_alarm_create@Base 1.2.0+14.10.20140522.1
3 u_hardware_alarm_get_elapsed_real_time@Base 1.2.0+14.10.20140522.1
4 u_hardware_alarm_ref@Base 1.2.0+14.10.20140522.1
5 u_hardware_alarm_set_relative_to_with_behavior@Base 1.2.0+14.10.20140522.1
6 u_hardware_alarm_set_timezone@Base 1.2.0+14.10.20140522.1
7 u_hardware_alarm_unref@Base 1.2.0+14.10.20140522.1
8 u_hardware_alarm_wait_for_next_alarm@Base 1.2.0+14.10.20140522.1
2 u_hardware_gps_delete@Base 0.18.2+13.10.201307099 u_hardware_gps_delete@Base 0.18.2+13.10.20130709
3 u_hardware_gps_delete_aiding_data@Base 0.18.2+13.10.2013070910 u_hardware_gps_delete_aiding_data@Base 0.18.2+13.10.20130709
4 u_hardware_gps_inject_location@Base 0.18.2+13.10.2013070911 u_hardware_gps_inject_location@Base 0.18.2+13.10.20130709
@@ -8,3 +15,8 @@
8 u_hardware_gps_set_position_mode@Base 0.18.2+13.10.2013070915 u_hardware_gps_set_position_mode@Base 0.18.2+13.10.20130709
9 u_hardware_gps_start@Base 0.18.2+13.10.2013070916 u_hardware_gps_start@Base 0.18.2+13.10.20130709
10 u_hardware_gps_stop@Base 0.18.2+13.10.2013070917 u_hardware_gps_stop@Base 0.18.2+13.10.20130709
18 u_hardware_gps_agps_notify_connection_is_closed@Base 0.21+14.10.20140507
19 u_hardware_gps_agps_notify_connection_is_open@Base 0.21+14.10.20140507
20 u_hardware_gps_agps_notify_connection_not_available@Base 0.21+14.10.20140507
21 u_hardware_gps_agps_set_reference_location@Base 0.21+14.10.20140507
22 u_hardware_gps_agps_set_server_for_type@Base 0.21+14.10.20140507
1123
=== modified file 'debian/rules'
--- debian/rules 2014-02-13 14:12:28 +0000
+++ debian/rules 2014-08-26 16:06:15 +0000
@@ -2,11 +2,18 @@
22
3DPKG_GENSYMBOLS_CHECK_LEVEL = 43DPKG_GENSYMBOLS_CHECK_LEVEL = 4
44
5include /usr/share/dpkg/default.mk
6
7# Explicitly selecting a G{CC,++}-version here to avoid accidental
8# ABI breaks introduced by toolchain updates.
9export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9
10export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9
11
5%:12%:
6 dh $@13 dh $@
714
8override_dh_auto_configure:15override_dh_auto_configure:
9 dh_auto_configure -- -DENABLE_MIRCLIENT_IMPLEMENTATION=true -DENABLE_MIRSERVER_IMPLEMENTATION=true16 dh_auto_configure -- -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX)
1017
11override_dh_install:18override_dh_install:
12 dh_install --fail-missing19 dh_install --fail-missing
1320
=== added file 'debian/ubuntu-application-api2-desktop.install'
--- debian/ubuntu-application-api2-desktop.install 1970-01-01 00:00:00 +0000
+++ debian/ubuntu-application-api2-desktop.install 2014-08-26 16:06:15 +0000
@@ -0,0 +1,2 @@
1usr/lib/*/libubuntu_application_api_desktop_mirclient.so.*
2usr/lib/*/libubuntu_application_api_desktop_mirserver.so.*
03
=== added file 'debian/ubuntu-application-api2-examples.install'
--- debian/ubuntu-application-api2-examples.install 1970-01-01 00:00:00 +0000
+++ debian/ubuntu-application-api2-examples.install 2014-08-26 16:06:15 +0000
@@ -0,0 +1,7 @@
1usr/bin/test_android_gps_api
2usr/bin/test_android_sensors_api
3usr/bin/test_android_ubuntu_app_api
4usr/bin/test_android_ubuntu_app_api_multiple_surfaces
5usr/bin/test_ubuntu_app_api_location_service
6usr/bin/test_hardware_alarms_api
7usr/bin/test_ubuntu_haptic_device
08
=== renamed file 'debian/libubuntu-application-api-test1.docs' => 'debian/ubuntu-application-api2-test.docs'
--- debian/libubuntu-application-api-test1.docs 2014-01-08 15:17:41 +0000
+++ debian/ubuntu-application-api2-test.docs 2014-08-26 16:06:15 +0000
@@ -1,1 +1,1 @@
1src/ubuntu/testbackend/README.md1src/ubuntu/application/testbackend/README.md
22
=== renamed file 'debian/libubuntu-application-api-test1.install' => 'debian/ubuntu-application-api2-test.install'
=== added file 'debian/ubuntu-application-api2-touch.install'
--- debian/ubuntu-application-api2-touch.install 1970-01-01 00:00:00 +0000
+++ debian/ubuntu-application-api2-touch.install 2014-08-26 16:06:15 +0000
@@ -0,0 +1,2 @@
1usr/lib/*/libubuntu_application_api_touch_mirserver.so.*
2usr/lib/*/libubuntu_application_api_touch_mirclient.so.*
03
=== added directory 'examples'
=== added file 'examples/CMakeLists.txt'
--- examples/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ examples/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -0,0 +1,29 @@
1include_directories(
2 ${CMAKE_BINARY_DIR}/include
3)
4
5set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC -Wl,--no-as-needed -pthread")
6
7add_executable(test_android_ubuntu_app_api test_c_api.cpp)
8target_link_libraries(test_android_ubuntu_app_api ubuntu_application_api EGL GLESv2)
9
10add_executable(test_android_ubuntu_app_api_multiple_surfaces test_multiple_surfaces_event_delivery.cpp)
11target_link_libraries(test_android_ubuntu_app_api_multiple_surfaces ubuntu_application_api EGL GLESv2)
12
13add_executable(test_android_sensors_api test_sensors_api.cpp)
14target_link_libraries(test_android_sensors_api ubuntu_application_api)
15
16add_executable(test_ubuntu_app_api_location_service test_location_api.cpp)
17target_link_libraries(test_ubuntu_app_api_location_service ubuntu_application_api)
18
19add_executable(test_ubuntu_haptic_device test_haptic_device.cpp)
20target_link_libraries(test_ubuntu_haptic_device ubuntu_application_api)
21
22install(TARGETS
23 test_android_ubuntu_app_api
24 test_android_ubuntu_app_api_multiple_surfaces
25 test_android_sensors_api
26 test_ubuntu_app_api_location_service
27 test_ubuntu_haptic_device
28 DESTINATION bin
29)
030
=== renamed file 'src/ubuntu/hybris/tests/test_c_api.cpp' => 'examples/test_c_api.cpp'
--- src/ubuntu/hybris/tests/test_c_api.cpp 2013-05-21 22:14:40 +0000
+++ examples/test_c_api.cpp 2014-08-26 16:06:15 +0000
@@ -1,16 +1,16 @@
1/*1/*
2 * Copyright © 2012 Canonical Ltd.2 * Copyright © 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.6 * published by the Free Software Foundation.
7 *7 *
8 * This program is distributed in the hope that it will be useful,8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * 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/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
@@ -83,7 +83,7 @@
83 const GLfloat * color_data;83 const GLfloat * color_data;
84};84};
8585
86void on_new_event(void* ctx, const Event* ev)86void on_new_event(void* ctx, const WindowEvent* ev)
87{87{
88}88}
8989
@@ -110,7 +110,7 @@
110 UAUiWindowProperties* wprops = ua_ui_window_properties_new_for_normal_window();110 UAUiWindowProperties* wprops = ua_ui_window_properties_new_for_normal_window();
111 ua_ui_window_properties_set_titlen(wprops, "Window 1", 8);111 ua_ui_window_properties_set_titlen(wprops, "Window 1", 8);
112 ua_ui_window_properties_set_role(wprops, U_MAIN_ROLE);112 ua_ui_window_properties_set_role(wprops, U_MAIN_ROLE);
113 ua_ui_window_properties_set_input_cb_and_ctx(wprops, on_new_event, NULL);113 ua_ui_window_properties_set_event_cb_and_ctx(wprops, on_new_event, NULL);
114 114
115 UAUiWindow* surface = ua_ui_window_new_for_application_with_properties(instance, wprops);115 UAUiWindow* surface = ua_ui_window_new_for_application_with_properties(instance, wprops);
116 116
117117
=== added file 'examples/test_haptic_device.cpp'
--- examples/test_haptic_device.cpp 1970-01-01 00:00:00 +0000
+++ examples/test_haptic_device.cpp 2014-08-26 16:06:15 +0000
@@ -0,0 +1,44 @@
1/*
2 * Copyright © 2014 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: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17 */
18
19#include <stdio.h>
20#include <stdlib.h>
21#include <unistd.h>
22
23#include <ubuntu/application/sensors/haptic.h>
24
25int main(int argc, char *argv[])
26{
27 UASensorsHaptic *sensor = ua_sensors_haptic_new();
28
29 if (!sensor) {
30 printf("Haptic device unavailable\n");
31 return 1;
32 }
33
34 printf("Vibrating once for 1500ms\n");
35 ua_sensors_haptic_vibrate_once(sensor, 1500);
36
37 sleep(3);
38
39 printf("Vibrating with pattern 6*1500, repeat twice.\n");
40 uint32_t pattern[MAX_PATTERN_SIZE] = {1500, 1500, 1500, 1500, 1500, 1500};
41 ua_sensors_haptic_vibrate_with_pattern(sensor, pattern, 2);
42
43 return 0;
44}
045
=== renamed file 'src/ubuntu/hybris/tests/test_location_api.cpp' => 'examples/test_location_api.cpp'
--- src/ubuntu/hybris/tests/test_location_api.cpp 2013-12-03 07:10:43 +0000
+++ examples/test_location_api.cpp 2014-08-26 16:06:15 +0000
@@ -1,19 +1,19 @@
1/*1/*
2 * Copyright © 2012 Canonical Ltd.2 * Copyright © 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.6 * published by the Free Software Foundation.
7 *7 *
8 * This program is distributed in the hope that it will be useful,8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * 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/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>16 * Authored by: Thomas Voss <thomas.voss@canonical.com>
17 */17 */
1818
19#include <ubuntu/application/location/service.h>19#include <ubuntu/application/location/service.h>
2020
=== renamed file 'src/ubuntu/hybris/tests/test_multiple_surfaces_event_delivery.cpp' => 'examples/test_multiple_surfaces_event_delivery.cpp'
--- src/ubuntu/hybris/tests/test_multiple_surfaces_event_delivery.cpp 2013-05-21 22:14:40 +0000
+++ examples/test_multiple_surfaces_event_delivery.cpp 2014-08-26 16:06:15 +0000
@@ -1,19 +1,19 @@
1/*1/*
2 * Copyright © 2012 Canonical Ltd.2 * Copyright © 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.6 * published by the Free Software Foundation.
7 *7 *
8 * This program is distributed in the hope that it will be useful,8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * 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/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>16 * Authored by: Thomas Voss <thomas.voss@canonical.com>
17 */17 */
1818
19#include <ubuntu/application/ui/window.h>19#include <ubuntu/application/ui/window.h>
@@ -83,7 +83,7 @@
83 const GLfloat * color_data;83 const GLfloat * color_data;
84};84};
8585
86void on_new_event(void* ctx, const Event* ev)86void on_new_event(void* ctx, const WindowEvent* ev)
87{87{
88 int* surface = (int*) ctx;88 int* surface = (int*) ctx;
8989
@@ -115,14 +115,14 @@
115 UAUiWindowProperties* wprops1 = ua_ui_window_properties_new_for_normal_window();115 UAUiWindowProperties* wprops1 = ua_ui_window_properties_new_for_normal_window();
116 ua_ui_window_properties_set_titlen(wprops1, "Window 1", 8);116 ua_ui_window_properties_set_titlen(wprops1, "Window 1", 8);
117 ua_ui_window_properties_set_role(wprops1, U_MAIN_ROLE);117 ua_ui_window_properties_set_role(wprops1, U_MAIN_ROLE);
118 ua_ui_window_properties_set_input_cb_and_ctx(wprops1, on_new_event, &i);118 ua_ui_window_properties_set_event_cb_and_ctx(wprops1, on_new_event, &i);
119 119
120 UAUiWindow* surface1 = ua_ui_window_new_for_application_with_properties(instance, wprops1);120 UAUiWindow* surface1 = ua_ui_window_new_for_application_with_properties(instance, wprops1);
121 121
122 UAUiWindowProperties* wprops2 = ua_ui_window_properties_new_for_normal_window();122 UAUiWindowProperties* wprops2 = ua_ui_window_properties_new_for_normal_window();
123 ua_ui_window_properties_set_titlen(wprops2, "Window 2", 8);123 ua_ui_window_properties_set_titlen(wprops2, "Window 2", 8);
124 ua_ui_window_properties_set_role(wprops2, U_MAIN_ROLE);124 ua_ui_window_properties_set_role(wprops2, U_MAIN_ROLE);
125 ua_ui_window_properties_set_input_cb_and_ctx(wprops2, on_new_event, &j);125 ua_ui_window_properties_set_event_cb_and_ctx(wprops2, on_new_event, &j);
126 126
127 UAUiWindow* surface2 = ua_ui_window_new_for_application_with_properties(instance, wprops2);127 UAUiWindow* surface2 = ua_ui_window_new_for_application_with_properties(instance, wprops2);
128128
129129
=== renamed file 'src/ubuntu/hybris/tests/test_sensors_api.cpp' => 'examples/test_sensors_api.cpp'
--- src/ubuntu/hybris/tests/test_sensors_api.cpp 2014-02-13 13:12:41 +0000
+++ examples/test_sensors_api.cpp 2014-08-26 16:06:15 +0000
@@ -1,16 +1,16 @@
1/*1/*
2 * Copyright © 2012 Canonical Ltd.2 * Copyright © 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.6 * published by the Free Software Foundation.
7 *7 *
8 * This program is distributed in the hope that it will be useful,8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * 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/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>16 * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
@@ -25,6 +25,7 @@
25#include <ubuntu/application/sensors/accelerometer.h>25#include <ubuntu/application/sensors/accelerometer.h>
26#include <ubuntu/application/sensors/proximity.h>26#include <ubuntu/application/sensors/proximity.h>
27#include <ubuntu/application/sensors/light.h>27#include <ubuntu/application/sensors/light.h>
28#include <ubuntu/application/sensors/orientation.h>
2829
29void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)30void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)
30{31{
@@ -68,11 +69,25 @@
68 printf("\tlight: %f\n", light);69 printf("\tlight: %f\n", light);
69}70}
7071
72void on_new_orientation_event(UASOrientationEvent* event, void* context)
73{
74 float x; uas_orientation_event_get_azimuth(event, &x);
75 float y; uas_orientation_event_get_pitch(event, &y);
76 float z; uas_orientation_event_get_roll(event, &z);
77
78 printf("%s \n", __PRETTY_FUNCTION__);
79 printf("\ttime: %" PRIu64 "\n", uas_orientation_event_get_timestamp(event));
80 printf("\tx: %f\n", x);
81 printf("\ty: %f\n", y);
82 printf("\tz: %f\n", z);
83}
84
71int main(int argc, char** argv)85int main(int argc, char** argv)
72{86{
73 UASensorsAccelerometer* accelerometer = ua_sensors_accelerometer_new();87 UASensorsAccelerometer* accelerometer = ua_sensors_accelerometer_new();
74 UASensorsProximity* proximity = ua_sensors_proximity_new();88 UASensorsProximity* proximity = ua_sensors_proximity_new();
75 UASensorsLight* ambientlight = ua_sensors_light_new();89 UASensorsLight* ambientlight = ua_sensors_light_new();
90 UASensorsOrientation* orientation = ua_sensors_orientation_new();
7691
77 ua_sensors_accelerometer_set_reading_cb(accelerometer,92 ua_sensors_accelerometer_set_reading_cb(accelerometer,
78 on_new_accelerometer_event,93 on_new_accelerometer_event,
@@ -86,9 +101,14 @@
86 on_new_light_event,101 on_new_light_event,
87 NULL);102 NULL);
88103
104 ua_sensors_orientation_set_reading_cb(orientation,
105 on_new_orientation_event,
106 NULL);
107
89 ua_sensors_accelerometer_enable(accelerometer);108 ua_sensors_accelerometer_enable(accelerometer);
90 ua_sensors_proximity_enable(proximity);109 ua_sensors_proximity_enable(proximity);
91 ua_sensors_light_enable(ambientlight);110 ua_sensors_light_enable(ambientlight);
111 ua_sensors_orientation_enable(orientation);
92112
93 while(true)113 while(true)
94 {114 {
95115
=== renamed file 'src/ubuntu/hybris/tests/test_session_c_api.cpp' => 'examples/test_session_c_api.cpp'
--- src/ubuntu/hybris/tests/test_session_c_api.cpp 2013-02-13 23:09:01 +0000
+++ examples/test_session_c_api.cpp 2014-08-26 16:06:15 +0000
@@ -1,16 +1,16 @@
1/*1/*
2 * Copyright © 2012 Canonical Ltd.2 * Copyright © 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU Lesser General Public License version 3 as
6 * published by the Free Software Foundation.6 * published by the Free Software Foundation.
7 *7 *
8 * This program is distributed in the hope that it will be useful,8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.11 * GNU Lesser General Public License for more details.
12 *12 *
13 * You should have received a copy of the GNU General Public License13 * 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/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
1717
=== modified file 'include/ubuntu/application/CMakeLists.txt'
--- include/ubuntu/application/CMakeLists.txt 2013-08-22 10:54:28 +0000
+++ include/ubuntu/application/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -7,6 +7,7 @@
7 lifecycle_delegate.h7 lifecycle_delegate.h
8 operation_mode.h8 operation_mode.h
9 options.h9 options.h
10 init.h
10)11)
1112
12install(13install(
1314
=== added file 'include/ubuntu/application/init.h'
--- include/ubuntu/application/init.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/application/init.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,63 @@
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: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17 */
18
19#ifndef UBUNTU_APPLICATION_INIT_H_
20#define UBUNTU_APPLICATION_INIT_H_
21
22#include <ubuntu/visibility.h>
23
24#include <stdint.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30 /**
31 * \brief Queries the Module Version that is currently loaded.
32 * \ingroup application_support
33 * \param[out] major Major version.
34 * \param[out] minor Minor version.
35 * \param[out] patch Patch version.
36 */
37 UBUNTU_DLL_PUBLIC void
38 u_application_module_version(
39 uint32_t *major,
40 uint32_t *minor,
41 uint32_t *patch);
42
43 /**
44 * \brief Initializes the Ubuntu Application API backend with args.
45 * \ingroup application_support
46 * \param[in] args Opaque initialization arguments.
47 */
48 UBUNTU_DLL_PUBLIC void
49 u_application_init(
50 void *args);
51
52 /**
53 * \brief Signal termination to the Application backend instance.
54 * \ingroup application_support
55 */
56 UBUNTU_DLL_PUBLIC void
57 u_application_finish();
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* UBUNTU_APPLICATION_INIT_H_ */
064
=== modified file 'include/ubuntu/application/location/position_update.h'
--- include/ubuntu/application/location/position_update.h 2013-08-22 07:03:49 +0000
+++ include/ubuntu/application/location/position_update.h 2014-08-26 16:06:15 +0000
@@ -103,6 +103,46 @@
103 ua_location_position_update_get_altitude_in_meter(103 ua_location_position_update_get_altitude_in_meter(
104 UALocationPositionUpdate *update);104 UALocationPositionUpdate *update);
105105
106 /**
107 * \brief Checks if the position update contains a horizontal accuracy estimate.
108 * \ingroup location_service
109 * \returns TRUE if the update contains a horizontal accuracy estimate, else FALSE.
110 * \param[in] update The position update instance to be queried.
111 */
112 UBUNTU_DLL_PUBLIC bool
113 ua_location_position_update_has_horizontal_accuracy(
114 UALocationPositionUpdate *update);
115
116 /**
117 * \brief Queries the horizontal accuracy contained in the position update.
118 * \ingroup location_service
119 * \returns The horizontal accuracy of the position update in [m].
120 * \param[in] update The position update instance to be queried.
121 */
122 UBUNTU_DLL_PUBLIC double
123 ua_location_position_update_get_horizontal_accuracy_in_meter(
124 UALocationPositionUpdate *update);
125
126 /**
127 * \brief Checks if the position update contains a vertical accuracy estimate.
128 * \ingroup location_service
129 * \returns TRUE if the update contains a vertical accuracy estimate, else FALSE.
130 * \param[in] update The position update instance to be queried.
131 */
132 UBUNTU_DLL_PUBLIC bool
133 ua_location_position_update_has_vertical_accuracy(
134 UALocationPositionUpdate *update);
135
136 /**
137 * \brief Queries the vertical accuracy contained in the position update.
138 * \ingroup location_service
139 * \returns The vertical accuracy of the position update in [m].
140 * \param[in] update The position update instance to be queried.
141 */
142 UBUNTU_DLL_PUBLIC double
143 ua_location_position_update_get_vertical_accuracy_in_meter(
144 UALocationPositionUpdate *update);
145
106#ifdef __cplusplus146#ifdef __cplusplus
107}147}
108#endif148#endif
109149
=== modified file 'include/ubuntu/application/sensors/CMakeLists.txt'
--- include/ubuntu/application/sensors/CMakeLists.txt 2013-07-18 09:08:17 +0000
+++ include/ubuntu/application/sensors/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -3,7 +3,8 @@
3 accelerometer.h3 accelerometer.h
4 light.h4 light.h
5 proximity.h5 proximity.h
6 ubuntu_application_sensors.h6 haptic.h
7 orientation.h
7)8)
89
9install(10install(
@@ -11,4 +12,4 @@
11 DESTINATION include/ubuntu/application/sensors12 DESTINATION include/ubuntu/application/sensors
12)13)
1314
14add_subdirectory(event)
15\ No newline at end of file15\ No newline at end of file
16add_subdirectory(event)
1617
=== modified file 'include/ubuntu/application/sensors/accelerometer.h'
--- include/ubuntu/application/sensors/accelerometer.h 2014-02-13 13:12:41 +0000
+++ include/ubuntu/application/sensors/accelerometer.h 2014-08-26 16:06:15 +0000
@@ -125,6 +125,18 @@
125 on_accelerometer_event_cb cb,125 on_accelerometer_event_cb cb,
126 void *ctx);126 void *ctx);
127127
128 /**
129 * \brief Set the sensor event delivery rate in nanoseconds..
130 * \ingroup sensor_access
131 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
132 * \param[in] sensor The sensor instance to be modified.
133 * \param[in] rate The new event delivery rate.
134 */
135 UBUNTU_DLL_PUBLIC UStatus
136 ua_sensors_accelerometer_set_event_rate(
137 UASensorsAccelerometer* sensor,
138 uint32_t rate);
139
128#ifdef __cplusplus140#ifdef __cplusplus
129}141}
130#endif142#endif
131143
=== modified file 'include/ubuntu/application/sensors/event/CMakeLists.txt'
--- include/ubuntu/application/sensors/event/CMakeLists.txt 2013-07-18 09:08:17 +0000
+++ include/ubuntu/application/sensors/event/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -3,9 +3,10 @@
3 accelerometer.h3 accelerometer.h
4 light.h4 light.h
5 proximity.h5 proximity.h
6 orientation.h
6)7)
78
8install(9install(
9 FILES ${UBUNTU_APPLICATION_SENSORS_EVENT_HEADERS}10 FILES ${UBUNTU_APPLICATION_SENSORS_EVENT_HEADERS}
10 DESTINATION include/ubuntu/application/sensors/event11 DESTINATION include/ubuntu/application/sensors/event
11)
12\ No newline at end of file12\ No newline at end of file
13)
1314
=== added file 'include/ubuntu/application/sensors/event/orientation.h'
--- include/ubuntu/application/sensors/event/orientation.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/application/sensors/event/orientation.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,83 @@
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: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17 */
18
19#ifndef UBUNTU_APPLICATION_SENSORS_ORIENTATION_EVENT_H_
20#define UBUNTU_APPLICATION_SENSORS_ORIENTATION_EVENT_H_
21
22#include <ubuntu/visibility.h>
23
24#include <stdint.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30 /**
31 * \brief Opaque type describing an orientation reading.
32 * \ingroup sensor_access
33 */
34 typedef void UASOrientationEvent;
35
36 /**
37 * \brief Query the timestamp of the sensor reading.
38 * \ingroup sensor_access
39 * \returns The timestamp of the sensor reading in [µs], timebase: monotonic clock.
40 * \param[in] event The reading to be queried.
41 */
42 UBUNTU_DLL_PUBLIC uint64_t
43 uas_orientation_event_get_timestamp(
44 UASOrientationEvent* event);
45
46 /**
47 * \brief Query the azimuth (rotation around Z-axis).
48 * \ingroup sensor_access
49 * \returns U_STATUS_SUCCESS if the updates were successfully started on the service side, else U_STATUS_ERROR.
50 * \param[out] value The reading to be queried.
51 */
52 UBUNTU_DLL_PUBLIC UStatus
53 uas_orientation_event_get_azimuth(
54 UASOrientationEvent* event,
55 float* value);
56
57 /**
58 * \brief Query the pitch (rotation around X-axis).
59 * \ingroup sensor_access
60 * \returns U_STATUS_SUCCESS if the updates were successfully started on the service side, else U_STATUS_ERROR.
61 * \param[out] value The reading to be queried.
62 */
63 UBUNTU_DLL_PUBLIC UStatus
64 uas_orientation_event_get_pitch(
65 UASOrientationEvent* event,
66 float* value);
67
68 /**
69 * \brief Query the roll (rotation around Y-axis).
70 * \ingroup sensor_access
71 * \returns U_STATUS_SUCCESS if the updates were successfully started on the service side, else U_STATUS_ERROR.
72 * \param[out] value The reading to be queried.
73 */
74 UBUNTU_DLL_PUBLIC UStatus
75 uas_orientation_event_get_roll(
76 UASOrientationEvent* event,
77 float* value);
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* UBUNTU_APPLICATION_SENSORS_ORIENTATION_EVENT_H_ */
084
=== added file 'include/ubuntu/application/sensors/haptic.h'
--- include/ubuntu/application/sensors/haptic.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/application/sensors/haptic.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,98 @@
1/*
2 * Copyright © 2014 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: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17 */
18
19#ifndef UBUNTU_APPLICATION_SENSORS_HAPTIC_H_
20#define UBUNTU_APPLICATION_SENSORS_HAPTIC_H_
21
22#include <ubuntu/status.h>
23#include <ubuntu/visibility.h>
24
25#include <stdint.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * \brief Opaque type that models the haptics device.
33 * \ingroup sensor_access
34 */
35 typedef void UASensorsHaptic;
36
37 /**
38 * \brief Create a new object for accessing the haptics device.
39 * \ingroup sensor_access
40 * \returns A new instance or NULL in case of errors.
41 */
42 UBUNTU_DLL_PUBLIC UASensorsHaptic*
43 ua_sensors_haptic_new();
44
45 /**
46 * \brief Enables the supplied haptics device.
47 * \ingroup sensor_access
48 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
49 * \param[in] sensor The sensor instance to be enabled.
50 */
51 UBUNTU_DLL_PUBLIC UStatus
52 ua_sensors_haptic_enable(
53 UASensorsHaptic* sensor);
54
55 /**
56 * \brief Disables the supplied haptics device.
57 * \ingroup sensor_access
58 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
59 * \param[in] sensor The sensor instance to be disabled.
60 */
61 UBUNTU_DLL_PUBLIC UStatus
62 ua_sensors_haptic_disable(
63 UASensorsHaptic* sensor);
64
65 /**
66 * \brief Run the vibrator for a fixed duration.
67 * \ingroup sensor_access
68 * \returns U_STATUS_SUCCESS if pushed correctly, U_STATUS_ERROR if the pattern limit is invalid or the actuator cannot be activated.
69 * \param[in] sensor Haptic device to activate.
70 * \param[in] duration How long should the vibrator stay on.
71 */
72 UBUNTU_DLL_PUBLIC UStatus
73 ua_sensors_haptic_vibrate_once(
74 UASensorsHaptic* sensor,
75 uint32_t duration);
76
77 #define MAX_PATTERN_SIZE 6
78
79 /**
80 * \brief Run the vibrator with a pattern and repeat a precise number of times.
81 * \ingroup sensor_access
82 * \returns U_STATUS_SUCCESS if pushed correctly, U_STATUS_ERROR if the pattern limit is invalid or the actuator cannot be activated.
83 * \param[in] sensor Haptic device to activate.
84 * \param[in] pattern An array of uint32_t durations for which to keep the vibrator on or off. The first value indicates how long to keep the vibrator on for, the second value how long to keep it off for, and so on until the end of the array.
85 * \param[in] repeat How many times to repeat the whole pattern for.
86 */
87
88 UBUNTU_DLL_PUBLIC UStatus
89 ua_sensors_haptic_vibrate_with_pattern(
90 UASensorsHaptic* sensor,
91 uint32_t pattern[MAX_PATTERN_SIZE],
92 uint32_t repeat);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* UBUNTU_APPLICATION_SENSORS_HAPTIC_H_ */
099
=== modified file 'include/ubuntu/application/sensors/light.h'
--- include/ubuntu/application/sensors/light.h 2014-02-13 13:12:41 +0000
+++ include/ubuntu/application/sensors/light.h 2014-08-26 16:06:15 +0000
@@ -125,6 +125,18 @@
125 on_light_event_cb cb,125 on_light_event_cb cb,
126 void *ctx);126 void *ctx);
127127
128 /**
129 * \brief Set the sensor event delivery rate in nanoseconds..
130 * \ingroup sensor_access
131 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
132 * \param[in] sensor The sensor instance to be modified.
133 * \param[in] rate The new event delivery rate.
134 */
135 UBUNTU_DLL_PUBLIC UStatus
136 ua_sensors_light_set_event_rate(
137 UASensorsLight* sensor,
138 uint32_t rate);
139
128#ifdef __cplusplus140#ifdef __cplusplus
129}141}
130#endif142#endif
131143
=== added file 'include/ubuntu/application/sensors/orientation.h'
--- include/ubuntu/application/sensors/orientation.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/application/sensors/orientation.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,144 @@
1/*
2 * Copyright © 2014 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: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17 */
18
19#ifndef UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_
20#define UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_
21
22#include <ubuntu/status.h>
23#include <ubuntu/visibility.h>
24
25#include <ubuntu/application/sensors/event/orientation.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * \brief Opaque type that models the orientation.
33 * \ingroup sensor_access
34 */
35 typedef void UASensorsOrientation;
36
37 /**
38 * \brief Callback type used by applications to subscribe to orientation events.
39 * \ingroup sensor_access
40 */
41 typedef void (*on_orientation_event_cb)(UASOrientationEvent* event,
42 void* context);
43
44 /**
45 * \brief Create a new object for accessing the orientation sensor.
46 * \ingroup sensor_access
47 * \returns A new instance or NULL in case of errors.
48 */
49 UBUNTU_DLL_PUBLIC UASensorsOrientation*
50 ua_sensors_orientation_new();
51
52 /**
53 * \brief Enables the supplied orientation sensor.
54 * \ingroup sensor_access
55 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
56 * \param[in] sensor The sensor instance to be enabled.
57 */
58 UBUNTU_DLL_PUBLIC UStatus
59 ua_sensors_orientation_enable(
60 UASensorsOrientation* sensor);
61
62 /**
63 * \brief Disables the supplied orientation sensor.
64 * \ingroup sensor_access
65 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
66 * \param[in] sensor The sensor instance to be disabled.
67 */
68 UBUNTU_DLL_PUBLIC UStatus
69 ua_sensors_orientation_disable(
70 UASensorsOrientation* sensor);
71
72 /**
73 * \brief Queries the minimum delay between two readings for the supplied sensor.
74 * \ingroup sensor_access
75 * \returns The minimum delay between two readings in [ms].
76 * \param[in] sensor The sensor instance to be queried.
77 */
78 UBUNTU_DLL_PUBLIC uint32_t
79 ua_sensors_orientation_get_min_delay(
80 UASensorsOrientation* sensor);
81
82 /**
83 * \brief Queries the minimum value that can be reported by the sensor.
84 * \ingroup sensor_access
85 * \returns The minimum value that can be reported by the sensor.
86 * \param[in] sensor The sensor instance to be queried.
87 */
88 UBUNTU_DLL_PUBLIC UStatus
89 ua_sensors_orientation_get_min_value(
90 UASensorsOrientation* sensor,
91 float* value);
92
93 /**
94 * \brief Queries the maximum value that can be reported by the sensor.
95 * \ingroup sensor_access
96 * \returns The maximum value that can be reported by the sensor.
97 * \param[in] sensor The sensor instance to be queried.
98 */
99 UBUNTU_DLL_PUBLIC UStatus
100 ua_sensors_orientation_get_max_value(
101 UASensorsOrientation* sensor,
102 float* value);
103
104 /**
105 * \brief Queries the numeric resolution supported by the sensor
106 * \ingroup sensor_access
107 * \returns The numeric resolution supported by the sensor.
108 * \param[in] sensor The sensor instance to be queried.
109 */
110 UBUNTU_DLL_PUBLIC UStatus
111 ua_sensors_orientation_get_resolution(
112 UASensorsOrientation* sensor,
113 float* value);
114
115 /**
116 * \brief Set the callback to be invoked whenever a new sensor reading is available.
117 * \ingroup sensor_access
118 * \param[in] sensor The sensor instance to associate the callback with.
119 * \param[in] cb The callback to be invoked.
120 * \param[in] ctx The context supplied to the callback invocation.
121 */
122 UBUNTU_DLL_PUBLIC void
123 ua_sensors_orientation_set_reading_cb(
124 UASensorsOrientation* sensor,
125 on_orientation_event_cb cb,
126 void *ctx);
127
128 /**
129 * \brief Set the sensor event delivery rate in nanoseconds..
130 * \ingroup sensor_access
131 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
132 * \param[in] sensor The sensor instance to be modified.
133 * \param[in] rate The new event delivery rate.
134 */
135 UBUNTU_DLL_PUBLIC UStatus
136 ua_sensors_orientation_set_event_rate(
137 UASensorsOrientation* sensor,
138 uint32_t rate);
139
140#ifdef __cplusplus
141}
142#endif
143
144#endif /* UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_ */
0145
=== modified file 'include/ubuntu/application/sensors/proximity.h'
--- include/ubuntu/application/sensors/proximity.h 2014-02-13 13:12:41 +0000
+++ include/ubuntu/application/sensors/proximity.h 2014-08-26 16:06:15 +0000
@@ -125,6 +125,18 @@
125 on_proximity_event_cb cb,125 on_proximity_event_cb cb,
126 void *ctx);126 void *ctx);
127127
128 /**
129 * \brief Set the sensor event delivery rate in nanoseconds..
130 * \ingroup sensor_access
131 * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
132 * \param[in] sensor The sensor instance to be modified.
133 * \param[in] rate The new event delivery rate.
134 */
135 UBUNTU_DLL_PUBLIC UStatus
136 ua_sensors_proximity_set_event_rate(
137 UASensorsProximity* sensor,
138 uint32_t rate);
139
128#ifdef __cplusplus140#ifdef __cplusplus
129}141}
130#endif142#endif
131143
=== removed file 'include/ubuntu/application/sensors/ubuntu_application_sensors.h'
--- include/ubuntu/application/sensors/ubuntu_application_sensors.h 2014-02-13 13:12:41 +0000
+++ include/ubuntu/application/sensors/ubuntu_application_sensors.h 1970-01-01 00:00:00 +0000
@@ -1,160 +0,0 @@
1/*
2 * Copyright © 2012 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#ifndef UBUNTU_APPLICATION_SENSORS_C_API_H_
19#define UBUNTU_APPLICATION_SENSORS_C_API_H_
20
21#include <ubuntu/status.h>
22#include <ubuntu/visibility.h>
23
24#include <stdint.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30 /** \defgroup sensor_access Functions and types to access sensor devices. */
31
32 /** A timestamped accelerometer reading
33 * \ingroup sensor_access
34 */
35 typedef struct
36 {
37 int64_t timestamp;
38
39 float acceleration_x;
40 float acceleration_y;
41 float acceleration_z;
42 } ubuntu_sensor_accelerometer_reading;
43
44 /** A timestamped proximity sensor reading
45 * \ingroup sensor_access
46 */
47 typedef struct
48 {
49 int64_t timestamp;
50
51 float distance;
52 } ubuntu_sensor_proximity_reading;
53
54 /** A timestamped ambient light sensor reading
55 * \ingroup sensor_access
56 */
57 typedef struct
58 {
59 int64_t timestamp;
60
61 float light;
62 } ubuntu_sensor_ambient_light_reading;
63
64 /** Describes the sensor types known to the system
65 * \ingroup sensor_access
66 */
67 enum ubuntu_sensor_type
68 {
69 first_defined_sensor_type = 0,
70 ubuntu_sensor_type_accelerometer = first_defined_sensor_type,
71 ubuntu_sensor_type_magnetic_field,
72 ubuntu_sensor_type_gyroscope,
73 ubuntu_sensor_type_light,
74 ubuntu_sensor_type_proximity,
75 ubuntu_sensor_type_orientation,
76 ubuntu_sensor_type_linear_acceleration,
77 ubuntu_sensor_type_rotation_vector,
78 undefined_sensor_type
79 };
80
81 /** Callback that is invoked for new accelerometer readings.
82 * \ingroup sensor_access
83 * \param reading [in] The new reading.
84 * \param context [in] The callback context.
85 */
86 typedef void (*on_new_accelerometer_reading)(ubuntu_sensor_accelerometer_reading* reading, void* context);
87
88 /** Callback that is invoked for new proximity sensor readings.
89 * \ingroup sensor_access
90 * \param reading [in] The new reading.
91 * \param context [in] The callback context.
92 */
93 typedef void (*on_new_proximity_reading)(ubuntu_sensor_proximity_reading* reading, void* context);
94
95 /** Callback that is invoked for new ambient light sensor readings.
96 * \ingroup sensor_access
97 * \param reading [in] The new reading.
98 * \param context [in] The callback context.
99 */
100 typedef void (*on_new_ambient_light_reading)(ubuntu_sensor_ambient_light_reading* reading, void* context);
101
102 /** Models a sensor observer.
103 * \ingroup sensor_access
104 */
105 typedef struct
106 {
107 /** Invoked for new readings from an accelerometer. */
108 on_new_accelerometer_reading on_new_accelerometer_reading_cb;
109 /** Invoked for new readings from a proximity sensor. */
110 on_new_proximity_reading on_new_proximity_reading_cb;
111 /** Invoked for new readings from an ambient light sensor. */
112 on_new_ambient_light_reading on_new_ambient_light_reading_cb;
113
114 /** Callback context. */
115 void* context;
116 } ubuntu_sensor_observer;
117
118 UBUNTU_DLL_PUBLIC void ubuntu_sensor_initialize_observer(ubuntu_sensor_observer* observer);
119 /** Installs the supplied observer.
120 * \ingroup sensor_access
121 */
122 UBUNTU_DLL_PUBLIC void ubuntu_sensor_install_observer(ubuntu_sensor_observer* observer);
123 /** Uninstalls the supplied observer.
124 * \ingroup sensor_access
125 */
126 UBUNTU_DLL_PUBLIC void ubuntu_sensor_uninstall_observer(ubuntu_sensor_observer* observer);
127
128 /** Enables the specified sensor type and starts data acquisition.
129 * \ingroup sensor_access
130 */
131 UBUNTU_DLL_PUBLIC void ubuntu_sensor_enable_sensor(ubuntu_sensor_type sensor_type);
132 /** Disables the specified sensor type and starts data acquisition.
133 * \ingroup sensor_access
134 */
135 UBUNTU_DLL_PUBLIC void ubuntu_sensor_disable_sensor(ubuntu_sensor_type sensor_type);
136 /** Returns the minimum sensor sampling delay in Hz.
137 * \ingroup sensor_access
138 */
139 UBUNTU_DLL_PUBLIC int32_t ubuntu_sensor_get_sensor_min_delay(ubuntu_sensor_type sensor_type);
140 /** Returns the minimum valid value for the sensor_type.
141 * \ingroup sensor_access
142 */
143 UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_min_value(ubuntu_sensor_type sensor_type, float* value);
144
145 /** Returns the maximum valid value for the sensor_type.
146 * \ingroup sensor_access
147 */
148 UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_max_value(ubuntu_sensor_type sensor_type, float* value);
149
150 /** Returns the resolution of valid values for the sensor_type.
151 * \ingroup sensor_access
152 */
153 UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_resolution(ubuntu_sensor_type sensor_type, float* value);
154
155 /** \example test_sensors_api.cpp */
156#ifdef __cplusplus
157}
158#endif
159
160#endif // UBUNTU_APPLICATION_SENSORS_C_API_H_
1610
=== modified file 'include/ubuntu/application/ui/CMakeLists.txt'
--- include/ubuntu/application/ui/CMakeLists.txt 2013-08-18 20:33:22 +0000
+++ include/ubuntu/application/ui/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -12,6 +12,7 @@
12 session.h12 session.h
13 stage.h13 stage.h
14 window.h14 window.h
15 window_orientation.h
15 window_parent.h16 window_parent.h
16 window_properties.h17 window_properties.h
17 window_state.h18 window_state.h
1819
=== modified file 'include/ubuntu/application/ui/input/CMakeLists.txt'
--- include/ubuntu/application/ui/input/CMakeLists.txt 2013-07-18 09:08:17 +0000
+++ include/ubuntu/application/ui/input/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -1,9 +1,5 @@
1set(1install(
2 UBUNTU_APPLICATION_UI_INPUT_HEADERS2 DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
3 event.h3 DESTINATION include/ubuntu/application/ui
4 FILES_MATCHING PATTERN "*.h"
4)5)
5
6install(
7 FILES ${UBUNTU_APPLICATION_UI_INPUT_HEADERS}
8 DESTINATION include/ubuntu/application/ui/input
9)
10\ No newline at end of file6\ No newline at end of file
117
=== modified file 'include/ubuntu/application/ui/input/event.h'
--- include/ubuntu/application/ui/input/event.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/application/ui/input/event.h 2014-08-26 16:06:15 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright © 2012 Canonical Ltd.2 * Copyright © 2012-2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * 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 as5 * it under the terms of the GNU Lesser General Public License version 3 as
@@ -14,11 +14,13 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17 * Daniel d'Andrada <daniel.dandrada@canonical.com>
17 */18 */
18#ifndef UBUNTU_APPLICATION_UI_INPUT_EVENT_H_19#ifndef UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
19#define UBUNTU_APPLICATION_UI_INPUT_EVENT_H_20#define UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
2021
21#include <ubuntu/visibility.h>22#include <ubuntu/visibility.h>
23#include <ubuntu/application/ui/window_orientation.h>
2224
23#include <stddef.h>25#include <stddef.h>
24#include <stdint.h>26#include <stdint.h>
@@ -102,82 +104,123 @@
102} UMotionButtonMask;104} UMotionButtonMask;
103105
104106
105 /** Maximum number of pointers reported within one input event. */107 /** Maximum number of pointers reported within one event. */
106#define UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT (16)108#define UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT (16)
107109
108 /** Reference timebase, nanoseconds as measured by CLOCK_MONOTONIC. */110/** Reference timebase, nanoseconds as measured by CLOCK_MONOTONIC. */
109 typedef int64_t nsecs_t;111typedef int64_t nsecs_t;
110112
111 /** Describes the different event types. */113typedef enum
112 typedef enum114{
113 {115 SURFACE_ATTRIBUTE_FOCUS
114 KEY_EVENT_TYPE, ///< Event originates from a keyboard.116} SurfaceAttributeType;
115 MOTION_EVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.117
116 HW_SWITCH_EVENT_TYPE ///< Event originates from an additional button attached to the device's HW, e.g., power button.118/** Describes the different event types. */
117 } EventType;119typedef enum
118120{
119 /** Models an input event. */121 KEY_WEVENT_TYPE, ///< Event originates from a keyboard.
120 typedef struct122 MOTION_WEVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
121 {123 RESIZE_WEVENT_TYPE, ///< Surface has been resized
122 EventType type; ///< Type of the event.124 SURFACE_WEVENT_TYPE, ///< A surface attribute has changed its value
123 int32_t device_id; ///< Device that this event originated from.125 ORIENTATION_WEVENT_TYPE, ///< The device orientation changed
124 int32_t source_id; ///< Source that this event originated from.126} WindowEventType;
125 int32_t action; ///< Action signalled by this event.127
126 int32_t flags; ///< Flags associated with this event.128/** Information describing an event originating from a keyboard key. */
127 int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).129typedef struct
128 /** Information specific to key/motion event types. */130{
129 union131 WindowEventType type;
130 {132
131 /** Information describing an event originating from a HW switch. */133 int32_t device_id; ///< Device that this event originated from.
132 struct HardwareSwitchEvent134 int32_t source_id; ///< Source that this event originated from.
133 {135 int32_t action; ///< Action signalled by this event.
134 nsecs_t event_time; ///< Timestamp when the event happened.136 int32_t flags; ///< Flags associated with this event.
135 uint32_t policy_flags; ///< Policy flags.137 int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
136 int32_t switch_code; ///< The scan code of the switch.138
137 int32_t switch_value; ///< The value reported by the switch.139 int32_t key_code;
138 } hw_switch;140 int32_t scan_code;
139 /** Information describing an event originating from a keyboard key. */141 int32_t repeat_count;
140 struct KeyEvent142 nsecs_t down_time;
141 {143 nsecs_t event_time;
142 int32_t key_code; 144 int is_system_key; ///< \deprecated Do not use.
143 int32_t scan_code;145} KeyEvent;
144 int32_t repeat_count;146
145 nsecs_t down_time;147struct PointerCoordinate
146 nsecs_t event_time;148{
147 int is_system_key; ///< \deprecated Do not use.149 int id; ///< Unique id of the pointer
148 } key;150 float x, raw_x; ///< Processed and raw x coordinates
149 /** Information describing an event originating from a151 float y, raw_y; ///< Processed and raw y coordinates
150 * "moving" device, e.g., a mouse, a mouse-wheel, a finger152 float touch_major; ///< Touch major coordinate
151 * on a touchpad. 153 float touch_minor; ///< Touch minor coordinate
152 */154 float size; ///< Size of the pointer/touch
153 struct MotionEvent155 float pressure; ///< Pressure of the touch
154 {156 float orientation; ///< Orientation
155 int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.157};
156 int32_t button_state; ///< State of buttons of the device158
157 float x_offset; ///< Movement in x direction since down event159/** Information describing an event originating from a
158 float y_offset; ///< Movement in y direction since down event160 * "moving" device, e.g., a mouse, a mouse-wheel, a finger
159 float x_precision; ///< Sampling precision in x direction161 * on a touchpad.
160 float y_precision; ///< Sampling precision in y direction162 */
161 nsecs_t down_time; ///< Timestamp that marks the down event163typedef struct
162 nsecs_t event_time; ///< Timestamp that marks when this event happened164{
163 size_t pointer_count; ///< Number of pointers reported in this event165 WindowEventType type;
164 struct PointerCoordinate166
165 {167 int32_t device_id; ///< Device that this event originated from.
166 int id; ///< Unique id of the pointer168 int32_t source_id; ///< Source that this event originated from.
167 float x, raw_x; ///< Processed and raw x coordinates169 int32_t action; ///< Action signalled by this event.
168 float y, raw_y; ///< Processed and raw y coordinates170 int32_t flags; ///< Flags associated with this event.
169 float touch_major; ///< Touch major coordinate171 int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
170 float touch_minor; ///< Touch minor coordinate172
171 float size; ///< Size of the pointer/touch173 int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
172 float pressure; ///< Pressure of the touch174 int32_t button_state; ///< State of buttons of the device
173 float orientation; ///< Orientation175 float x_offset; ///< Movement in x direction since down event
174 } pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).176 float y_offset; ///< Movement in y direction since down event
175 } motion;177 float x_precision; ///< Sampling precision in x direction
176 } details;178 float y_precision; ///< Sampling precision in y direction
177 } Event;179 nsecs_t down_time; ///< Timestamp that marks the down event
180 nsecs_t event_time; ///< Timestamp that marks when this event happened
181 size_t pointer_count; ///< Number of pointers reported in this event
182 struct PointerCoordinate pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
183} MotionEvent;
184
185typedef struct
186{
187 WindowEventType type;
188
189 SurfaceAttributeType attribute; ///< The surface attribute that has changed
190 int32_t value; ///< The new value of that surface attribute.
191} SurfaceEvent;
192
193/** Information describing a surface resize event. */
194typedef struct
195{
196 WindowEventType type;
197
198 int32_t width; ///< The new surface width
199 int32_t height; ///< The new surface height.
200} ResizeEvent;
201
202/** Information describing a surface orientation change event. */
203typedef struct
204{
205 WindowEventType type;
206
207 UApplicationUiWindowOrientation direction; ///< The new surface orientation
208} OrientationEvent;
209
210typedef union
211{
212 WindowEventType type;
213 KeyEvent key;
214 MotionEvent motion;
215 SurfaceEvent surface;
216 ResizeEvent resize;
217 OrientationEvent orientation;
218} WindowEvent;
178219
179#ifdef __cplusplus220#ifdef __cplusplus
180}221}
181#endif222#endif
182223
224#include "event_deprecated.h"
225
183#endif // UBUNTU_APPLICATION_UI_INPUT_EVENT_H_226#endif // UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
184227
=== added file 'include/ubuntu/application/ui/input/event_deprecated.h'
--- include/ubuntu/application/ui/input/event_deprecated.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/application/ui/input/event_deprecated.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,88 @@
1/*
2 * Copyright © 2014 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_UI__EVENT_DEPRECATED_H_
20#define UBUNTU_APPLICATION_UI__EVENT_DEPRECATED_H_
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26 /** Describes the different event types. */
27 typedef enum
28 {
29 KEY_EVENT_TYPE, ///< Event originates from a keyboard.
30 MOTION_EVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
31 HW_SWITCH_EVENT_TYPE ///< Event originates from an additional button attached to the device's HW, e.g., power button.
32 } EventType;
33
34 /** Models an input event. */
35 typedef struct
36 {
37 EventType type; ///< Type of the event.
38 int32_t device_id; ///< Device that this event originated from.
39 int32_t source_id; ///< Source that this event originated from.
40 int32_t action; ///< Action signalled by this event.
41 int32_t flags; ///< Flags associated with this event.
42 int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
43 /** Information specific to key/motion event types. */
44 union
45 {
46 /** Information describing an event originating from a HW switch. */
47 struct HardwareSwitchEvent
48 {
49 nsecs_t event_time; ///< Timestamp when the event happened.
50 uint32_t policy_flags; ///< Policy flags.
51 int32_t switch_code; ///< The scan code of the switch.
52 int32_t switch_value; ///< The value reported by the switch.
53 } hw_switch;
54 /** Information describing an event originating from a keyboard key. */
55 struct KeyEvent
56 {
57 int32_t key_code;
58 int32_t scan_code;
59 int32_t repeat_count;
60 nsecs_t down_time;
61 nsecs_t event_time;
62 int is_system_key; ///< \deprecated Do not use.
63 } key;
64 /** Information describing an event originating from a
65 * "moving" device, e.g., a mouse, a mouse-wheel, a finger
66 * on a touchpad.
67 */
68 struct MotionEvent
69 {
70 int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
71 int32_t button_state; ///< State of buttons of the device
72 float x_offset; ///< Movement in x direction since down event
73 float y_offset; ///< Movement in y direction since down event
74 float x_precision; ///< Sampling precision in x direction
75 float y_precision; ///< Sampling precision in y direction
76 nsecs_t down_time; ///< Timestamp that marks the down event
77 nsecs_t event_time; ///< Timestamp that marks when this event happened
78 size_t pointer_count; ///< Number of pointers reported in this event
79 struct PointerCoordinate pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
80 } motion;
81 } details;
82 } Event;
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif // UBUNTU_APPLICATION_UI__EVENT_DEPRECATED_H_
089
=== modified file 'include/ubuntu/application/ui/window.h'
--- include/ubuntu/application/ui/window.h 2014-05-07 12:21:22 +0000
+++ include/ubuntu/application/ui/window.h 2014-08-26 16:06:15 +0000
@@ -25,6 +25,7 @@
25#include <ubuntu/status.h>25#include <ubuntu/status.h>
26#include <ubuntu/application/instance.h>26#include <ubuntu/application/instance.h>
27#include <ubuntu/application/ui/window_properties.h>27#include <ubuntu/application/ui/window_properties.h>
28#include <ubuntu/application/ui/window_orientation.h>
2829
29#include <EGL/egl.h>30#include <EGL/egl.h>
3031
@@ -34,7 +35,10 @@
3435
35 typedef void UAUiWindow;36 typedef void UAUiWindow;
36 typedef int32_t UAUiWindowId;37 typedef int32_t UAUiWindowId;
37 38
39 /*
40 Ownership of properties is given to the returned UAUiWindow
41 */
38 UBUNTU_DLL_PUBLIC UAUiWindow*42 UBUNTU_DLL_PUBLIC UAUiWindow*
39 ua_ui_window_new_for_application_with_properties(43 ua_ui_window_new_for_application_with_properties(
40 UApplicationInstance *instance,44 UApplicationInstance *instance,
@@ -82,6 +86,14 @@
82 ua_ui_window_get_native_type(86 ua_ui_window_get_native_type(
83 UAUiWindow *window);87 UAUiWindow *window);
8488
89 UBUNTU_DLL_PUBLIC int
90 ua_ui_window_is_focused(
91 UAUiWindow *window);
92
93 UBUNTU_DLL_PUBLIC UApplicationUiWindowOrientation
94 ua_ui_window_get_orientation(
95 UAUiWindow *window);
96
85#ifdef __cplusplus97#ifdef __cplusplus
86}98}
87#endif99#endif
88100
=== added file 'include/ubuntu/application/ui/window_orientation.h'
--- include/ubuntu/application/ui/window_orientation.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/application/ui/window_orientation.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,27 @@
1/*
2 * Copyright © 2014 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
17#ifndef UBUNTU_APPLICATION_UI_WINDOW_ORIENTATION_H
18#define UBUNTU_APPLICATION_UI_WINDOW_ORIENTATION_H
19
20typedef enum {
21 U_ORIENTATION_NORMAL = 1,
22 U_ORIENTATION_LEFT,
23 U_ORIENTATION_RIGHT,
24 U_ORIENTATION_INVERTED,
25} UApplicationUiWindowOrientation;
26
27#endif // UBUNTU_APPLICATION_UI_WINDOW_ORIENTATION_H
028
=== modified file 'include/ubuntu/application/ui/window_properties.h'
--- include/ubuntu/application/ui/window_properties.h 2013-12-11 04:56:15 +0000
+++ include/ubuntu/application/ui/window_properties.h 2014-08-26 16:06:15 +0000
@@ -39,10 +39,13 @@
39 U_SHUTDOWN_DIALOG_ROLE,39 U_SHUTDOWN_DIALOG_ROLE,
40 } UAUiWindowRole;40 } UAUiWindowRole;
4141
4242 // Deprecated! Use UAUiWindowEventCb instead
43 typedef void (*input_event_cb)(void* ctx, const Event* ev);43 typedef void (*input_event_cb)(void* ctx, const Event* ev);
44 typedef input_event_cb UAUiWindowInputEventCb;44 typedef input_event_cb UAUiWindowInputEventCb;
4545
46 typedef void (*event_cb)(void* ctx, const WindowEvent* ev);
47 typedef event_cb UAUiWindowEventCb;
48
46 typedef void UAUiWindowProperties;49 typedef void UAUiWindowProperties;
47 50
48 UBUNTU_DLL_PUBLIC UAUiWindowProperties*51 UBUNTU_DLL_PUBLIC UAUiWindowProperties*
@@ -70,7 +73,8 @@
70 UBUNTU_DLL_PUBLIC UAUiWindowRole73 UBUNTU_DLL_PUBLIC UAUiWindowRole
71 ua_ui_window_properties_get_role(74 ua_ui_window_properties_get_role(
72 UAUiWindowProperties *properties);75 UAUiWindowProperties *properties);
73 76
77 // Deprecated! Use ua_ui_window_properties_set_event_cb_and_ctx instead.
74 UBUNTU_DLL_PUBLIC void78 UBUNTU_DLL_PUBLIC void
75 ua_ui_window_properties_set_input_cb_and_ctx(79 ua_ui_window_properties_set_input_cb_and_ctx(
76 UAUiWindowProperties *properties,80 UAUiWindowProperties *properties,
@@ -78,6 +82,12 @@
78 void *ctx);82 void *ctx);
7983
80 UBUNTU_DLL_PUBLIC void84 UBUNTU_DLL_PUBLIC void
85 ua_ui_window_properties_set_event_cb_and_ctx(
86 UAUiWindowProperties *properties,
87 UAUiWindowEventCb cb,
88 void *ctx);
89
90 UBUNTU_DLL_PUBLIC void
81 ua_ui_window_properties_set_dimensions(91 ua_ui_window_properties_set_dimensions(
82 UAUiWindowProperties *properties,92 UAUiWindowProperties *properties,
83 uint32_t width,93 uint32_t width,
8494
=== modified file 'include/ubuntu/hardware/CMakeLists.txt'
--- include/ubuntu/hardware/CMakeLists.txt 2013-07-18 09:08:17 +0000
+++ include/ubuntu/hardware/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -1,9 +1,10 @@
1set(1set(
2 UBUNTU_HARDWARE_HEADERS2 UBUNTU_HARDWARE_HEADERS
3 alarm.h
3 gps.h4 gps.h
4)5)
56
6install(7install(
7 FILES ${UBUNTU_HARDWARE_HEADERS}8 FILES ${UBUNTU_HARDWARE_HEADERS}
8 DESTINATION include/ubuntu/hardware9 DESTINATION include/ubuntu/hardware
9)
10\ No newline at end of file10\ No newline at end of file
11)
1112
=== added file 'include/ubuntu/hardware/alarm.h'
--- include/ubuntu/hardware/alarm.h 1970-01-01 00:00:00 +0000
+++ include/ubuntu/hardware/alarm.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,104 @@
1/*
2 * Copyright © 2014 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#ifndef UBUNTU_HARDWARE_ALARM_H_
19#define UBUNTU_HARDWARE_ALARM_H_
20
21#include <ubuntu/status.h>
22#include <ubuntu/visibility.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/** The time reference that alarms are setup to. */
29typedef enum
30{
31 U_HARDWARE_ALARM_TIME_REFERENCE_BOOT, /**< Relative to the device's boot time, including sleep. */
32 U_HARDWARE_ALARM_TIME_REFERENCE_RTC /**< Wall clock time in UTC. */
33} UbuntuHardwareAlarmTimeReference;
34
35typedef UbuntuHardwareAlarmTimeReference UHardwareAlarmTimeReference;
36
37/** Describes if an alarm is able to wakup the device from sleep. */
38typedef enum
39{
40 /** Alarm will wakeup the device from sleep. */
41 U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE,
42 /** Alarm will not wakeup the device and will be delivered on the next wakeup of the device */
43 U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP
44} UbuntuHardwareAlarmSleepBehavior;
45
46typedef UbuntuHardwareAlarmSleepBehavior UHardwareAlarmSleepBehavior;
47
48/** Bundles the time reference and sleep/wakeup behavior when waiting for an alarm to happen. */
49typedef struct
50{
51 UHardwareAlarmTimeReference reference;
52 UHardwareAlarmSleepBehavior sleep_behavior;
53} UbuntuHardwareAlarmWaitResult;
54
55typedef UbuntuHardwareAlarmWaitResult UHardwareAlarmWaitResult;
56
57/** Opaque type modelling access to the kernel/hw-level alarm capabilities. */
58typedef struct UbuntuHardwareAlarm* UHardwareAlarm;
59
60/** Creates an instance and/or increments its refcount. */
61UBUNTU_DLL_PUBLIC UHardwareAlarm
62u_hardware_alarm_create();
63
64/** Increments the instance's ref count. */
65UBUNTU_DLL_PUBLIC void
66u_hardware_alarm_ref(
67 UHardwareAlarm alarm);
68
69/** Decrements the instance's ref count. */
70UBUNTU_DLL_PUBLIC void
71u_hardware_alarm_unref(
72 UHardwareAlarm alarm);
73
74/** Query the time that elapsed since boot, including deep sleeps. */
75UBUNTU_DLL_PUBLIC UStatus
76u_hardware_alarm_get_elapsed_real_time(
77 UHardwareAlarm alarm,
78 struct timespec *tz);
79
80/** Reports a timezone change to kernel and HW. */
81UBUNTU_DLL_PUBLIC UStatus
82u_hardware_alarm_set_timezone(
83 UHardwareAlarm alarm,
84 const struct timezone *tz);
85
86/** Sets and arms a timer. */
87UBUNTU_DLL_PUBLIC UStatus
88u_hardware_alarm_set_relative_to_with_behavior(
89 UHardwareAlarm alarm,
90 UHardwareAlarmTimeReference time_reference,
91 UHardwareAlarmSleepBehavior behavior,
92 const struct timespec *ts);
93
94/** Blocks until the next alarm occurs. */
95UBUNTU_DLL_PUBLIC UStatus
96u_hardware_alarm_wait_for_next_alarm(
97 UHardwareAlarm alarm,
98 UHardwareAlarmWaitResult *result);
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif
0105
=== modified file 'include/ubuntu/hardware/gps.h'
--- include/ubuntu/hardware/gps.h 2013-08-22 07:17:47 +0000
+++ include/ubuntu/hardware/gps.h 2014-08-26 16:06:15 +0000
@@ -180,6 +180,37 @@
180 U_HARDWARE_GPS_AGPS_DATA_CONN_FAILED = 5180 U_HARDWARE_GPS_AGPS_DATA_CONN_FAILED = 5
181};181};
182182
183/** Flags used to specify which aiding data to delete
184 when calling delete_aiding_data(). */
185typedef uint16_t UHardwareGpsAidingData;
186
187#define U_HARDWARE_GPS_DELETE_EPHEMERIS 0x0001
188#define U_HARDWARE_GPS_DELETE_ALMANAC 0x0002
189#define U_HARDWARE_GPS_DELETE_POSITION 0x0004
190#define U_HARDWARE_GPS_DELETE_TIME 0x0008
191#define U_HARDWARE_GPS_DELETE_IONO 0x0010
192#define U_HARDWARE_GPS_DELETE_UTC 0x0020
193#define U_HARDWARE_GPS_DELETE_HEALTH 0x0040
194#define U_HARDWARE_GPS_DELETE_SVDIR 0x0080
195#define U_HARDWARE_GPS_DELETE_SVSTEER 0x0100
196#define U_HARDWARE_GPS_DELETE_SADATA 0x0200
197#define U_HARDWARE_GPS_DELETE_RTI 0x0400
198#define U_HARDWARE_GPS_DELETE_CELLDB_INFO 0x8000
199#define U_HARDWARE_GPS_DELETE_ALL 0xFFFF
200
201/** AGPS type */
202typedef uint16_t UHardwareGpsAGpsType;
203#define U_HARDWARE_GPS_AGPS_TYPE_SUPL 1
204#define U_HARDWARE_GPS_AGPS_TYPE_C2K 2
205
206/** Known types for AGps reference locations. */
207/** A GSM cell ID. */
208#define U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_GSM_CELLID 1
209/** A UMTS cell ID. */
210#define U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_UMTS_CELLID 2
211/** The BSSID of a visible access point. */
212#define U_HARDWARE_GPS_AGPS_REG_LOCATION_TYPE_MAC 3
213
183/** UHardwareGpsLocation has valid latitude and longitude. */214/** UHardwareGpsLocation has valid latitude and longitude. */
184#define U_HARDWARE_GPS_LOCATION_HAS_LAT_LONG 0x0001215#define U_HARDWARE_GPS_LOCATION_HAS_LAT_LONG 0x0001
185/** UHardwareGpsLocation has valid altitude. */216/** UHardwareGpsLocation has valid altitude. */
@@ -207,8 +238,7 @@
207 double latitude;238 double latitude;
208 /** Represents longitude in degrees. */239 /** Represents longitude in degrees. */
209 double longitude;240 double longitude;
210 /** Represents altitude in meters above the WGS 84 reference241 /** Represents altitude in meters above the WGS 84 reference ellipsoid. */
211 * ellipsoid. */
212 double altitude;242 double altitude;
213 /** Represents speed in meters per second. */243 /** Represents speed in meters per second. */
214 float speed;244 float speed;
@@ -281,6 +311,46 @@
281 uint32_t ipaddr;311 uint32_t ipaddr;
282} UHardwareGpsAGpsStatus;312} UHardwareGpsAGpsStatus;
283313
314/** \brief Describes a cell ID as understood by the GPS chipset. */
315typedef struct
316{
317 /** One of:
318 * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_GSM_CELLID
319 * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_UMTS_CELLID
320 */
321 uint16_t type;
322 /** Mobile country code. */
323 uint16_t mcc;
324 /** Mobile network code. */
325 uint16_t mnc;
326 /** Location area code. */
327 uint16_t lac;
328 /** The actual cell id. */
329 uint32_t cid;
330} UHardwareGpsAGpsRefLocationCellID;
331
332/** \brief Describes a wifi ID as understood by the GPS chipset. */
333typedef struct
334{
335 /** The MAC address/BSSID of an AP. */
336 uint8_t mac[6];
337} UHardwareGpsAGpsRefLocationMac;
338
339/** @brief Describes a reference location, either a radio cell or a wifi. */
340typedef struct
341{
342 /** One of:
343 * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_GSM_CELLID
344 * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_UMTS_CELLID
345 * U_HARDWARE_GPS_AGPS_REG_LOCATION_TYPE_MAC
346 */
347 uint16_t type;
348 union {
349 UHardwareGpsAGpsRefLocationCellID cellID;
350 UHardwareGpsAGpsRefLocationMac mac;
351 } u;
352} UHardwareGpsAGpsRefLocation;
353
284/**354/**
285 * Represents an NI request355 * Represents an NI request
286 * \ingroup gps_access356 * \ingroup gps_access
@@ -353,23 +423,18 @@
353typedef void (*UHardwareGpsSetCapabilities)(uint32_t capabilities, void *context);423typedef void (*UHardwareGpsSetCapabilities)(uint32_t capabilities, void *context);
354typedef void (*UHardwareGpsRequestUtcTime)(void *context);424typedef void (*UHardwareGpsRequestUtcTime)(void *context);
355425
356/** Callback to request the client to download XTRA data.426/** Callback to request the client to download XTRA data. The client should download XTRA data and inject it by calling inject_xtra_data(). */
357 * The client should download XTRA data and inject it by calling inject_xtra_data().
358 */
359typedef void (*UHardwareGpsXtraDownloadRequest)(void *context);427typedef void (*UHardwareGpsXtraDownloadRequest)(void *context);
360428
361/** Callback with AGPS status information.429/** Callback with AGPS status information. */
362 */
363typedef void (*UHardwareGpsAGpsStatusCallback)(UHardwareGpsAGpsStatus *status, void *context);430typedef void (*UHardwareGpsAGpsStatusCallback)(UHardwareGpsAGpsStatus *status, void *context);
364431
365/** Callback with NI notification.432/** Callback with NI notification. */
366 */
367typedef void (*UHardwareGpsNiNotifyCallback)(UHardwareGpsNiNotification *notification, void *context);433typedef void (*UHardwareGpsNiNotifyCallback)(UHardwareGpsNiNotification *notification, void *context);
368434
369/*435/** Callback invoked by the driver to set the set id. */
370 Callback for AGPS RIL (Radio Interface Library) set id
371*/
372typedef void (*UHardwareGpsAGpsRilRequestSetId)(uint32_t flags, void *context);436typedef void (*UHardwareGpsAGpsRilRequestSetId)(uint32_t flags, void *context);
437/** Callback invoked by the driver to request a reference location (typically cell ID). */
373typedef void (*UHardwareGpsAGpsRilRequestRefLoc)(uint32_t flags, void *context);438typedef void (*UHardwareGpsAGpsRilRequestRefLoc)(uint32_t flags, void *context);
374439
375typedef struct440typedef struct
@@ -409,10 +474,10 @@
409UBUNTU_DLL_PUBLIC bool474UBUNTU_DLL_PUBLIC bool
410u_hardware_gps_stop(UHardwareGps self);475u_hardware_gps_stop(UHardwareGps self);
411476
412/*477/** \brief Injects a new reference time into the GPS chipset.
413 \param time NTP time, in milliseconds since Jan 1st 1970.478 * \param time NTP time, in milliseconds since Jan 1st 1970.
414 \param time_reference time from the internal clock at the moment that NTP time was taken.479 * \param time_reference time from the internal clock at the moment that NTP time was taken.
415 \param uncertainty possible deviation in the time supplied (uncertainty) in milliseconds.480 * \param uncertainty possible deviation in the time supplied (uncertainty) in milliseconds.
416 */481 */
417UBUNTU_DLL_PUBLIC void482UBUNTU_DLL_PUBLIC void
418u_hardware_gps_inject_time(483u_hardware_gps_inject_time(
@@ -421,24 +486,88 @@
421 int64_t time_reference,486 int64_t time_reference,
422 int uncertainty);487 int uncertainty);
423488
489/**
490 * \brief Injects a new reference location into the GPS chipset.
491 * \param self The instance to apply the change to.
492 * \param location New location to me injected. The structure must have the following details, any others are ignored:
493 * - location: New coordinate, in [°].
494 * - longitude: New coordinate, [°].
495 * - accuracy: Accuracy estimate of the location, in [m].
496 */
424UBUNTU_DLL_PUBLIC void497UBUNTU_DLL_PUBLIC void
425u_hardware_gps_inject_location(498u_hardware_gps_inject_location(
426 UHardwareGps self,499 UHardwareGps self,
427 double latitude,500 UHardwareGpsLocation location);
428 double longitude,501
429 float accuracy);502/**
430503 * \brief Informs the GPS chipset about wifi ap's or radio cells to be used in AGPS calls.
504 * \param self The instance to inform.
505 * \param location The reference location, that is a wifi ap or a radio cell.
506 * \param size_of_struct The size of the reference location struct.
507 */
508UBUNTU_DLL_PUBLIC void
509u_hardware_gps_agps_set_reference_location(
510 UHardwareGps self,
511 UHardwareGpsAGpsRefLocation *location,
512 size_t size_of_struct);
513
514/**
515 * \brief Notifies the chipset that a data connection is availble.
516 * \param self The instance to be notified.
517 * \param apn Name of the apn to be used for SUPL.
518 */
519UBUNTU_DLL_PUBLIC void
520u_hardware_gps_agps_notify_connection_is_open(
521 UHardwareGps self,
522 const char *apn);
523
524/**
525 * \brief Notifies the chipset that an AGPS data connection has been closed.
526 * \param self The instance to be notified.
527 */
528UBUNTU_DLL_PUBLIC void
529u_hardware_gps_agps_notify_connection_is_closed(
530 UHardwareGps self);
531
532/**
533 * \brief Notifies the chipset that an AGPS data connection is not available.
534 * \param self The instance to be notified.
535 */
536UBUNTU_DLL_PUBLIC void
537u_hardware_gps_agps_notify_connection_not_available(
538 UHardwareGps self);
539
540/**
541 * \brief Sets the hostname and port for the AGPS server.
542 * \param self The instance to be altered.
543 * \param type Type of the server, one of U_HARDWARE_GPS_AGPS_TYPE_SUPL or U_HARDWARE_GPS_AGPS_TYPE_C2K.
544 * \param hostname The hostname of the AGPS server.
545 * \param port The post of the AGPS server.
546 */
547UBUNTU_DLL_PUBLIC void
548u_hardware_gps_agps_set_server_for_type(
549 UHardwareGps self,
550 UHardwareGpsAGpsType type,
551 const char* hostname,
552 uint16_t port);
553
554/**
555 * \brief Requests the chipset to delete the aiding data specified in flags.
556 * \param self The instance to apply the change to.
557 * \param flags Specifies the aiding data that should be deleted.
558 */
431UBUNTU_DLL_PUBLIC void559UBUNTU_DLL_PUBLIC void
432u_hardware_gps_delete_aiding_data(560u_hardware_gps_delete_aiding_data(
433 UHardwareGps self,561 UHardwareGps self,
434 uint16_t flags);562 UHardwareGpsAidingData flags);
435563
436/*564/**
437 \param mode One of the U_HARDWARE_GPS_POSITION_MODE_* values565 * \brief Sets the positioning mode of the chipset.
438 \param recurrence One of the U_HARDWARE_GPS_POSITION_RECURRENCE_* values566 * \param mode One of the U_HARDWARE_GPS_POSITION_MODE_* values
439 \param min_interval represents the time between fixes in milliseconds.567 * \param recurrence One of the U_HARDWARE_GPS_POSITION_RECURRENCE_* values
440 \param preferred_accuracy The requested fix accuracy in meters. Can be zero.568 * \param min_interval represents the time between fixes in milliseconds.
441 \param preferred_time The requested time to first fix in milliseconds. Can be zero.569 * \param preferred_accuracy The requested fix accuracy in meters. Can be zero.
570 * \param preferred_time The requested time to first fix in milliseconds. Can be zero.
442 */571 */
443UBUNTU_DLL_PUBLIC bool572UBUNTU_DLL_PUBLIC bool
444u_hardware_gps_set_position_mode(573u_hardware_gps_set_position_mode(
445574
=== modified file 'include/ubuntu/visibility.h'
--- include/ubuntu/visibility.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/visibility.h 2014-08-26 16:06:15 +0000
@@ -21,8 +21,10 @@
2121
22#if __GNUC__ >= 422#if __GNUC__ >= 4
23#define UBUNTU_DLL_PUBLIC __attribute__ ((visibility ("default")))23#define UBUNTU_DLL_PUBLIC __attribute__ ((visibility ("default")))
24#define UBUNTU_DLL_LOCAL __attribute__ ((visibility ("hidden")))
24#else25#else
25#define UBUNTU_DLL_PUBLIC26#define UBUNTU_DLL_PUBLIC
27#define UBUNTU_DLL_LOCAL
26#endif28#endif
2729
28#endif /* UBUNTU_VISIBILITY_H_ */30#endif /* UBUNTU_VISIBILITY_H_ */
2931
=== added directory 'src/bridge'
=== added file 'src/bridge/bridge.h'
--- src/bridge/bridge.h 1970-01-01 00:00:00 +0000
+++ src/bridge/bridge.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,63 @@
1/*
2 * Copyright (C) 2012 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 Voss <thomas.voss@canonical.com>
17 * Ricardo Mendoza <ricardo.mendoza@canonical.com>
18 */
19#ifndef BASE_BRIDGE_H_
20#define BASE_BRIDGE_H_
21
22#include <assert.h>
23#include <dlfcn.h>
24#include <stddef.h>
25#include <stdlib.h>
26#include <stdio.h>
27#include <string.h>
28
29#define MAX_MODULE_NAME 32
30
31#define HIDDEN_SYMBOL __attribute__ ((visibility ("hidden")))
32
33namespace internal
34{
35template<typename Scope>
36class HIDDEN_SYMBOL Bridge
37{
38 public:
39 static Bridge<Scope>& instance()
40 {
41 static Bridge<Scope> bridge;
42 return bridge;
43 }
44
45 void* resolve_symbol(const char* symbol) const
46 {
47 return Scope::dlsym_fn(lib_handle, symbol);
48 }
49
50 protected:
51 Bridge() : lib_handle(Scope::dlopen_fn(Scope::path(), RTLD_LAZY))
52 {
53 }
54
55 ~Bridge()
56 {
57 }
58
59 void* lib_handle;
60};
61}
62
63#endif // BRIDGE_H_
064
=== added file 'src/bridge/bridge_defs.h'
--- src/bridge/bridge_defs.h 1970-01-01 00:00:00 +0000
+++ src/bridge/bridge_defs.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,136 @@
1/*
2 * Copyright (C) 2012 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 Voss <thomas.voss@canonical.com>
17 * Ricardo Mendoza <ricardo.mendoza@canonical.com>
18 */
19#ifndef BRIDGE_DEFS_H_
20#define BRIDGE_DEFS_H_
21
22// Must be included afterthe Bridge class is defined
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**********************************************************/
29/*********** Implementation starts here *******************/
30/**********************************************************/
31
32// this allows DLSYM to return NULL (happens if the backend is not available),
33// and returns NULL in that case; return_type must be a pointer!
34#define IMPLEMENT_CTOR0(return_type, symbol) \
35 return_type symbol() \
36 { \
37 static return_type (*f)() = NULL; \
38 DLSYM(&f, #symbol); \
39 return f ? f() : NULL;}
40
41#define IMPLEMENT_FUNCTION0(return_type, symbol) \
42 return_type symbol() \
43 { \
44 static return_type (*f)() = NULL; \
45 DLSYM(&f, #symbol); \
46 return f();}
47
48#define IMPLEMENT_VOID_FUNCTION0(symbol) \
49 void symbol() \
50 { \
51 static void (*f)() = NULL; \
52 DLSYM(&f, #symbol); \
53 f();}
54
55#define IMPLEMENT_FUNCTION1(return_type, symbol, arg1) \
56 return_type symbol(arg1 _1) \
57 { \
58 static return_type (*f)(arg1) = NULL; \
59 DLSYM(&f, #symbol); \
60 return f(_1); }
61
62#define IMPLEMENT_VOID_FUNCTION1(symbol, arg1) \
63 void symbol(arg1 _1) \
64 { \
65 static void (*f)(arg1) = NULL; \
66 DLSYM(&f, #symbol); \
67 f(_1); }
68
69#define IMPLEMENT_FUNCTION2(return_type, symbol, arg1, arg2) \
70 return_type symbol(arg1 _1, arg2 _2) \
71 { \
72 static return_type (*f)(arg1, arg2) = NULL; \
73 DLSYM(&f, #symbol); \
74 return f(_1, _2); }
75
76#define IMPLEMENT_VOID_FUNCTION2(symbol, arg1, arg2) \
77 void symbol(arg1 _1, arg2 _2) \
78 { \
79 static void (*f)(arg1, arg2) = NULL; \
80 DLSYM(&f, #symbol); \
81 f(_1, _2); }
82
83#define IMPLEMENT_FUNCTION3(return_type, symbol, arg1, arg2, arg3) \
84 return_type symbol(arg1 _1, arg2 _2, arg3 _3) \
85 { \
86 static return_type (*f)(arg1, arg2, arg3) = NULL; \
87 DLSYM(&f, #symbol); \
88 return f(_1, _2, _3); }
89
90#define IMPLEMENT_VOID_FUNCTION3(symbol, arg1, arg2, arg3) \
91 void symbol(arg1 _1, arg2 _2, arg3 _3) \
92 { \
93 static void (*f)(arg1, arg2, arg3) = NULL; \
94 DLSYM(&f, #symbol); \
95 f(_1, _2, _3); }
96
97#define IMPLEMENT_VOID_FUNCTION4(symbol, arg1, arg2, arg3, arg4) \
98 void symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4) \
99 { \
100 static void (*f)(arg1, arg2, arg3, arg4) = NULL; \
101 DLSYM(&f, #symbol); \
102 f(_1, _2, _3, _4); }
103
104#define IMPLEMENT_FUNCTION4(return_type, symbol, arg1, arg2, arg3, arg4) \
105 return_type symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4) \
106 { \
107 static return_type (*f)(arg1, arg2, arg3, arg4) = NULL; \
108 DLSYM(&f, #symbol); \
109 return f(_1, _2, _3, _4); }
110
111#define IMPLEMENT_FUNCTION6(return_type, symbol, arg1, arg2, arg3, arg4, arg5, arg6) \
112 return_type symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4, arg5 _5, arg6 _6) \
113 { \
114 static return_type (*f)(arg1, arg2, arg3, arg4, arg5, arg6) = NULL; \
115 DLSYM(&f, #symbol); \
116 return f(_1, _2, _3, _4, _5, _6); }
117
118#define IMPLEMENT_VOID_FUNCTION7(symbol, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
119 void symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4, arg5 _5, arg6 _6, arg7 _7) \
120 { \
121 static void (*f)(arg1, arg2, arg3, arg4, arg5, arg6, arg7) = NULL; \
122 DLSYM(&f, #symbol); \
123 f(_1, _2, _3, _4, _5, _6, _7); }
124
125#define IMPLEMENT_VOID_FUNCTION8(symbol, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
126 void symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4, arg5 _5, arg6 _6, arg7 _7, arg8 _8) \
127 { \
128 static void (*f)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) = NULL; \
129 DLSYM(&f, #symbol); \
130 f(_1, _2, _3, _4, _5, _6, _7, _8); }
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif // BRIDGE_DEFS_H_
0137
=== added file 'src/ubuntu/CMakeLists.txt'
--- src/ubuntu/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/ubuntu/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -0,0 +1,2 @@
1add_subdirectory(application)
2add_subdirectory(hardware)
03
=== added directory 'src/ubuntu/application'
=== renamed file 'src/ubuntu/CMakeLists.txt' => 'src/ubuntu/application/CMakeLists.txt'
--- src/ubuntu/CMakeLists.txt 2013-12-02 17:03:45 +0000
+++ src/ubuntu/application/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -1,29 +1,44 @@
1include_directories(
2 ${CMAKE_CURRENT_SOURCE_DIR}
3)
4
5add_subdirectory(application)
6add_subdirectory(testbackend)
7
8set(1set(
9 UBUNTU_APPLICATION_API_LINK_LIBRARIES2 UBUNTU_APPLICATION_API_LINK_LIBRARIES
10 3
4 ubuntu_application_sensors_haptic
11 ubuntu_application_location5 ubuntu_application_location
12 ubuntu_application_url_dispatcher6 ubuntu_application_url_dispatcher
13)7)
148
15if(ENABLE_HYBRIS_IMPLEMENTATION)9include_directories(
16 add_subdirectory(hybris/)10 ${CMAKE_BINARY_DIR}/include
17endif()11)
1812
19if(ENABLE_MIRSERVER_IMPLEMENTATION OR ENABLE_MIRCLIENT_IMPLEMENTATION)13include_directories(../../bridge)
20 add_subdirectory(mircommon/)14
21endif()15add_subdirectory(common)
2216add_subdirectory(desktop)
23if(ENABLE_MIRSERVER_IMPLEMENTATION)17add_subdirectory(touch)
24 add_subdirectory(mirserver/)18add_subdirectory(testbackend)
25endif()19
2620set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
27if(ENABLE_MIRCLIENT_IMPLEMENTATION)21
28 add_subdirectory(mirclient/)22add_library(
29endif()23 ubuntu_application_api SHARED
24
25 ubuntu_application_api.cpp
26)
27
28target_link_libraries(
29 ubuntu_application_api
30
31 dl
32)
33
34set_target_properties(
35 ubuntu_application_api
36 PROPERTIES
37 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
38 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
39)
40
41install(
42 TARGETS ubuntu_application_api
43 ${INSTALL_TARGETS_DEFAULT_ARGS}
44)
3045
=== added file 'src/ubuntu/application/base_module.h'
--- src/ubuntu/application/base_module.h 1970-01-01 00:00:00 +0000
+++ src/ubuntu/application/base_module.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,107 @@
1/*
2 * Copyright (C) 2012 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 Voss <thomas.voss@canonical.com>
17 * Ricardo Mendoza <ricardo.mendoza@canonical.com>
18 */
19#ifndef BASE_MODULE_H_
20#define BASE_MODULE_H_
21
22#include <bridge.h>
23#include <stdio.h>
24#include <unistd.h>
25
26/*
27 * This is the base backend loader for the Platform API
28 */
29
30#define API_VERSION_MAJOR "2"
31#define API_VERSION_MINOR "2"
32#define API_VERSION_PATCH "0"
33#define SO_SUFFIX ".so." API_VERSION_MAJOR "." API_VERSION_MINOR "." API_VERSION_PATCH
34
35namespace internal
36{
37/* Programs can select a backend with $UBUNTU_PLATFORM_API_BACKEND,
38 * which either needs to be a full path or just the file name (then it will be
39 * looked up in the usual library search path, see dlopen(3)).
40 */
41struct HIDDEN_SYMBOL ToBackend
42{
43 static const char* path()
44 {
45 static char* cache = NULL;
46 static char path[64];
47 char module_name[32];
48
49 if (cache == NULL) {
50 cache = secure_getenv("UBUNTU_PLATFORM_API_BACKEND");
51 if (cache == NULL) {
52 FILE *conf;
53 conf = fopen("/etc/ubuntu-platform-api/application.conf", "r");
54 if (conf == NULL) {
55 exit_module("Unable to find module configuration file");
56 } else {
57 if (fgets(module_name, 32, conf))
58 cache = module_name;
59 else
60 exit_module("Error reading module name from file");
61 }
62 // Null terminate module blob
63 cache[strlen(cache)-1] = '\0';
64 fclose(conf);
65 }
66 if (cache == NULL)
67 exit_module("Unable to determine backend");
68
69 strcpy(path, "libubuntu_application_api_");
70
71 if (strlen(cache) > MAX_MODULE_NAME)
72 exit_module("Selected module is invalid");
73
74 strcat(path, cache);
75 strcat(path, SO_SUFFIX);
76 }
77
78 return path;
79 }
80
81 static void exit_module(const char* msg)
82 {
83 printf("Ubuntu Platform API: %s -- Aborting\n", msg);
84 abort();
85 }
86
87 static void* dlopen_fn(const char* path, int flags)
88 {
89 void *handle = dlopen(path, flags);
90 if (handle == NULL)
91 exit_module("Unable to load selected module.");
92
93 return handle;
94 }
95
96 static void* dlsym_fn(void* handle, const char* symbol)
97 {
98 return dlsym(handle, symbol);
99 }
100};
101}
102
103#define DLSYM(fptr, sym) if (*(fptr) == NULL) { *((void**)fptr) = (void *) internal::Bridge<internal::ToBackend>::instance().resolve_symbol(sym); }
104
105#include <bridge_defs.h>
106
107#endif // BASE_MODULE_H_
0108
=== added directory 'src/ubuntu/application/common'
=== added file 'src/ubuntu/application/common/CMakeLists.txt'
--- src/ubuntu/application/common/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/ubuntu/application/common/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -0,0 +1,8 @@
1include_directories(
2 ${CMAKE_CURRENT_SOURCE_DIR}
3)
4
5add_subdirectory(application)
6add_subdirectory(mircommon)
7add_subdirectory(mirclient)
8add_subdirectory(mirserver)
09
=== renamed directory 'src/ubuntu/application' => 'src/ubuntu/application/common/application'
=== modified file 'src/ubuntu/application/common/application/CMakeLists.txt'
--- src/ubuntu/application/CMakeLists.txt 2013-08-22 10:54:28 +0000
+++ src/ubuntu/application/common/application/CMakeLists.txt 2014-08-26 16:06:15 +0000
@@ -1,2 +1,3 @@
1add_subdirectory(sensors)
1add_subdirectory(location)2add_subdirectory(location)
2add_subdirectory(url_dispatcher)3add_subdirectory(url_dispatcher)
34
=== modified file 'src/ubuntu/application/common/application/location/controller.cpp'
--- src/ubuntu/application/location/controller.cpp 2013-08-23 10:55:16 +0000
+++ src/ubuntu/application/common/application/location/controller.cpp 2014-08-26 16:06:15 +0000
@@ -19,6 +19,7 @@
19#include "ubuntu/application/location/controller.h"19#include "ubuntu/application/location/controller.h"
2020
21#include "controller_p.h"21#include "controller_p.h"
22#include "instance.h"
2223
23void24void
24ua_location_service_controller_ref(25ua_location_service_controller_ref(
@@ -41,8 +42,17 @@
41 void *context)42 void *context)
42{43{
43 (void) controller;44 (void) controller;
44 (void) handler;45
45 (void) context;46 try
47 {
48 Instance::instance().set_changed_handler_with_context(handler, context);
49 } catch(const std::exception& e)
50 {
51 std::cerr << "ua_location_service_controller_set_status_changed_handler: error accessing instance: " << e.what() << std::endl;
52 } catch(...)
53 {
54 std::cerr << "ua_location_service_controller_set_status_changed_handler: error accessing instance." << std::endl;
55 }
46}56}
4757
48UStatus58UStatus
@@ -51,9 +61,33 @@
51 UALocationServiceStatusFlags *out_flags)61 UALocationServiceStatusFlags *out_flags)
52{62{
53 (void) controller;63 (void) controller;
54 (void) out_flags;64
5565 *out_flags = 0;
56 return U_STATUS_SUCCESS;66
67 try
68 {
69 auto service = Instance::instance().get_service();
70
71 if (service->is_online().get())
72 *out_flags |= UA_LOCATION_SERVICE_ENABLED;
73 else
74 *out_flags |= UA_LOCATION_SERVICE_DISABLED;
75
76 if (service->does_satellite_based_positioning().get())
77 *out_flags |= UA_LOCATION_SERVICE_GPS_ENABLED;
78 else
79 *out_flags |= UA_LOCATION_SERVICE_GPS_DISABLED;
80
81 return U_STATUS_SUCCESS;
82 } catch(const std::exception& e)
83 {
84 std::cerr << "ua_location_service_controller_query_status: error accessing instance: " << e.what() << std::endl;
85 } catch(...)
86 {
87 std::cerr << "ua_location_service_controller_query_status: error accessing instance." << std::endl;
88 }
89
90 return U_STATUS_ERROR;
57}91}
5892
59UStatus93UStatus
@@ -62,7 +96,21 @@
62{96{
63 (void) controller;97 (void) controller;
6498
65 return U_STATUS_SUCCESS;99 try
100 {
101 auto service = Instance::instance().get_service();
102 service->is_online().set(true);
103
104 return U_STATUS_SUCCESS;
105 } catch(const std::exception& e)
106 {
107 std::cerr << "ua_location_service_controller_enable_service: error accessing instance: " << e.what() << std::endl;
108 } catch(...)
109 {
110 std::cerr << "ua_location_service_controller_enable_service: error accessing instance." << std::endl;
111 }
112
113 return U_STATUS_ERROR;
66}114}
67115
68UStatus116UStatus
@@ -70,8 +118,22 @@
70 UALocationServiceController *controller)118 UALocationServiceController *controller)
71{119{
72 (void) controller;120 (void) controller;
73 121
74 return U_STATUS_SUCCESS;122 try
123 {
124 auto service = Instance::instance().get_service();
125 service->is_online().set(false);
126
127 return U_STATUS_SUCCESS;
128 } catch(const std::exception& e)
129 {
130 std::cerr << "ua_location_service_controller_disable_service: error accessing instance: " << e.what() << std::endl;
131 } catch(...)
132 {
133 std::cerr << "ua_location_service_controller_disable_service: error accessing instance." << std::endl;
134 }
135
136 return U_STATUS_ERROR;
75}137}
76138
77UStatus139UStatus
@@ -80,7 +142,21 @@
80{142{
81 (void) controller;143 (void) controller;
82144
83 return U_STATUS_SUCCESS;145 try
146 {
147 auto service = Instance::instance().get_service();
148 service->does_satellite_based_positioning().set(true);
149
150 return U_STATUS_SUCCESS;
151 } catch(const std::exception& e)
152 {
153 std::cerr << "ua_location_service_controller_enable_gps: error accessing instance: " << e.what() << std::endl;
154 } catch(...)
155 {
156 std::cerr << "ua_location_service_controller_enable_gps: error accessing instance." << std::endl;
157 }
158
159 return U_STATUS_ERROR;
84}160}
85161
86UStatus162UStatus
@@ -89,5 +165,19 @@
89{165{
90 (void) controller;166 (void) controller;
91167
92 return U_STATUS_SUCCESS;168 try
169 {
170 auto service = Instance::instance().get_service();
171 service->does_satellite_based_positioning().set(false);
172
173 return U_STATUS_SUCCESS;
174 } catch(const std::exception& e)
175 {
176 std::cerr << "ua_location_service_controller_disable_gps: error accessing instance: " << e.what() << std::endl;
177 } catch(...)
178 {
179 std::cerr << "ua_location_service_controller_disable_gps: error accessing instance." << std::endl;
180 }
181
182 return U_STATUS_ERROR;
93}183}
94184
=== modified file 'src/ubuntu/application/common/application/location/controller_p.h'
--- src/ubuntu/application/location/controller_p.h 2013-08-21 14:59:45 +0000
+++ src/ubuntu/application/common/application/location/controller_p.h 2014-08-26 16:06:15 +0000
@@ -25,6 +25,7 @@
2525
26struct UbuntuApplicationLocationServiceController : public detail::RefCounted26struct UbuntuApplicationLocationServiceController : public detail::RefCounted
27{27{
28
28};29};
2930
30#endif // CONTROLLER_PRIVATE_H_31#endif // CONTROLLER_PRIVATE_H_
3132
=== modified file 'src/ubuntu/application/common/application/location/heading_update.cpp'
--- src/ubuntu/application/location/heading_update.cpp 2013-08-19 06:46:47 +0000
+++ src/ubuntu/application/common/application/location/heading_update.cpp 2014-08-26 16:06:15 +0000
@@ -51,5 +51,5 @@
51ua_location_heading_update_get_heading_in_degree(51ua_location_heading_update_get_heading_in_degree(
52 UALocationHeadingUpdate *update)52 UALocationHeadingUpdate *update)
53{53{
54 return update->update.value.value.value();54 return update->update.value.value();
55}55}
5656
=== added file 'src/ubuntu/application/common/application/location/instance.h'
--- src/ubuntu/application/common/application/location/instance.h 1970-01-01 00:00:00 +0000
+++ src/ubuntu/application/common/application/location/instance.h 2014-08-26 16:06:15 +0000
@@ -0,0 +1,143 @@
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 INSTANCE_H_
20#define INSTANCE_H_
21
22#include "ubuntu/visibility.h"
23
24#include "ubuntu/application/location/controller.h"
25
26#include <com/ubuntu/location/service/stub.h>
27
28#include <core/dbus/resolver.h>
29#include <core/dbus/asio/executor.h>
30
31#include <thread>
32
33class UBUNTU_DLL_LOCAL Instance
34{
35 public:
36 static Instance& instance()
37 {
38 static Instance inst;
39 return inst;
40 }
41
42 const com::ubuntu::location::service::Interface::Ptr& get_service() const
43 {
44 return service;
45 }
46
47 void set_changed_handler_with_context(
48 UALocationServiceStatusChangedHandler handler,
49 void* context)
50 {
51 changed_handler = handler;
52 changed_handler_context = context;
53 }
54
55 private:
56 Instance()
57 : bus(std::make_shared<core::dbus::Bus>(core::dbus::WellKnownBus::system)),
58 executor(core::dbus::asio::make_executor(bus)),
59 service(core::dbus::resolve_service_on_bus<
60 com::ubuntu::location::service::Interface,
61 com::ubuntu::location::service::Stub
62 >(bus)),
63 connections
64 {
65 service->does_satellite_based_positioning().changed().connect([this](bool value)
66 {
67 // Update our cached value.
68 if (value)
69 {
70 cached_state_flags |= UA_LOCATION_SERVICE_GPS_ENABLED;
71 cached_state_flags &= ~UA_LOCATION_SERVICE_GPS_DISABLED;
72 }
73 else
74 {
75 cached_state_flags |= UA_LOCATION_SERVICE_GPS_DISABLED;
76 cached_state_flags &= ~UA_LOCATION_SERVICE_GPS_ENABLED;
77 }
78
79 // And notify change handler if one is set.
80 if (changed_handler)
81 changed_handler(cached_state_flags, changed_handler_context);
82 }),
83 service->is_online().changed().connect([this](bool value)
84 {
85 // Update our cached value.
86 if (value)
87 {
88 cached_state_flags |= UA_LOCATION_SERVICE_ENABLED;
89 cached_state_flags &= ~UA_LOCATION_SERVICE_DISABLED;
90 }
91 else
92 {
93 cached_state_flags |= UA_LOCATION_SERVICE_DISABLED;
94 cached_state_flags &= ~UA_LOCATION_SERVICE_ENABLED;
95 }
96
97 // And notify change handler if one is set.
98 if (changed_handler)
99 changed_handler(cached_state_flags, changed_handler_context);
100 })
101 },
102 cached_state_flags{0},
103 changed_handler{nullptr},
104 changed_handler_context{nullptr}
105 {
106 bus->install_executor(executor);
107 worker = std::move(std::thread([&]() { bus->run(); }));
108 }
109
110 ~Instance() noexcept
111 {
112 try
113 {
114 bus->stop();
115
116 if (worker.joinable())
117 worker.join();
118 } catch(...)
119 {
120 // We silently ignore errors to fulfill our noexcept guarantee.
121 }
122 }
123
124 core::dbus::Bus::Ptr bus;
125 core::dbus::Executor::Ptr executor;
126 std::thread worker;
127
128 com::ubuntu::location::service::Interface::Ptr service;
129
130 // All event connections go here.
131 struct
132 {
133 core::ScopedConnection on_does_satellite_based_positioning_changed;
134 core::ScopedConnection on_is_online_changed;
135 } connections;
136
137 // All change-handler specifics go here.
138 UALocationServiceStatusFlags cached_state_flags;
139 UALocationServiceStatusChangedHandler changed_handler;
140 void* changed_handler_context;
141};
142
143#endif // INSTANCE_H_
0144
=== modified file 'src/ubuntu/application/common/application/location/position_update.cpp'
--- src/ubuntu/application/location/position_update.cpp 2013-08-19 06:46:47 +0000
+++ src/ubuntu/application/common/application/location/position_update.cpp 2014-08-26 16:06:15 +0000
@@ -51,26 +51,54 @@
51ua_location_position_update_get_latitude_in_degree(51ua_location_position_update_get_latitude_in_degree(
52 UALocationPositionUpdate *update)52 UALocationPositionUpdate *update)
53{53{
54 return update->update.value.latitude().value.value();54 return update->update.value.latitude.value.value();
55}55}
5656
57double57double
58ua_location_position_update_get_longitude_in_degree(58ua_location_position_update_get_longitude_in_degree(
59 UALocationPositionUpdate *update)59 UALocationPositionUpdate *update)
60{60{
61 return update->update.value.longitude().value.value();61 return update->update.value.longitude.value.value();
62}62}
6363
64bool64bool
65ua_location_position_update_has_altitude(65ua_location_position_update_has_altitude(
66 UALocationPositionUpdate *update)66 UALocationPositionUpdate *update)
67{67{
68 return update->update.value.has_altitude();68 return update->update.value.altitude;
69}69}
7070
71double71double
72ua_location_position_update_get_altitude_in_meter(72ua_location_position_update_get_altitude_in_meter(
73 UALocationPositionUpdate *update)73 UALocationPositionUpdate *update)
74{74{
75 return update->update.value.altitude().value.value();75 return update->update.value.altitude->value.value();
76}
77
78bool
79ua_location_position_update_has_horizontal_accuracy(
80 UALocationPositionUpdate *update)
81{
82 return update->update.value.accuracy.horizontal;
83}
84
85double
86ua_location_position_update_get_horizontal_accuracy_in_meter(
87 UALocationPositionUpdate *update)
88{
89 return update->update.value.accuracy.horizontal->value();
90}
91
92bool
93ua_location_position_update_has_vertical_accuracy(
94 UALocationPositionUpdate *update)
95{
96 return update->update.value.accuracy.vertical;
97}
98
99double
100ua_location_position_update_get_vertical_accuracy_in_meter(
101 UALocationPositionUpdate *update)
102{
103 return update->update.value.accuracy.vertical->value();
76}104}
77105
=== modified file 'src/ubuntu/application/common/application/location/ref_counted.h'
--- src/ubuntu/application/location/ref_counted.h 2013-08-19 06:47:19 +0000
+++ src/ubuntu/application/common/application/location/ref_counted.h 2014-08-26 16:06:15 +0000
@@ -32,7 +32,7 @@
32 bool operator==(const RefCounted&) const = delete;32 bool operator==(const RefCounted&) const = delete;
3333
34 void ref() { counter.fetch_add(1); }34 void ref() { counter.fetch_add(1); }
35 void unref() { if (0 == counter.fetch_sub(1)) { delete this; } }35 void unref() { if (1 == counter.fetch_sub(1)) { delete this; } }
3636
37 protected:37 protected:
38 RefCounted() : counter(1)38 RefCounted() : counter(1)
3939
=== modified file 'src/ubuntu/application/common/application/location/service.cpp'
--- src/ubuntu/application/location/service.cpp 2014-01-31 13:35:28 +0000
+++ src/ubuntu/application/common/application/location/service.cpp 2014-08-26 16:06:15 +0000
@@ -19,6 +19,7 @@
19#include "ubuntu/application/location/service.h"19#include "ubuntu/application/location/service.h"
2020
21#include "controller_p.h"21#include "controller_p.h"
22#include "instance.h"
22#include "session_p.h"23#include "session_p.h"
2324
24#include <com/ubuntu/location/service/stub.h>25#include <com/ubuntu/location/service/stub.h>
@@ -30,59 +31,58 @@
30namespace cul = com::ubuntu::location;31namespace cul = com::ubuntu::location;
31namespace culs = com::ubuntu::location::service;32namespace culs = com::ubuntu::location::service;
3233
33namespace
34{
35class Instance
36{
37 public:
38 static Instance& instance()
39 {
40 static Instance inst;
41 return inst;
42 }
43
44 const culs::Interface::Ptr& get_service() const
45 {
46 return service;
47 }
48
49 private:
50 Instance() : bus(std::make_shared<dbus::Bus>(dbus::WellKnownBus::system)),
51 executor(dbus::asio::make_executor(bus)),
52 service(dbus::resolve_service_on_bus<culs::Interface, culs::Stub>(bus))
53 {
54 bus->install_executor(executor);
55 worker = std::move(std::thread([&]() { bus->run(); }));
56 }
57
58 ~Instance() noexcept
59 {
60 if (worker.joinable())
61 worker.join();
62 }
63
64 dbus::Bus::Ptr bus;
65 dbus::Executor::Ptr executor;
66 culs::Interface::Ptr service;
67 std::thread worker;
68};
69
70}
71
72UALocationServiceSession*34UALocationServiceSession*
73ua_location_service_create_session_for_low_accuracy(35ua_location_service_create_session_for_low_accuracy(
74 UALocationServiceRequirementsFlags /*flags*/)36 UALocationServiceRequirementsFlags /*flags*/)
75{37{
76 return new UbuntuApplicationLocationServiceSession{38 // Creating the instance might fail for a number of reason and
77 Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})};39 // we cannot allow exceptions to propagate to prevent applications
40 // from aborting. For that, we catch all exceptions, provide some error
41 // information to std::cerr and return a nullptr in case of errors.
42 try
43 {
44 return new UbuntuApplicationLocationServiceSession
45 {
46 // Creating the instance might fail for a number of reasons.
47
48 Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})
49 };
50 } catch(const std::exception& e)
51 {
52 std::cerr << "ua_location_service_create_session_for_low_accuracy: Error creating instance: " << e.what() << std::endl;
53 } catch(...)
54 {
55 std::cerr << "ua_location_service_create_session_for_low_accuracy: Error creating instance." << std::endl;
56 }
57
58 return nullptr;
78}59}
7960
80UALocationServiceSession*61UALocationServiceSession*
81ua_location_service_create_session_for_high_accuracy(62ua_location_service_create_session_for_high_accuracy(
82 UALocationServiceRequirementsFlags /*flags*/)63 UALocationServiceRequirementsFlags /*flags*/)
83{64{
84 return new UbuntuApplicationLocationServiceSession{65 // Creating the instance might fail for a number of reason and
85 Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})};66 // we cannot allow exceptions to propagate to prevent applications
67 // from aborting. For that, we catch all exceptions, provide some error
68 // information to std::cerr and return a nullptr in case of errors.
69 try
70 {
71 return new UbuntuApplicationLocationServiceSession
72 {
73 // Creating the instance might fail for a number of reasons.
74
75 Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})
76 };
77 } catch(const std::exception& e)
78 {
79 std::cerr << "ua_location_service_create_session_for_high_accuracy: Error creating instance: " << e.what() << std::endl;
80 } catch(...)
81 {
82 std::cerr << "ua_location_service_create_session_for_high_accuracy: Error creating instance." << std::endl;
83 }
84
85 return nullptr;
86}86}
8787
88UALocationServiceController*88UALocationServiceController*
8989
=== modified file 'src/ubuntu/application/common/application/location/session.cpp'
--- src/ubuntu/application/location/session.cpp 2013-08-19 06:46:47 +0000
+++ src/ubuntu/application/common/application/location/session.cpp 2014-08-26 16:06:15 +0000
@@ -24,10 +24,15 @@
24#include "position_update_p.h"24#include "position_update_p.h"
25#include "velocity_update_p.h"25#include "velocity_update_p.h"
2626
27namespace location = com::ubuntu::location;
28
27void29void
28ua_location_service_session_ref(30ua_location_service_session_ref(
29 UALocationServiceSession *session)31 UALocationServiceSession *session)
30{32{
33 if (not session)
34 return;
35
31 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);36 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
32 s->ref();37 s->ref();
33}38}
@@ -36,6 +41,9 @@
36ua_location_service_session_unref(41ua_location_service_session_unref(
37 UALocationServiceSession *session)42 UALocationServiceSession *session)
38{43{
44 if (not session)
45 return;
46
39 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);47 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
40 s->unref();48 s->unref();
41}49}
@@ -46,13 +54,23 @@
46 UALocationServiceSessionPositionUpdatesHandler handler,54 UALocationServiceSessionPositionUpdatesHandler handler,
47 void *context)55 void *context)
48{56{
57 if (not session)
58 return;
59
49 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);60 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
50 s->session->install_position_updates_handler(61
51 [handler, context](const com::ubuntu::location::Update<com::ubuntu::location::Position>& new_position)62 try
52 {63 {
53 UbuntuApplicationLocationPositionUpdate pu{new_position};64 std::lock_guard<std::mutex> lg(s->position_updates.guard);
54 handler(std::addressof(pu), context);65 s->position_updates.handler = handler;
55 });66 s->position_updates.context = context;
67 } catch(const std::exception& e)
68 {
69 fprintf(stderr, "Error setting up position updates handler: %s \n", e.what());
70 } catch(...)
71 {
72 fprintf(stderr, "Error setting up position updates handler.\n");
73 }
56}74}
5775
58void76void
@@ -61,13 +79,23 @@
61 UALocationServiceSessionHeadingUpdatesHandler handler,79 UALocationServiceSessionHeadingUpdatesHandler handler,
62 void *context)80 void *context)
63{81{
82 if (not session)
83 return;
84
64 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);85 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
65 s->session->install_heading_updates_handler(86
66 [handler, context](const com::ubuntu::location::Update<com::ubuntu::location::Heading>& new_heading) 87 try
67 {88 {
68 UbuntuApplicationLocationHeadingUpdate hu{new_heading};89 std::lock_guard<std::mutex> lg(s->heading_updates.guard);
69 handler(std::addressof(hu), context);90 s->heading_updates.handler = handler;
70 });91 s->heading_updates.context = context;
92 } catch(const std::exception& e)
93 {
94 fprintf(stderr, "Error setting up heading updates handler: %s \n", e.what());
95 } catch(...)
96 {
97 fprintf(stderr, "Error setting up heading updates handler. \n");
98 }
71}99}
72100
73void101void
@@ -76,26 +104,38 @@
76 UALocationServiceSessionVelocityUpdatesHandler handler,104 UALocationServiceSessionVelocityUpdatesHandler handler,
77 void *context)105 void *context)
78{106{
107 if (not session)
108 return;
109
79 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);110 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
80 s->session->install_velocity_updates_handler(111
81 [handler, context](const com::ubuntu::location::Update<com::ubuntu::location::Velocity>& new_velocity) 112 try
82 {113 {
83 UbuntuApplicationLocationVelocityUpdate vu{new_velocity};114 std::lock_guard<std::mutex> lg(s->velocity_updates.guard);
84 handler(std::addressof(vu), context);115 s->velocity_updates.handler = handler;
85 });116 s->velocity_updates.context = context;
117 } catch(const std::exception& e)
118 {
119 fprintf(stderr, "Error setting up velocity updates handler: %s \n", e.what());
120 } catch(...)
121 {
122 fprintf(stderr, "Error setting up velocity updates handler.");
123 }
86}124}
87125
88UStatus126UStatus
89ua_location_service_session_start_position_updates(127ua_location_service_session_start_position_updates(
90 UALocationServiceSession *session)128 UALocationServiceSession *session)
91{129{
130 if (not session)
131 return U_STATUS_ERROR;
132
92 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);133 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
93 if (!s)
94 return U_STATUS_ERROR;
95134
96 try135 try
97 {136 {
98 s->session->start_position_updates();137 s->session->updates().position_status.set(
138 location::service::session::Interface::Updates::Status::enabled);
99 } catch(...)139 } catch(...)
100 {140 {
101 return U_STATUS_ERROR;141 return U_STATUS_ERROR;
@@ -108,13 +148,15 @@
108ua_location_service_session_stop_position_updates(148ua_location_service_session_stop_position_updates(
109 UALocationServiceSession *session)149 UALocationServiceSession *session)
110{150{
151 if (not session)
152 return;
153
111 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);154 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
112 if (!s)
113 return;
114155
115 try156 try
116 {157 {
117 s->session->stop_position_updates();158 s->session->updates().position_status.set(
159 location::service::session::Interface::Updates::Status::disabled);
118 } catch(...)160 } catch(...)
119 {161 {
120 } 162 }
@@ -124,13 +166,15 @@
124ua_location_service_session_start_heading_updates(166ua_location_service_session_start_heading_updates(
125 UALocationServiceSession *session)167 UALocationServiceSession *session)
126{168{
169 if (not session)
170 return U_STATUS_ERROR;
171
127 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);172 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
128 if (!s)
129 return U_STATUS_ERROR;
130173
131 try174 try
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: