Merge lp:~ricmm/platform-api/v2-loader-first-take into lp:platform-api

Proposed by Ricardo Mendoza
Status: Superseded
Proposed branch: lp:~ricmm/platform-api/v2-loader-first-take
Merge into: lp:platform-api
Diff against target: 3039 lines (+1239/-865) (has conflicts)
51 files modified
CMakeLists.txt (+12/-30)
android/default/default_ubuntu_application_sensor.cpp (+109/-58)
android/hybris/Android.mk (+24/-2)
android/hybris/test_alarms_api.cpp (+62/-0)
android/hybris/test_sensors_c_api.cpp (+8/-4)
android/hybris/ubuntu_hardware_alarms_for_hybris.cpp (+197/-0)
data/CMakeLists.txt (+6/-2)
data/ubuntu-platform-hardware-api.pc.in (+10/-0)
debian/control (+24/-45)
debian/libplatform-api1-dev.install (+0/-4)
debian/libplatform-api1-doc.doc-base (+0/-8)
debian/libplatform-api1-doc.install (+0/-1)
debian/libplatform-api1-hybris-tests.install (+0/-6)
debian/libplatform-hardware-api1-dev.install (+1/-1)
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-api-test1.docs (+0/-1)
debian/libubuntu-application-api-test1.install (+0/-1)
debian/libubuntu-application-api1.install (+0/-1)
debian/libubuntu-application-api1.symbols (+0/-130)
debian/rules (+1/-4)
doc/Doxyfile.in (+1/-1)
include/ubuntu/application/sensors/accelerometer.h (+9/-6)
include/ubuntu/application/sensors/event/accelerometer.h (+9/-6)
include/ubuntu/application/sensors/event/light.h (+3/-2)
include/ubuntu/application/sensors/light.h (+9/-6)
include/ubuntu/application/sensors/proximity.h (+9/-6)
include/ubuntu/application/sensors/ubuntu_application_sensors.h (+6/-3)
include/ubuntu/hardware/CMakeLists.txt (+2/-1)
include/ubuntu/hardware/alarm.h (+98/-0)
src/ubuntu/CMakeLists.txt (+39/-22)
src/ubuntu/common/CMakeLists.txt (+8/-0)
src/ubuntu/common/mirclient/CMakeLists.txt (+10/-16)
src/ubuntu/common/mirclient/ubuntu_application_api_mirclient.cpp (+9/-0)
src/ubuntu/common/mircommon/CMakeLists.txt (+0/-14)
src/ubuntu/common/mircommon/ubuntu_application_sensors_desktop.cpp (+119/-54)
src/ubuntu/common/mirserver/CMakeLists.txt (+12/-19)
src/ubuntu/common/mirserver/ubuntu_application_api_mirserver.cpp (+12/-3)
src/ubuntu/desktop/CMakeLists.txt (+62/-0)
src/ubuntu/testbackend/ubuntu_application_sensors.cpp (+119/-67)
src/ubuntu/touch/CMakeLists.txt (+64/-0)
src/ubuntu/touch/hybris/CMakeLists.txt (+15/-30)
src/ubuntu/touch/hybris/bridge.h (+1/-17)
src/ubuntu/touch/hybris/tests/CMakeLists.txt (+4/-4)
src/ubuntu/touch/hybris/tests/test_alarms_api.cpp (+62/-0)
src/ubuntu/touch/hybris/tests/test_sensors_api.cpp (+10/-4)
src/ubuntu/touch/hybris/ubuntu_application_sensors_hybris.cpp (+13/-13)
src/ubuntu/touch/hybris/ubuntu_platform_hardware_api.cpp (+35/-0)
tests/test_ubuntu_application_sensors.cpp (+45/-17)
Text conflict in src/ubuntu/common/mirserver/ubuntu_application_api_mirserver.cpp
To merge this branch: bzr merge lp:~ricmm/platform-api/v2-loader-first-take
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+218057@code.launchpad.net

Commit message

V2 - loadable backend architecture

To post a comment you must log in.

Unmerged revisions

214. By Ricardo Mendoza

API/ABI bump to ver2
 * Loadable backend architecture
 * Global test separation
 * Groundwork for platform hardware API v2

213. By Ricardo Mendoza

Merge lp:~thomas-voss/platform-api/hw-alarms-api

212. By Ricardo Mendoza

lp:~phablet-team/platform-api/to-gcc-4.8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-03-31 17:59:47 +0000
+++ CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -2,7 +2,7 @@
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 0)6set(UBUNTU_PLATFORM_API_VERSION_MINOR 0)
7set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)7set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)
88
@@ -57,37 +57,19 @@
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"62
63 OFF63find_package(PkgConfig)
64)64pkg_check_modules(MIRCLIENT REQUIRED mirclient)
6565
66if(ENABLE_MIRSERVER_IMPLEMENTATION)66find_package(Protobuf REQUIRED)
67 find_package(PkgConfig)67if(PROTOBUF_PROTOC_EXECUTABLE STREQUAL "PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND")
68 pkg_check_modules(MIRSERVER REQUIRED mirserver)68 message(SEND_ERROR "protoc executable not found! Missing protobuf-compiler package?")
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()69endif()
9070
71pkg_check_modules(MIRCOMMON REQUIRED mircommon)
72
91# Try to find hybris, and disable hybris from build if not found73# Try to find hybris, and disable hybris from build if not found
92find_library(Hybris74find_library(Hybris
93 NAMES hybris-common75 NAMES hybris-common
9476
=== modified file 'android/default/default_ubuntu_application_sensor.cpp'
--- android/default/default_ubuntu_application_sensor.cpp 2013-06-28 20:13:22 +0000
+++ android/default/default_ubuntu_application_sensor.cpp 2014-05-02 12:23:55 +0000
@@ -199,40 +199,49 @@
199 return toHz(s->min_delay());199 return toHz(s->min_delay());
200}200}
201201
202float202UStatus
203ua_sensors_proximity_get_min_value(203ua_sensors_proximity_get_min_value(
204 UASensorsProximity* sensor)204 UASensorsProximity* sensor,
205 float* value)
205{206{
206 if (sensor == NULL)207 if (sensor == NULL || value == NULL)
207 return -1;208 return U_STATUS_ERROR;
208209
209 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);210 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
210 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);211 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
211 return s->min_value();212 *value = s->min_value();
213
214 return U_STATUS_SUCCESS;
212}215}
213216
214float217UStatus
215ua_sensors_proximity_get_max_value(218ua_sensors_proximity_get_max_value(
216 UASensorsProximity* sensor)219 UASensorsProximity* sensor,
220 float* value)
217{221{
218 if (sensor == NULL)222 if (sensor == NULL || value == NULL)
219 return -1;223 return U_STATUS_ERROR;
220224
221 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);225 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
222 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);226 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
223 return s->max_value();227 *value = s->max_value();
228
229 return U_STATUS_SUCCESS;
224}230}
225231
226float232UStatus
227ua_sensors_proximity_get_resolution(233ua_sensors_proximity_get_resolution(
228 UASensorsProximity* sensor)234 UASensorsProximity* sensor,
235 float* value)
229{236{
230 if (sensor == NULL)237 if (sensor == NULL || value == NULL)
231 return -1;238 return U_STATUS_ERROR;
232239
233 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);240 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
234 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);241 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
235 return s->resolution();242 *value = s->resolution();
243
244 return U_STATUS_SUCCESS;
236}245}
237246
238void247void
@@ -334,40 +343,49 @@
334 return toHz(s->min_delay());343 return toHz(s->min_delay());
335}344}
336345
337float346UStatus
338ua_sensors_light_get_min_value(347ua_sensors_light_get_min_value(
339 UASensorsLight* sensor)348 UASensorsLight* sensor,
349 float* value)
340{350{
341 if (sensor == NULL)351 if (sensor == NULL || value == NULL)
342 return -1;352 return U_STATUS_ERROR;
343353
344 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);354 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
345 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);355 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
346 return s->min_value();356 *value = s->min_value();
357
358 return U_STATUS_SUCCESS;
347}359}
348360
349float361UStatus
350ua_sensors_light_get_max_value(362ua_sensors_light_get_max_value(
351 UASensorsLight* sensor)363 UASensorsLight* sensor,
364 float* value)
352{365{
353 if (sensor == NULL)366 if (sensor == NULL || value == NULL)
354 return -1;367 return U_STATUS_ERROR;
355368
356 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);369 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
357 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);370 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
358 return s->max_value();371 *value = s->max_value();
372
373 return U_STATUS_SUCCESS;
359}374}
360375
361float376UStatus
362ua_sensors_light_get_resolution(377ua_sensors_light_get_resolution(
363 UASensorsLight* sensor)378 UASensorsLight* sensor,
379 float* value)
364{380{
365 if (sensor == NULL)381 if (sensor == NULL || value == NULL)
366 return -1;382 return U_STATUS_ERROR;
367383
368 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);384 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
369 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);385 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
370 return s->resolution();386 *value = s->resolution();
387
388 return U_STATUS_SUCCESS;
371}389}
372390
373void391void
@@ -400,12 +418,18 @@
400 return ev->value->get_timestamp();418 return ev->value->get_timestamp();
401}419}
402420
403float421UStatus
404uas_light_event_get_light(422uas_light_event_get_light(
405 UASLightEvent* event)423 UASLightEvent* event,
424 float* value)
406{425{
426 if (event == NULL || value == NULL)
427 return U_STATUS_ERROR;
428
407 auto ev = static_cast<Holder<ubuntu::application::sensors::LightEvent::Ptr>*>(event);429 auto ev = static_cast<Holder<ubuntu::application::sensors::LightEvent::Ptr>*>(event);
408 return ev->value->get_light();430 *value = ev->value->get_light();
431
432 return U_STATUS_SUCCESS;
409}433}
410434
411/*435/*
@@ -464,40 +488,49 @@
464 return toHz(s->min_delay());488 return toHz(s->min_delay());
465}489}
466490
467float491UStatus
468ua_sensors_accelerometer_get_min_value(492ua_sensors_accelerometer_get_min_value(
469 UASensorsAccelerometer* sensor)493 UASensorsAccelerometer* sensor,
494 float* value)
470{495{
471 if (sensor == NULL)496 if (sensor == NULL || value == NULL)
472 return -1;497 return U_STATUS_ERROR;
473498
474 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);499 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
475 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);500 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
476 return s->min_value();501 *value = s->min_value();
502
503 return U_STATUS_SUCCESS;
477}504}
478505
479float506UStatus
480ua_sensors_accelerometer_get_max_value(507ua_sensors_accelerometer_get_max_value(
481 UASensorsAccelerometer* sensor)508 UASensorsAccelerometer* sensor,
509 float* value)
482{510{
483 if (sensor == NULL)511 if (sensor == NULL || value == NULL)
484 return -1;512 return U_STATUS_ERROR;
485513
486 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);514 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
487 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);515 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
488 return s->max_value();516 *value = s->max_value();
517
518 return U_STATUS_SUCCESS;
489}519}
490520
491float521UStatus
492ua_sensors_accelerometer_get_resolution(522ua_sensors_accelerometer_get_resolution(
493 UASensorsAccelerometer* sensor)523 UASensorsAccelerometer* sensor,
524 float* value)
494{525{
495 if (sensor == NULL)526 if (sensor == NULL || value == NULL)
496 return -1;527 return U_STATUS_ERROR;
497528
498 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);529 ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
499 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);530 auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
500 return s->resolution();531 *value = s->resolution();
532
533 return U_STATUS_SUCCESS;
501}534}
502535
503void536void
@@ -529,26 +562,44 @@
529 return ev->value->get_timestamp();562 return ev->value->get_timestamp();
530}563}
531564
532float565UStatus
533uas_accelerometer_event_get_acceleration_x(566uas_accelerometer_event_get_acceleration_x(
534 UASAccelerometerEvent* event)567 UASAccelerometerEvent* event,
568 float* value)
535{569{
570 if (event == NULL || value == NULL)
571 return U_STATUS_ERROR;
572
536 auto ev = static_cast<Holder<ubuntu::application::sensors::AccelerometerEvent::Ptr>*>(event);573 auto ev = static_cast<Holder<ubuntu::application::sensors::AccelerometerEvent::Ptr>*>(event);
537 return ev->value->get_x();574 *value = ev->value->get_x();
575
576 return U_STATUS_SUCCESS;
538}577}
539578
540float579UStatus
541uas_accelerometer_event_get_acceleration_y(580uas_accelerometer_event_get_acceleration_y(
542 UASAccelerometerEvent* event)581 UASAccelerometerEvent* event,
582 float* value)
543{583{
584 if (event == NULL || value == NULL)
585 return U_STATUS_ERROR;
586
544 auto ev = static_cast<Holder<ubuntu::application::sensors::AccelerometerEvent::Ptr>*>(event);587 auto ev = static_cast<Holder<ubuntu::application::sensors::AccelerometerEvent::Ptr>*>(event);
545 return ev->value->get_y();588 *value = ev->value->get_y();
589
590 return U_STATUS_SUCCESS;
546}591}
547592
548float593UStatus
549uas_accelerometer_event_get_acceleration_z(594uas_accelerometer_event_get_acceleration_z(
550 UASAccelerometerEvent* event)595 UASAccelerometerEvent* event,
596 float* value)
551{597{
598 if (event == NULL || value == NULL)
599 return U_STATUS_ERROR;
600
552 auto ev = static_cast<Holder<ubuntu::application::sensors::AccelerometerEvent::Ptr>*>(event);601 auto ev = static_cast<Holder<ubuntu::application::sensors::AccelerometerEvent::Ptr>*>(event);
553 return ev->value->get_z();602 *value = ev->value->get_z();
603
604 return U_STATUS_SUCCESS;
554}605}
555606
=== modified file 'android/hybris/Android.mk'
--- android/hybris/Android.mk 2014-01-22 05:28:18 +0000
+++ android/hybris/Android.mk 2014-05-02 12:23:55 +0000
@@ -25,6 +25,7 @@
25 ubuntu_application_api_for_hybris.cpp \25 ubuntu_application_api_for_hybris.cpp \
26 ubuntu_application_gps_for_hybris.cpp \26 ubuntu_application_gps_for_hybris.cpp \
27 ubuntu_application_sensors_for_hybris.cpp \27 ubuntu_application_sensors_for_hybris.cpp \
28 ubuntu_hardware_alarms_for_hybris.cpp \
28 ../default/default_ubuntu_application_sensor.cpp \29 ../default/default_ubuntu_application_sensor.cpp \
29 ../default/default_ubuntu_application_ui.cpp \30 ../default/default_ubuntu_application_ui.cpp \
30 ../default/default_ubuntu_application.cpp \31 ../default/default_ubuntu_application.cpp \
@@ -65,8 +66,6 @@
65LOCAL_SHARED_LIBRARIES := \66LOCAL_SHARED_LIBRARIES := \
66 libandroidfw \67 libandroidfw \
67 libutils \68 libutils \
68 libEGL \
69 libGLESv2 \
70 libubuntu_application_api69 libubuntu_application_api
7170
72include $(BUILD_EXECUTABLE)71include $(BUILD_EXECUTABLE)
@@ -211,6 +210,29 @@
211210
212include $(CLEAR_VARS)211include $(CLEAR_VARS)
213212
213LOCAL_CFLAGS += -std=gnu++0x
214
215LOCAL_C_INCLUDES := \
216 $(UPAPI_PATH)/include \
217 $(UPAPI_PATH)/android/include
218
219LOCAL_SRC_FILES:= \
220 test_alarms_api.cpp \
221
222LOCAL_MODULE:= direct_ubuntu_hardware_alarm_api_test
223LOCAL_MODULE_TAGS := optional
224
225LOCAL_SHARED_LIBRARIES := \
226 libandroidfw \
227 libutils \
228 libEGL \
229 libGLESv2 \
230 libubuntu_application_api
231
232include $(BUILD_EXECUTABLE)
233
234include $(CLEAR_VARS)
235
214LOCAL_CFLAGS += \236LOCAL_CFLAGS += \
215 -DANDROID_VERSION_MAJOR=$(ANDROID_VERSION_MAJOR) \237 -DANDROID_VERSION_MAJOR=$(ANDROID_VERSION_MAJOR) \
216 -DANDROID_VERSION_MINOR=$(ANDROID_VERSION_MINOR) \238 -DANDROID_VERSION_MINOR=$(ANDROID_VERSION_MINOR) \
217239
=== added file 'android/hybris/test_alarms_api.cpp'
--- android/hybris/test_alarms_api.cpp 1970-01-01 00:00:00 +0000
+++ android/hybris/test_alarms_api.cpp 2014-05-02 12:23:55 +0000
@@ -0,0 +1,62 @@
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 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 General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Thomas Voß <thomas.voss@canonicalcom>
17 */
18
19#include <ubuntu/hardware/alarm.h>
20
21#include <cstdio>
22#include <ctime>
23
24int main(int argc, char** argv)
25{
26 UHardwareAlarm alarm = u_hardware_alarm_create();
27
28 if (!alarm)
29 {
30 printf("Error creating handle to hardware alarms.\n");
31 return 1;
32 }
33
34 // Alarm in two seconds.
35 timespec ts { 2, 0 };
36
37
38 UStatus rc = u_hardware_alarm_set_relative_to_with_behavior(
39 alarm,
40 U_HARDWARE_ALARM_TIME_REFERENCE_NOW,
41 U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE,
42 &ts);
43
44 if (rc != U_STATUS_SUCCESS)
45 {
46 printf("Problem setting hardware alarm.\n");
47 return 1;
48 }
49
50 UHardwareAlarmWaitResult wait_result;
51 rc = u_hardware_alarm_wait_for_next_alarm(alarm, &wait_result);
52
53 if (rc != U_STATUS_SUCCESS)
54 {
55 printf("Problem waiting for hardware alarm to go off.\n");
56 return 1;
57 }
58
59 printf("Successfully created and waited for a hw alarm.\n");
60
61 return 0;
62}
063
=== modified file 'android/hybris/test_sensors_c_api.cpp'
--- android/hybris/test_sensors_c_api.cpp 2013-05-30 02:03:42 +0000
+++ android/hybris/test_sensors_c_api.cpp 2014-05-02 12:23:55 +0000
@@ -27,10 +27,13 @@
27void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)27void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)
28{28{
29 printf("%s \n", __PRETTY_FUNCTION__);29 printf("%s \n", __PRETTY_FUNCTION__);
30 float x; uas_accelerometer_event_get_acceleration_x(event, &x);
31 float y; uas_accelerometer_event_get_acceleration_x(event, &y);
32 float z; uas_accelerometer_event_get_acceleration_x(event, &z);
30 printf("\ttime: %llu\n", uas_accelerometer_event_get_timestamp(event));33 printf("\ttime: %llu\n", uas_accelerometer_event_get_timestamp(event));
31 printf("\tx: %f\n", uas_accelerometer_event_get_acceleration_x(event));34 printf("\tx: %f\n", x);
32 printf("\ty: %f\n", uas_accelerometer_event_get_acceleration_y(event));35 printf("\ty: %f\n", y);
33 printf("\tz: %f\n", uas_accelerometer_event_get_acceleration_z(event));36 printf("\tz: %f\n", z);
34}37}
3538
36void on_new_proximity_event(UASProximityEvent* event, void* context)39void on_new_proximity_event(UASProximityEvent* event, void* context)
@@ -57,7 +60,8 @@
57{60{
58 printf("%s \n", __PRETTY_FUNCTION__);61 printf("%s \n", __PRETTY_FUNCTION__);
59 printf("\ttime: %llu\n", uas_light_event_get_timestamp(event));62 printf("\ttime: %llu\n", uas_light_event_get_timestamp(event));
60 printf("\tlight: %f\n", uas_light_event_get_light(event));63 float light; uas_light_event_get_light(event, &light);
64 printf("\tlight: %f\n", light);
61}65}
6266
63int main(int argc, char** argv)67int main(int argc, char** argv)
6468
=== added file 'android/hybris/ubuntu_hardware_alarms_for_hybris.cpp'
--- android/hybris/ubuntu_hardware_alarms_for_hybris.cpp 1970-01-01 00:00:00 +0000
+++ android/hybris/ubuntu_hardware_alarms_for_hybris.cpp 2014-05-02 12:23:55 +0000
@@ -0,0 +1,197 @@
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#include <ubuntu/hardware/alarm.h>
20
21#include <cstdio>
22#include <cstdlib>
23#include <string.h>
24
25#include <errno.h>
26#include <fcntl.h>
27
28#include <linux/ioctl.h>
29#include <linux/android_alarm.h>
30
31#include <utils/Log.h>
32
33class UbuntuHardwareAlarm
34{
35 public:
36 static UbuntuHardwareAlarm& instance()
37 {
38 static UbuntuHardwareAlarm ha;
39 return ha;
40 }
41
42 int wait_for()
43 {
44 int result{-1};
45
46 do
47 {
48 result = ::ioctl(fd, ANDROID_ALARM_WAIT);
49 } while (result < 0 && errno == EINTR);
50
51 if (result < 0)
52 ALOGE("Waiting for hw alarm failed with: %s", strerror(errno));
53
54 return result;
55 }
56
57 bool set(UHardwareAlarmTimeReference time_reference,
58 UHardwareAlarmSleepBehavior behavior,
59 const struct timespec *ts)
60 {
61 int type = 0;
62
63 if (time_reference == U_HARDWARE_ALARM_TIME_REFERENCE_NOW)
64 switch(behavior)
65 {
66 case U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE:
67 type = ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK;
68 break;
69 case U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP:
70 type = ANDROID_ALARM_ELAPSED_REALTIME_MASK;
71 break;
72 }
73 else if (time_reference == U_HARDWARE_ALARM_TIME_REFERENCE_BOOT)
74 switch(behavior)
75 {
76 case U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE:
77 type = ANDROID_ALARM_RTC_WAKEUP_MASK;
78 break;
79 case U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP:
80 type = ANDROID_ALARM_RTC_MASK;
81 break;
82 }
83
84 int result = ::ioctl(fd, ANDROID_ALARM_SET(type), ts);
85
86 if (result < 0)
87 ALOGE("Unable to set alarm: %s", strerror(errno));
88
89 return not (result < 0);
90 }
91
92 bool is_valid() const
93 {
94 return valid;
95 }
96
97 private:
98 UbuntuHardwareAlarm() : fd(open("/dev/alarm", O_RDWR)),
99 valid(true)
100 {
101 if (fd == -1)
102 {
103 ALOGE("Could not open /dev/alarm: %s", strerror(errno));
104 valid = false;
105 }
106 }
107
108 ~UbuntuHardwareAlarm()
109 {
110 // No need to check if fd is valid here.
111 // Ctor would have thrown if fd was invalid.
112 ::close(fd);
113 }
114
115 int fd;
116 bool valid;
117};
118
119UHardwareAlarm
120u_hardware_alarm_create()
121{
122 auto result = &UbuntuHardwareAlarm::instance();
123
124 if (result)
125 if (result->is_valid())
126 return result;
127
128 return NULL;
129}
130
131void
132u_hardware_alarm_ref(
133 UHardwareAlarm alarm)
134{
135 // Considering a singleton pattern here, just voiding the argument.
136 (void) alarm;
137}
138
139void
140u_hardware_alarm_unref(
141 UHardwareAlarm alarm)
142{
143 // Considering a singleton pattern here, just voiding the argument.
144 (void) alarm;
145}
146
147UStatus
148u_hardware_alarm_set_timezone(
149 UHardwareAlarm alarm,
150 const struct timezone *tz)
151{
152 int result = settimeofday(NULL, tz);
153
154 if (result < 0)
155 return U_STATUS_ERROR;
156
157 return U_STATUS_SUCCESS;
158}
159
160UStatus
161u_hardware_alarm_set_relative_to_with_behavior(
162 UHardwareAlarm alarm,
163 UHardwareAlarmTimeReference time_reference,
164 UHardwareAlarmSleepBehavior behavior,
165 const struct timespec *ts)
166{
167 return alarm->set(time_reference, behavior, ts) ?
168 U_STATUS_SUCCESS :
169 U_STATUS_ERROR;
170
171}
172
173UStatus
174u_hardware_alarm_wait_for_next_alarm(
175 UHardwareAlarm alarm,
176 UHardwareAlarmWaitResult *result)
177{
178 int rc = alarm->wait_for();
179
180 if (rc < 0)
181 return U_STATUS_ERROR;
182
183 if ((rc & ANDROID_ALARM_RTC_MASK) ||
184 (rc & ANDROID_ALARM_RTC_WAKEUP_MASK))
185 result->reference = U_HARDWARE_ALARM_TIME_REFERENCE_BOOT;
186 else if ((rc & ANDROID_ALARM_ELAPSED_REALTIME_MASK) ||
187 (rc & ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK))
188 result->reference = U_HARDWARE_ALARM_TIME_REFERENCE_NOW;
189
190 if ((rc & ANDROID_ALARM_RTC_WAKEUP_MASK) ||
191 (rc & ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK))
192 result->sleep_behavior = U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE;
193 else
194 result->sleep_behavior = U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP;
195
196 return U_STATUS_SUCCESS;
197}
0198
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2013-06-13 12:04:14 +0000
+++ data/CMakeLists.txt 2014-05-02 12:23:55 +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-05-02 12:23:55 +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/control'
--- debian/control 2014-04-15 20:23:07 +0000
+++ debian/control 2014-05-02 12:23:55 +0000
@@ -7,8 +7,6 @@
7 doxygen,7 doxygen,
8 graphviz,8 graphviz,
9 libgles2-mesa-dev,9 libgles2-mesa-dev,
10 gcc-4.7,
11 g++-4.7,
12 libhybris-common-dev,10 libhybris-common-dev,
13 pkg-config,11 pkg-config,
14 libmirclient-dev (>= 0.1.8),12 libmirclient-dev (>= 0.1.8),
@@ -55,7 +53,7 @@
55 should build depend on the libplatform-hardware-api-dev package instead, which53 should build depend on the libplatform-hardware-api-dev package instead, which
56 will pull this package as well.54 will pull this package as well.
5755
58Package: libplatform-api1-dev56Package: libplatform-api-dev
59Section: libdevel57Section: libdevel
60Architecture: any58Architecture: any
61Pre-Depends: ${misc:Pre-Depends},59Pre-Depends: ${misc:Pre-Depends},
@@ -63,36 +61,36 @@
63Depends: ${misc:Depends},61Depends: ${misc:Depends},
64 libgles2-mesa-dev,62 libgles2-mesa-dev,
65 libplatform-api-headers (= ${binary:Version}),63 libplatform-api-headers (= ${binary:Version}),
66 libubuntu-application-api1 | libplatform-api1,64 libubuntu-application-api2,
67 libubuntu-application-api-mirserver1 (= ${binary:Version}),
68 libubuntu-application-api-mirclient1 (= ${binary:Version}),
69 ${misc:Depends},65 ${misc:Depends},
70Suggests: libplatform-api1-doc,66Suggests: libplatform-api1-doc,
71Description: Platform API for system level capabilities (development)67Description: Platform API for system level capabilities (development)
72 This package provides the development library and headers (via68 This package provides the development library and headers (via
73 dependency) for the Platform API.69 dependency) for the Platform API.
7470
75Package: libubuntu-application-api-mirserver171Package: libubuntu-application-api-touch2
76Section: libs72Section: libs
77Pre-Depends: ${misc:Pre-Depends},73Pre-Depends: ${misc:Pre-Depends},
78Multi-Arch: same74Multi-Arch: same
79Architecture: any75Architecture: any
80Depends: ${misc:Depends},76Depends: ${misc:Depends},
81 ${shlibs:Depends},77 ${shlibs:Depends},
82Description: Implementation of the Platform API for a Mir server78 libubuntu-application-api2
83 This package provides the implementation of the Platform API to79Description: Implementation of the Ubuntu Platform API for Touch
84 provide a server instance of Mir.80 This package provides the implementation of the Ubuntu Platform API
81 for Ubuntu Touch clients.
8582
86Package: libubuntu-application-api-mirclient183Package: libubuntu-application-api-desktop2
87Section: libs84Section: libs
88Pre-Depends: ${misc:Pre-Depends},85Pre-Depends: ${misc:Pre-Depends},
89Multi-Arch: same86Multi-Arch: same
90Architecture: any87Architecture: any
91Depends: ${misc:Depends},88Depends: ${misc:Depends},
92 ${shlibs:Depends},89 ${shlibs:Depends},
93Description: Implementation of the Platform API for a Mir client90 libubuntu-application-api2
94 This package provides the implementation of the Platform API to91Description: Implementation of the Ubuntu Platform API for a Desktop
95 allow a client to connect to a Mir server.92 This package provides the implementation of the Ubuntu Platform API
93 for Ubuntu Desktop clients.
9694
97Package: libplatform-hardware-api1-dev95Package: libplatform-hardware-api1-dev
98Section: libdevel96Section: libdevel
@@ -108,11 +106,11 @@
108 This package provides the development library and headers (via106 This package provides the development library and headers (via
109 dependency) for the hw-access portions of the Platform API.107 dependency) for the hw-access portions of the Platform API.
110108
111Package: libplatform-api1-doc109Package: libplatform-api2-doc
112Section: doc110Section: doc
113Architecture: all111Architecture: all
114Depends: ${misc:Depends},112Depends: ${misc:Depends},
115 libplatform-api1-dev,113 libplatform-api2-dev,
116Description: Platform API for system level capabilities (development)114Description: Platform API for system level capabilities (development)
117 This package provides the developer documentation for the Platform API.115 This package provides the developer documentation for the Platform API.
118116
@@ -131,7 +129,7 @@
131 The produced library should be used via libhybris, to communicate with the129 The produced library should be used via libhybris, to communicate with the
132 Android userspace, which is where the device drivers live.130 Android userspace, which is where the device drivers live.
133131
134Package: libubuntu-application-api1132Package: libubuntu-application-api2
135Section: libs133Section: libs
136Architecture: any134Architecture: any
137Replaces: libplatform-api1-hybris (<< 0.18.3)135Replaces: libplatform-api1-hybris (<< 0.18.3)
@@ -146,7 +144,7 @@
146 The produced library should be used via libhybris, to communicate with the144 The produced library should be used via libhybris, to communicate with the
147 Android userspace, which is where the Ubuntu Application Manager lives.145 Android userspace, which is where the Ubuntu Application Manager lives.
148146
149Package: libubuntu-application-api-test1147Package: libubuntu-application-api-test2
150Section: libs148Section: libs
151Architecture: any149Architecture: any
152Pre-Depends: ${misc:Pre-Depends},150Pre-Depends: ${misc:Pre-Depends},
@@ -162,33 +160,14 @@
162 .160 .
163 For now this provides simulated sensors.161 For now this provides simulated sensors.
164162
165Package: libplatform-api1-hybris-tests163#Package: libplatform-api1-hybris-tests
166Architecture: any164#Architecture: any
167Depends: ${misc:Depends},165#Depends: ${misc:Depends},
168 ${shlibs:Depends},166# ${shlibs:Depends},
169 libubuntu-application-api1 (= ${binary:Version}),167# libubuntu-application-api1 (= ${binary:Version}),
170Description: Hybris implementation of the Platform API (tests)168#Description: Hybris implementation of the Platform API (tests)
171 This package provides the test cases for the hybris implementation169# This package provides the test cases for the hybris implementation
172 of the Platform API.170# of the Platform API.
173
174Package: libubuntu-platform-api1-dev
175Section: oldlibs
176Architecture: all
177Depends: ${misc:Depends},
178 libplatform-api1-dev (= ${binary:Version}),
179Description: dummy transitional package for libplatform-api1-dev
180 This is dummy transitional package, please use libplatform-api1-dev instead.
181 .
182 This package can be safely removed.
183
184Package: libplatform-api1-hybris
185Section: oldlibs
186Architecture: all
187Depends: libubuntu-application-api1,
188 ${misc:Depends},
189Description: dummy transitional package for libplatform-api1-hybris
190 This is a dummy transitional package, please use libubuntu-application-api1
191 instead.
192171
193Package: libplatform-hardware-api1-hybris172Package: libplatform-hardware-api1-hybris
194Section: oldlibs173Section: oldlibs
195174
=== removed file 'debian/libplatform-api1-dev.install'
--- debian/libplatform-api1-dev.install 2013-08-23 13:53:42 +0000
+++ debian/libplatform-api1-dev.install 1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
1usr/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.pc
50
=== removed file 'debian/libplatform-api1-doc.doc-base'
--- debian/libplatform-api1-doc.doc-base 2013-07-05 16:34:47 +0000
+++ debian/libplatform-api1-doc.doc-base 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1Document: ubuntu-platform-api
2Title: Ubuntu Platform API Reference Documentation
3Author: Thomas Voß
4Abstract: This is the reference documentation for the Ubuntu Platform API
5Section: Debian
6Format: HTML
7Index: /usr/share/doc/ubuntu-platform-api/html/index.html
8Files: /usr/share/doc/ubuntu-platform-api/html/*.html
90
=== removed file 'debian/libplatform-api1-doc.install'
--- debian/libplatform-api1-doc.install 2013-07-05 13:50:50 +0000
+++ debian/libplatform-api1-doc.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1usr/share/doc/ubuntu-platform-api
2\ No newline at end of file0\ No newline at end of file
31
=== 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
=== modified file 'debian/libplatform-hardware-api1-dev.install'
--- debian/libplatform-hardware-api1-dev.install 2013-07-08 10:39:36 +0000
+++ debian/libplatform-hardware-api1-dev.install 2014-05-02 12:23:55 +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
=== 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
=== removed file 'debian/libubuntu-application-api-test1.docs'
--- debian/libubuntu-application-api-test1.docs 2014-01-08 15:17:41 +0000
+++ debian/libubuntu-application-api-test1.docs 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1src/ubuntu/testbackend/README.md
20
=== removed file 'debian/libubuntu-application-api-test1.install'
--- debian/libubuntu-application-api-test1.install 2014-01-08 15:17:41 +0000
+++ debian/libubuntu-application-api-test1.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1usr/lib/*/libubuntu_application_api_test.so.*
20
=== removed file 'debian/libubuntu-application-api1.install'
--- debian/libubuntu-application-api1.install 2013-07-16 21:20:58 +0000
+++ debian/libubuntu-application-api1.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1usr/lib/*/libubuntu_application_api.so.*
20
=== removed file 'debian/libubuntu-application-api1.symbols'
--- debian/libubuntu-application-api1.symbols 2013-08-26 18:07:34 +0000
+++ debian/libubuntu-application-api1.symbols 1970-01-01 00:00:00 +0000
@@ -1,130 +0,0 @@
1libubuntu_application_api.so.1 libubuntu-application-api1 #MINVER#
2 u_application_description_destroy@Base 0.18.1daily13.06.21
3 u_application_description_new@Base 0.18.1daily13.06.21
4 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.21
6 u_application_id_compare@Base 0.18.1daily13.06.21
7 u_application_id_destroy@Base 0.18.1daily13.06.21
8 u_application_id_new_from_stringn@Base 0.18.1daily13.06.21
9 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.21
11 u_application_lifecycle_delegate_ref@Base 0.18.1daily13.06.21
12 u_application_lifecycle_delegate_set_application_about_to_stop_cb@Base 0.18.1daily13.06.21
13 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.21
15 u_application_lifecycle_delegate_unref@Base 0.18.1daily13.06.21
16 u_application_options_destroy@Base 0.18.1daily13.06.21
17 u_application_options_get_form_factor@Base 0.18.1daily13.06.21
18 u_application_options_get_stage@Base 0.18.1daily13.06.21
19 u_application_options_new_from_cmd_line@Base 0.18.1daily13.06.21
20 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.20130807
22 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.20130807
25 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.20130807
27 ua_location_position_update_get_timestamp@Base 0.18.3+13.10.20130807
28 ua_location_position_update_has_altitude@Base 0.18.3+13.10.20130807
29 ua_location_position_update_ref@Base 0.18.3+13.10.20130807
30 ua_location_position_update_unref@Base 0.18.3+13.10.20130807
31 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.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.20130807
35 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.20130807
37 ua_location_service_session_set_velocity_updates_handler@Base 0.18.3+13.10.20130807
38 ua_location_service_session_start_heading_updates@Base 0.18.3+13.10.20130807
39 ua_location_service_session_start_position_updates@Base 0.18.3+13.10.20130807
40 ua_location_service_session_start_velocity_updates@Base 0.18.3+13.10.20130807
41 ua_location_service_session_stop_heading_updates@Base 0.18.3+13.10.20130807
42 ua_location_service_session_stop_position_updates@Base 0.18.3+13.10.20130807
43 ua_location_service_session_stop_velocity_updates@Base 0.18.3+13.10.20130807
44 ua_location_service_session_unref@Base 0.18.3+13.10.20130807
45 ua_location_velocity_update_get_timestamp@Base 0.18.3+13.10.20130807
46 ua_location_velocity_update_get_velocity_in_meters_per_second@Base 0.18.3+13.10.20130807
47 ua_location_velocity_update_ref@Base 0.18.3+13.10.20130807
48 ua_location_velocity_update_unref@Base 0.18.3+13.10.20130807
49 ua_sensors_accelerometer_disable@Base 0.18.1daily13.06.21
50 ua_sensors_accelerometer_enable@Base 0.18.1daily13.06.21
51 ua_sensors_accelerometer_get_max_value@Base 0.18.1daily13.06.21
52 ua_sensors_accelerometer_get_min_delay@Base 0.18.1daily13.06.21
53 ua_sensors_accelerometer_get_min_value@Base 0.18.1daily13.06.21
54 ua_sensors_accelerometer_get_resolution@Base 0.18.1daily13.06.21
55 ua_sensors_accelerometer_new@Base 0.18.1daily13.06.21
56 ua_sensors_accelerometer_set_reading_cb@Base 0.18.1daily13.06.21
57 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.21
60 ua_sensors_light_get_min_delay@Base 0.18.1daily13.06.21
61 ua_sensors_light_get_min_value@Base 0.18.1daily13.06.21
62 ua_sensors_light_get_resolution@Base 0.18.1daily13.06.21
63 ua_sensors_light_new@Base 0.18.1daily13.06.21
64 ua_sensors_light_set_reading_cb@Base 0.18.1daily13.06.21
65 ua_sensors_proximity_disable@Base 0.18.1daily13.06.21
66 ua_sensors_proximity_enable@Base 0.18.1daily13.06.21
67 ua_sensors_proximity_get_max_value@Base 0.18.1daily13.06.21
68 ua_sensors_proximity_get_min_delay@Base 0.18.1daily13.06.21
69 ua_sensors_proximity_get_min_value@Base 0.18.1daily13.06.21
70 ua_sensors_proximity_get_resolution@Base 0.18.1daily13.06.21
71 ua_sensors_proximity_new@Base 0.18.1daily13.06.21
72 ua_sensors_proximity_set_reading_cb@Base 0.18.1daily13.06.21
73 ua_ui_display_destroy@Base 0.18.1daily13.06.21
74 ua_ui_display_get_native_type@Base 0.18.1daily13.06.21
75 ua_ui_display_new_with_index@Base 0.18.1daily13.06.21
76 ua_ui_display_query_horizontal_res@Base 0.18.1daily13.06.21
77 ua_ui_display_query_vertical_res@Base 0.18.1daily13.06.21
78 ua_ui_get_clipboard_content@Base 0.18.1daily13.06.21
79 ua_ui_session_new_with_properties@Base 0.18.1daily13.06.21
80 ua_ui_session_properties_new@Base 0.18.1daily13.06.21
81 ua_ui_session_properties_set_remote_pid@Base 0.18.1daily13.06.21
82 ua_ui_session_properties_set_type@Base 0.18.1daily13.06.21
83 ua_ui_set_clipboard_content@Base 0.18.1daily13.06.21
84 ua_ui_window_destroy@Base 0.18.1daily13.06.21
85 ua_ui_window_get_native_type@Base 0.18.1daily13.06.21
86 ua_ui_window_hide@Base 0.18.1daily13.06.21
87 ua_ui_window_move@Base 0.18.1daily13.06.21
88 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.21
90 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.21
92 ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.1daily13.06.21
93 ua_ui_window_properties_set_role@Base 0.18.1daily13.06.21
94 ua_ui_window_properties_set_titlen@Base 0.18.1daily13.06.21
95 ua_ui_window_request_fullscreen@Base 0.18.1daily13.06.21
96 ua_ui_window_resize@Base 0.18.1daily13.06.21
97 ua_ui_window_show@Base 0.18.1daily13.06.21
98 ua_url_dispatcher_session@Base 0.18.3+13.10.20130823-0ubuntu1
99 ua_url_dispatcher_session_open@Base 0.18.3+13.10.20130823-0ubuntu1
100 uas_accelerometer_event_get_acceleration_x@Base 0.18.1daily13.06.21
101 uas_accelerometer_event_get_acceleration_y@Base 0.18.1daily13.06.21
102 uas_accelerometer_event_get_acceleration_z@Base 0.18.1daily13.06.21
103 uas_accelerometer_event_get_timestamp@Base 0.18.1daily13.06.21
104 uas_light_event_get_light@Base 0.18.1daily13.06.21
105 uas_light_event_get_timestamp@Base 0.18.1daily13.06.21
106 uas_proximity_event_get_distance@Base 0.18.1daily13.06.21
107 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
1310
=== modified file 'debian/rules' (properties changed: +x to -x)
--- debian/rules 2014-01-31 13:35:28 +0000
+++ debian/rules 2014-05-02 12:23:55 +0000
@@ -2,14 +2,11 @@
22
3DPKG_GENSYMBOLS_CHECK_LEVEL = 43DPKG_GENSYMBOLS_CHECK_LEVEL = 4
44
5export C=gcc-4.7
6export CXX=g++-4.7
7
8%:5%:
9 dh $@6 dh $@
107
11override_dh_auto_configure:8override_dh_auto_configure:
12 dh_auto_configure -- -DENABLE_MIRCLIENT_IMPLEMENTATION=true -DENABLE_MIRSERVER_IMPLEMENTATION=true9 dh_auto_configure
1310
14override_dh_install:11override_dh_install:
15 dh_install --fail-missing12 dh_install --fail-missing
1613
=== modified file 'doc/Doxyfile.in'
--- doc/Doxyfile.in 2013-07-05 09:13:31 +0000
+++ doc/Doxyfile.in 2014-05-02 12:23:55 +0000
@@ -1684,7 +1684,7 @@
1684# explicitly to a value larger than 0 to get control over the balance1684# explicitly to a value larger than 0 to get control over the balance
1685# between CPU load and processing speed.1685# between CPU load and processing speed.
16861686
1687DOT_NUM_THREADS = 01687DOT_NUM_THREADS = 1
16881688
1689# By default doxygen will use the Helvetica font for all dot files that1689# By default doxygen will use the Helvetica font for all dot files that
1690# doxygen generates. When you want a differently looking font you can specify1690# doxygen generates. When you want a differently looking font you can specify
16911691
=== modified file 'include/ubuntu/application/sensors/accelerometer.h'
--- include/ubuntu/application/sensors/accelerometer.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/application/sensors/accelerometer.h 2014-05-02 12:23:55 +0000
@@ -85,9 +85,10 @@
85 * \returns The minimum value that can be reported by the sensor.85 * \returns The minimum value that can be reported by the sensor.
86 * \param[in] sensor The sensor instance to be queried.86 * \param[in] sensor The sensor instance to be queried.
87 */87 */
88 UBUNTU_DLL_PUBLIC float88 UBUNTU_DLL_PUBLIC UStatus
89 ua_sensors_accelerometer_get_min_value(89 ua_sensors_accelerometer_get_min_value(
90 UASensorsAccelerometer* sensor);90 UASensorsAccelerometer* sensor,
91 float* value);
9192
92 /**93 /**
93 * \brief Queries the maximum value that can be reported by the sensor.94 * \brief Queries the maximum value that can be reported by the sensor.
@@ -95,9 +96,10 @@
95 * \returns The maximum value that can be reported by the sensor.96 * \returns The maximum value that can be reported by the sensor.
96 * \param[in] sensor The sensor instance to be queried.97 * \param[in] sensor The sensor instance to be queried.
97 */98 */
98 UBUNTU_DLL_PUBLIC float99 UBUNTU_DLL_PUBLIC UStatus
99 ua_sensors_accelerometer_get_max_value(100 ua_sensors_accelerometer_get_max_value(
100 UASensorsAccelerometer* sensor);101 UASensorsAccelerometer* sensor,
102 float* value);
101103
102 /**104 /**
103 * \brief Queries the numeric resolution supported by the sensor105 * \brief Queries the numeric resolution supported by the sensor
@@ -105,9 +107,10 @@
105 * \returns The numeric resolution supported by the sensor.107 * \returns The numeric resolution supported by the sensor.
106 * \param[in] sensor The sensor instance to be queried.108 * \param[in] sensor The sensor instance to be queried.
107 */109 */
108 UBUNTU_DLL_PUBLIC float110 UBUNTU_DLL_PUBLIC UStatus
109 ua_sensors_accelerometer_get_resolution(111 ua_sensors_accelerometer_get_resolution(
110 UASensorsAccelerometer* sensor);112 UASensorsAccelerometer* sensor,
113 float* value);
111114
112 /**115 /**
113 * \brief Set the callback to be invoked whenever a new sensor reading is available.116 * \brief Set the callback to be invoked whenever a new sensor reading is available.
114117
=== modified file 'include/ubuntu/application/sensors/event/accelerometer.h'
--- include/ubuntu/application/sensors/event/accelerometer.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/application/sensors/event/accelerometer.h 2014-05-02 12:23:55 +0000
@@ -49,9 +49,10 @@
49 * \returns The acceleration in x-axis direction.49 * \returns The acceleration in x-axis direction.
50 * \param[in] event The reading to be queried.50 * \param[in] event The reading to be queried.
51 */51 */
52 UBUNTU_DLL_PUBLIC float52 UBUNTU_DLL_PUBLIC UStatus
53 uas_accelerometer_event_get_acceleration_x(53 uas_accelerometer_event_get_acceleration_x(
54 UASAccelerometerEvent* event);54 UASAccelerometerEvent* event,
55 float* value);
5556
56 /**57 /**
57 * \brief Query the acceleration in y-axis direction.58 * \brief Query the acceleration in y-axis direction.
@@ -59,9 +60,10 @@
59 * \returns The acceleration in y-axis direction.60 * \returns The acceleration in y-axis direction.
60 * \param[in] event The reading to be queried.61 * \param[in] event The reading to be queried.
61 */62 */
62 UBUNTU_DLL_PUBLIC float63 UBUNTU_DLL_PUBLIC UStatus
63 uas_accelerometer_event_get_acceleration_y(64 uas_accelerometer_event_get_acceleration_y(
64 UASAccelerometerEvent* event);65 UASAccelerometerEvent* event,
66 float* value);
6567
66 /**68 /**
67 * \brief Query the acceleration in z-axis direction.69 * \brief Query the acceleration in z-axis direction.
@@ -69,9 +71,10 @@
69 * \returns The acceleration in z-axis direction.71 * \returns The acceleration in z-axis direction.
70 * \param[in] event The reading to be queried.72 * \param[in] event The reading to be queried.
71 */73 */
72 UBUNTU_DLL_PUBLIC float74 UBUNTU_DLL_PUBLIC UStatus
73 uas_accelerometer_event_get_acceleration_z(75 uas_accelerometer_event_get_acceleration_z(
74 UASAccelerometerEvent* event);76 UASAccelerometerEvent* event,
77 float* value);
7578
76#ifdef __cplusplus79#ifdef __cplusplus
77}80}
7881
=== modified file 'include/ubuntu/application/sensors/event/light.h'
--- include/ubuntu/application/sensors/event/light.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/application/sensors/event/light.h 2014-05-02 12:23:55 +0000
@@ -49,9 +49,10 @@
49 * \returns The ambient light level.49 * \returns The ambient light level.
50 * \param[in] event The reading to be queried.50 * \param[in] event The reading to be queried.
51 */51 */
52 UBUNTU_DLL_PUBLIC float52 UBUNTU_DLL_PUBLIC UStatus
53 uas_light_event_get_light(53 uas_light_event_get_light(
54 UASLightEvent* event);54 UASLightEvent* event,
55 float* value);
5556
56#ifdef __cplusplus57#ifdef __cplusplus
57}58}
5859
=== modified file 'include/ubuntu/application/sensors/light.h'
--- include/ubuntu/application/sensors/light.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/application/sensors/light.h 2014-05-02 12:23:55 +0000
@@ -85,9 +85,10 @@
85 * \returns The minimum value that can be reported by the sensor.85 * \returns The minimum value that can be reported by the sensor.
86 * \param[in] sensor The sensor instance to be queried.86 * \param[in] sensor The sensor instance to be queried.
87 */87 */
88 UBUNTU_DLL_PUBLIC float88 UBUNTU_DLL_PUBLIC UStatus
89 ua_sensors_light_get_min_value(89 ua_sensors_light_get_min_value(
90 UASensorsLight* sensor);90 UASensorsLight* sensor,
91 float* value);
9192
92 /**93 /**
93 * \brief Queries the maximum value that can be reported by the sensor.94 * \brief Queries the maximum value that can be reported by the sensor.
@@ -95,9 +96,10 @@
95 * \returns The maximum value that can be reported by the sensor.96 * \returns The maximum value that can be reported by the sensor.
96 * \param[in] sensor The sensor instance to be queried.97 * \param[in] sensor The sensor instance to be queried.
97 */98 */
98 UBUNTU_DLL_PUBLIC float99 UBUNTU_DLL_PUBLIC UStatus
99 ua_sensors_light_get_max_value(100 ua_sensors_light_get_max_value(
100 UASensorsLight* sensor);101 UASensorsLight* sensor,
102 float* value);
101103
102 /**104 /**
103 * \brief Queries the numeric resolution supported by the sensor105 * \brief Queries the numeric resolution supported by the sensor
@@ -105,9 +107,10 @@
105 * \returns The numeric resolution supported by the sensor.107 * \returns The numeric resolution supported by the sensor.
106 * \param[in] sensor The sensor instance to be queried.108 * \param[in] sensor The sensor instance to be queried.
107 */109 */
108 UBUNTU_DLL_PUBLIC float110 UBUNTU_DLL_PUBLIC UStatus
109 ua_sensors_light_get_resolution(111 ua_sensors_light_get_resolution(
110 UASensorsLight* sensor);112 UASensorsLight* sensor,
113 float* value);
111114
112 /**115 /**
113 * \brief Set the callback to be invoked whenever a new sensor reading is available.116 * \brief Set the callback to be invoked whenever a new sensor reading is available.
114117
=== modified file 'include/ubuntu/application/sensors/proximity.h'
--- include/ubuntu/application/sensors/proximity.h 2013-08-22 06:32:14 +0000
+++ include/ubuntu/application/sensors/proximity.h 2014-05-02 12:23:55 +0000
@@ -85,9 +85,10 @@
85 * \returns The minimum value that can be reported by the sensor.85 * \returns The minimum value that can be reported by the sensor.
86 * \param[in] sensor The sensor instance to be queried.86 * \param[in] sensor The sensor instance to be queried.
87 */87 */
88 UBUNTU_DLL_PUBLIC float88 UBUNTU_DLL_PUBLIC UStatus
89 ua_sensors_proximity_get_min_value(89 ua_sensors_proximity_get_min_value(
90 UASensorsProximity* sensor);90 UASensorsProximity* sensor,
91 float* value);
9192
92 /**93 /**
93 * \brief Queries the maximum value that can be reported by the sensor.94 * \brief Queries the maximum value that can be reported by the sensor.
@@ -95,9 +96,10 @@
95 * \returns The maximum value that can be reported by the sensor.96 * \returns The maximum value that can be reported by the sensor.
96 * \param[in] sensor The sensor instance to be queried.97 * \param[in] sensor The sensor instance to be queried.
97 */98 */
98 UBUNTU_DLL_PUBLIC float99 UBUNTU_DLL_PUBLIC UStatus
99 ua_sensors_proximity_get_max_value(100 ua_sensors_proximity_get_max_value(
100 UASensorsProximity* sensor);101 UASensorsProximity* sensor,
102 float* value);
101103
102 /**104 /**
103 * \brief Queries the numeric resolution supported by the sensor105 * \brief Queries the numeric resolution supported by the sensor
@@ -105,9 +107,10 @@
105 * \returns The numeric resolution supported by the sensor.107 * \returns The numeric resolution supported by the sensor.
106 * \param[in] sensor The sensor instance to be queried.108 * \param[in] sensor The sensor instance to be queried.
107 */109 */
108 UBUNTU_DLL_PUBLIC float110 UBUNTU_DLL_PUBLIC UStatus
109 ua_sensors_proximity_get_resolution(111 ua_sensors_proximity_get_resolution(
110 UASensorsProximity* sensor);112 UASensorsProximity* sensor,
113 float* value);
111114
112 /**115 /**
113 * \brief Set the callback to be invoked whenever a new sensor reading is available.116 * \brief Set the callback to be invoked whenever a new sensor reading is available.
114117
=== modified file 'include/ubuntu/application/sensors/ubuntu_application_sensors.h'
--- include/ubuntu/application/sensors/ubuntu_application_sensors.h 2013-08-22 07:17:47 +0000
+++ include/ubuntu/application/sensors/ubuntu_application_sensors.h 2014-05-02 12:23:55 +0000
@@ -18,6 +18,7 @@
18#ifndef UBUNTU_APPLICATION_SENSORS_C_API_H_18#ifndef UBUNTU_APPLICATION_SENSORS_C_API_H_
19#define UBUNTU_APPLICATION_SENSORS_C_API_H_19#define UBUNTU_APPLICATION_SENSORS_C_API_H_
2020
21#include <ubuntu/status.h>
21#include <ubuntu/visibility.h>22#include <ubuntu/visibility.h>
2223
23#include <stdint.h>24#include <stdint.h>
@@ -139,15 +140,17 @@
139 /** Returns the minimum valid value for the sensor_type.140 /** Returns the minimum valid value for the sensor_type.
140 * \ingroup sensor_access141 * \ingroup sensor_access
141 */142 */
142 UBUNTU_DLL_PUBLIC float ubuntu_sensor_get_sensor_min_value(ubuntu_sensor_type sensor_type);143 UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_min_value(ubuntu_sensor_type sensor_type, float* value);
144
143 /** Returns the maximum valid value for the sensor_type.145 /** Returns the maximum valid value for the sensor_type.
144 * \ingroup sensor_access146 * \ingroup sensor_access
145 */147 */
146 UBUNTU_DLL_PUBLIC float ubuntu_sensor_get_sensor_max_value(ubuntu_sensor_type sensor_type);148 UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_max_value(ubuntu_sensor_type sensor_type, float* value);
149
147 /** Returns the resolution of valid values for the sensor_type.150 /** Returns the resolution of valid values for the sensor_type.
148 * \ingroup sensor_access151 * \ingroup sensor_access
149 */152 */
150 UBUNTU_DLL_PUBLIC float ubuntu_sensor_get_sensor_resolution(ubuntu_sensor_type sensor_type);153 UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_resolution(ubuntu_sensor_type sensor_type, float* value);
151154
152 /** \example test_sensors_api.cpp */155 /** \example test_sensors_api.cpp */
153#ifdef __cplusplus156#ifdef __cplusplus
154157
=== 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-05-02 12:23:55 +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-05-02 12:23:55 +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: 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_NOW /**< Relative from now on. */
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/** Reports a timezone change to kernel and HW. */
75UBUNTU_DLL_PUBLIC UStatus
76u_hardware_alarm_set_timezone(
77 UHardwareAlarm alarm,
78 const struct timezone *tz);
79
80/** Sets and arms a timer. */
81UBUNTU_DLL_PUBLIC UStatus
82u_hardware_alarm_set_relative_to_with_behavior(
83 UHardwareAlarm alarm,
84 UHardwareAlarmTimeReference time_reference,
85 UHardwareAlarmSleepBehavior behavior,
86 const struct timespec *ts);
87
88/** Blocks until the next alarm occurs. */
89UBUNTU_DLL_PUBLIC UStatus
90u_hardware_alarm_wait_for_next_alarm(
91 UHardwareAlarm alarm,
92 UHardwareAlarmWaitResult *result);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
099
=== modified file 'src/ubuntu/CMakeLists.txt'
--- src/ubuntu/CMakeLists.txt 2013-12-02 17:03:45 +0000
+++ src/ubuntu/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -1,10 +1,3 @@
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
@@ -12,18 +5,42 @@
12 ubuntu_application_url_dispatcher5 ubuntu_application_url_dispatcher
13)6)
147
15if(ENABLE_HYBRIS_IMPLEMENTATION)8add_subdirectory(common)
16 add_subdirectory(hybris/)9add_subdirectory(desktop)
17endif()10add_subdirectory(touch)
1811add_subdirectory(testbackend)
19if(ENABLE_MIRSERVER_IMPLEMENTATION OR ENABLE_MIRCLIENT_IMPLEMENTATION)12
20 add_subdirectory(mircommon/)13set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
21endif()14
2215add_library(
23if(ENABLE_MIRSERVER_IMPLEMENTATION)16 ubuntu_application_api SHARED
24 add_subdirectory(mirserver/)17
25endif()18 ubuntu_application_api.cpp
2619)
27if(ENABLE_MIRCLIENT_IMPLEMENTATION)20
28 add_subdirectory(mirclient/)21include_directories(
29endif()22 ${CMAKE_BINARY_DIR}/include
23)
24
25target_link_libraries(
26 ubuntu_application_api
27
28 dl
29 #${Hybris}
30)
31
32set_target_properties(
33 ubuntu_application_api
34 PROPERTIES
35 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
36 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
37)
38
39install(
40 TARGETS ubuntu_application_api
41 ${INSTALL_TARGETS_DEFAULT_ARGS}
42)
43
44#if(ENABLE_MIRCLIENT_IMPLEMENTATION)
45# add_subdirectory(mirclient/)
46#endif()
3047
=== added directory 'src/ubuntu/common'
=== added file 'src/ubuntu/common/CMakeLists.txt'
--- src/ubuntu/common/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/ubuntu/common/CMakeLists.txt 2014-05-02 12:23:55 +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/common/application'
=== renamed directory 'src/ubuntu/mirclient' => 'src/ubuntu/common/mirclient'
=== modified file 'src/ubuntu/common/mirclient/CMakeLists.txt'
--- src/ubuntu/mirclient/CMakeLists.txt 2014-02-07 14:32:44 +0000
+++ src/ubuntu/common/mirclient/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -13,11 +13,6 @@
1313
14set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")14set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
1515
16add_library(
17 ubuntu_application_api_mirclient SHARED
18 ${SOURCES}
19)
20
21include_directories(16include_directories(
22 ${CMAKE_BINARY_DIR}/include17 ${CMAKE_BINARY_DIR}/include
23 ${MIRCLIENT_INCLUDE_DIRS}18 ${MIRCLIENT_INCLUDE_DIRS}
@@ -25,18 +20,17 @@
25 ${CMAKE_CURRENT_BINARY_DIR}20 ${CMAKE_CURRENT_BINARY_DIR}
26)21)
2722
23add_library(
24 ubuntu_application_api_mirclient STATIC
25 ${SOURCES}
26)
27
28SET(MIRCOMMON_LINK -Wl,--whole-archive ubuntu_application_api_mircommon -Wl,--no-whole-archive)
29
28target_link_libraries(30target_link_libraries(
29 ubuntu_application_api_mirclient31 ubuntu_application_api_mirclient
32
30 ${MIRCLIENT_LDFLAGS} ${MIRCLIENT_LIBRARIES}33 ${MIRCLIENT_LDFLAGS} ${MIRCLIENT_LIBRARIES}
31 -Wl,--whole-archive ubuntu_application_api_mircommon ${UBUNTU_APPLICATION_API_LINK_LIBRARIES} -Wl,--no-whole-archive
32 ${PROTOBUF_LIBRARIES}34 ${PROTOBUF_LIBRARIES}
33)35# ${MIRCOMMON_LINK}
3436)
35set_target_properties(
36 ubuntu_application_api_mirclient
37 PROPERTIES
38 VERSION 1.0
39 SOVERSION 1
40)
41
42install(TARGETS ubuntu_application_api_mirclient ${INSTALL_TARGETS_DEFAULT_ARGS})
4337
=== modified file 'src/ubuntu/common/mirclient/ubuntu_application_api_mirclient.cpp'
--- src/ubuntu/mirclient/ubuntu_application_api_mirclient.cpp 2014-02-07 14:32:44 +0000
+++ src/ubuntu/common/mirclient/ubuntu_application_api_mirclient.cpp 2014-05-02 12:23:55 +0000
@@ -86,6 +86,15 @@
86extern "C"86extern "C"
87{87{
8888
89void u_application_init(void *args)
90{
91 (void) args;
92}
93
94void u_application_finish()
95{
96}
97
89// TODO<papi>: Eliminate global instance by adding Instance to some functions (i.e. display queries)98// TODO<papi>: Eliminate global instance by adding Instance to some functions (i.e. display queries)
90// TODO: We can't take ownership of description and options until we get rid of the global instance99// TODO: We can't take ownership of description and options until we get rid of the global instance
91// so we leak them.100// so we leak them.
92101
=== renamed directory 'src/ubuntu/mircommon' => 'src/ubuntu/common/mircommon'
=== modified file 'src/ubuntu/common/mircommon/CMakeLists.txt'
--- src/ubuntu/mircommon/CMakeLists.txt 2014-02-17 22:40:09 +0000
+++ src/ubuntu/common/mircommon/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -7,19 +7,6 @@
7 lifecycle_delegate_mir.cpp7 lifecycle_delegate_mir.cpp
8 )8 )
99
10if(ENABLE_HYBRIS_IMPLEMENTATION)
11 list(APPEND SOURCES
12 ../hybris/ubuntu_application_sensors_hybris.cpp
13 )
14 list(APPEND LINK_LIBRARIES
15 ${Hybris}
16 )
17else()
18 list(APPEND SOURCES
19 ubuntu_application_sensors_desktop.cpp
20 )
21endif()
22
23set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC --std=c++11")10set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC --std=c++11")
2411
25include_directories(12include_directories(
@@ -34,6 +21,5 @@
34target_link_libraries(21target_link_libraries(
35 ubuntu_application_api_mircommon22 ubuntu_application_api_mircommon
3623
37 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
38 ${LINK_LIBRARIES}24 ${LINK_LIBRARIES}
39 )25 )
4026
=== modified file 'src/ubuntu/common/mircommon/ubuntu_application_sensors_desktop.cpp'
--- src/ubuntu/mircommon/ubuntu_application_sensors_desktop.cpp 2013-06-05 23:47:51 +0000
+++ src/ubuntu/common/mircommon/ubuntu_application_sensors_desktop.cpp 2014-05-02 12:23:55 +0000
@@ -46,19 +46,34 @@
46 return 0;46 return 0;
47}47}
4848
49float ua_sensors_accelerometer_get_min_value(UASensorsAccelerometer*)49UStatus ua_sensors_accelerometer_get_min_value(UASensorsAccelerometer*, float* value)
50{50{
51 return 0.0;51 if (!value)
52}52 return U_STATUS_ERROR;
5353
54float ua_sensors_accelerometer_get_max_value(UASensorsAccelerometer*)54 *value = 0.f;
55{55
56 return 0.0;56 return U_STATUS_SUCCESS;
57}57}
5858
59float ua_sensors_accelerometer_get_resolution(UASensorsAccelerometer*)59UStatus ua_sensors_accelerometer_get_max_value(UASensorsAccelerometer*, float* value)
60{60{
61 return 0.0;61 if (!value)
62 return U_STATUS_ERROR;
63
64 *value = 0.f;
65
66 return U_STATUS_SUCCESS;
67}
68
69UStatus ua_sensors_accelerometer_get_resolution(UASensorsAccelerometer*, float* value)
70{
71 if (!value)
72 return U_STATUS_ERROR;
73
74 *value = 0.f;
75
76 return U_STATUS_SUCCESS;
62}77}
6378
64void ua_sensors_accelerometer_set_reading_cb(UASensorsAccelerometer*, on_accelerometer_event_cb, void*)79void ua_sensors_accelerometer_set_reading_cb(UASensorsAccelerometer*, on_accelerometer_event_cb, void*)
@@ -71,19 +86,34 @@
71 return 0;86 return 0;
72}87}
7388
74float uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent*)89UStatus uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent*, float* value)
75{90{
76 return 0.0;91 if (!value)
77}92 return U_STATUS_ERROR;
7893
79float uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent*)94 *value = 0.f;
80{95
81 return 0.0;96 return U_STATUS_SUCCESS;
82}97}
8398
84float uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent*)99UStatus uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent*, float* value)
85{100{
86 return 0.0;101 if (!value)
102 return U_STATUS_ERROR;
103
104 *value = 0.f;
105
106 return U_STATUS_SUCCESS;
107}
108
109UStatus uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent*, float* value)
110{
111 if (!value)
112 return U_STATUS_ERROR;
113
114 *value = 0.f;
115
116 return U_STATUS_SUCCESS;
87}117}
88118
89// Proximity Sensor119// Proximity Sensor
@@ -107,19 +137,34 @@
107 return 0;137 return 0;
108}138}
109139
110float ua_sensors_proximity_get_min_value(UASensorsProximity*)140UStatus ua_sensors_proximity_get_min_value(UASensorsProximity*, float* value)
111{141{
112 return 0.0;142 if (!value)
113}143 return U_STATUS_ERROR;
114144
115float ua_sensors_proximity_get_max_value(UASensorsProximity*)145 *value = 0.f;
116{146
117 return 0.0;147 return U_STATUS_SUCCESS;
118}148}
119149
120float ua_sensors_proximity_get_resolution(UASensorsProximity*)150UStatus ua_sensors_proximity_get_max_value(UASensorsProximity*, float* value)
121{151{
122 return 0.0;152 if (!value)
153 return U_STATUS_ERROR;
154
155 *value = 0.f;
156
157 return U_STATUS_SUCCESS;
158}
159
160UStatus ua_sensors_proximity_get_resolution(UASensorsProximity*, float* value)
161{
162 if (!value)
163 return U_STATUS_ERROR;
164
165 *value = 0.f;
166
167 return U_STATUS_SUCCESS;
123}168}
124169
125void ua_sensors_proximity_set_reading_cb(UASensorsProximity*, on_proximity_event_cb, void*)170void ua_sensors_proximity_set_reading_cb(UASensorsProximity*, on_proximity_event_cb, void*)
@@ -159,19 +204,34 @@
159 return 0;204 return 0;
160}205}
161206
162float ua_sensors_light_get_min_value(UASensorsLight*)207UStatus ua_sensors_light_get_min_value(UASensorsLight*, float* value)
163{208{
164 return 0.0;209 if (!value)
165}210 return U_STATUS_ERROR;
166211
167float ua_sensors_light_get_max_value(UASensorsLight*)212 *value = 0.f;
168{213
169 return 0.0;214 return U_STATUS_SUCCESS;
170}215}
171216
172float ua_sensors_light_get_resolution(UASensorsLight*)217UStatus ua_sensors_light_get_max_value(UASensorsLight*, float* value)
173{218{
174 return 0.0;219 if (!value)
220 return U_STATUS_ERROR;
221
222 *value = 0.f;
223
224 return U_STATUS_SUCCESS;
225}
226
227UStatus ua_sensors_light_get_resolution(UASensorsLight*, float* value)
228{
229 if (!value)
230 return U_STATUS_ERROR;
231
232 *value = 0.f;
233
234 return U_STATUS_SUCCESS;
175}235}
176236
177void ua_sensors_light_set_reading_cb(UASensorsLight*, on_light_event_cb, void*)237void ua_sensors_light_set_reading_cb(UASensorsLight*, on_light_event_cb, void*)
@@ -184,7 +244,12 @@
184 return 0;244 return 0;
185}245}
186246
187float uas_light_event_get_light(UASLightEvent*)247UStatus uas_light_event_get_light(UASLightEvent*, float* value)
188{248{
189 return 0.0;249 if (!value)
250 return U_STATUS_ERROR;
251
252 *value = 0.f;
253
254 return U_STATUS_SUCCESS;
190}255}
191256
=== renamed directory 'src/ubuntu/mirserver' => 'src/ubuntu/common/mirserver'
=== modified file 'src/ubuntu/common/mirserver/CMakeLists.txt'
--- src/ubuntu/mirserver/CMakeLists.txt 2014-01-09 18:47:45 +0000
+++ src/ubuntu/common/mirserver/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -7,30 +7,23 @@
77
8set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")8set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
99
10add_library(
11 ubuntu_application_api_mirserver SHARED
12 ${SOURCES}
13)
14
15include_directories(10include_directories(
16 ${CMAKE_BINARY_DIR}/include11 ${CMAKE_BINARY_DIR}/include
17 ${MIRSERVER_INCLUDE_DIRS}12 ${MIRSERVER_INCLUDE_DIRS}
18)13)
1914
15add_library(
16 ubuntu_application_api_mirserver STATIC
17 ${SOURCES}
18)
19
20#ubuntu_application_api_d_sensors
21
20target_link_libraries(22target_link_libraries(
21 ubuntu_application_api_mirserver23 ubuntu_application_api_mirserver
22 ${MIRSERVER_LDFLAGS} ${MIRSERVER_LIBRARIES}24
23 -Wl,--whole-archive ubuntu_application_api_mircommon ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}25 ${MIRSERVER_LDFLAGS} ${MIRSERVER_LIBRARIES}
24 -Wl,--no-whole-archive26# ${MIRCOMMON_LINK}
25)27)
2628
27
28set_target_properties(
29 ubuntu_application_api_mirserver
30 PROPERTIES
31 VERSION 1.0
32 SOVERSION 1
33)
34
35install(TARGETS ubuntu_application_api_mirserver ${INSTALL_TARGETS_DEFAULT_ARGS})
36install(FILES ubuntu_application_api_mirserver_priv.h DESTINATION include/ubuntu/application)29install(FILES ubuntu_application_api_mirserver_priv.h DESTINATION include/ubuntu/application)
3730
=== modified file 'src/ubuntu/common/mirserver/ubuntu_application_api_mirserver.cpp'
--- src/ubuntu/mirserver/ubuntu_application_api_mirserver.cpp 2014-04-15 20:23:07 +0000
+++ src/ubuntu/common/mirserver/ubuntu_application_api_mirserver.cpp 2014-05-02 12:23:55 +0000
@@ -77,19 +77,28 @@
7777
78extern "C"78extern "C"
79{79{
80void ua_ui_mirserver_init(mir::DefaultServerConfiguration& config)80void u_application_init(void *args)
81{81{
82 mir::DefaultServerConfiguration* config = static_cast<mir::DefaultServerConfiguration*>(args);
82 auto context = global_mirserver_context();83 auto context = global_mirserver_context();
8384
85<<<<<<< TREE
84 context->display = config.the_display();86 context->display = config.the_display();
85 context->buffer_allocator = config.the_buffer_allocator();87 context->buffer_allocator = config.the_buffer_allocator();
86 context->surface_coordinator = config.the_surface_coordinator();88 context->surface_coordinator = config.the_surface_coordinator();
87 context->session_listener = config.the_session_listener();89 context->session_listener = config.the_session_listener();
90=======
91 context->display = config->the_display();
92 context->buffer_allocator = config->the_buffer_allocator();
93 context->surface_coordinator = config->the_surface_coordinator();
94 context->placement_strategy = config->the_shell_placement_strategy();
95 context->session_listener = config->the_shell_session_listener();
96>>>>>>> MERGE-SOURCE
88 context->input_platform = mir::input::receiver::InputPlatform::create();97 context->input_platform = mir::input::receiver::InputPlatform::create();
89 context->egl_client = config.the_graphics_platform()->create_internal_client();98 context->egl_client = config->the_graphics_platform()->create_internal_client();
90}99}
91100
92void ua_ui_mirserver_finish()101void u_application_finish()
93{102{
94 auto context = global_mirserver_context();103 auto context = global_mirserver_context();
95104
96105
=== added directory 'src/ubuntu/desktop'
=== added file 'src/ubuntu/desktop/CMakeLists.txt'
--- src/ubuntu/desktop/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/ubuntu/desktop/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -0,0 +1,62 @@
1add_library(
2 ubuntu_application_api_desktop_mirclient MODULE
3
4 module_version.h
5)
6
7add_library(
8 ubuntu_application_api_desktop_mirserver MODULE
9
10 module_version.h
11)
12
13target_link_libraries(
14 ubuntu_application_api_desktop_mirclient
15
16 "-Wl,--whole-archive"
17 ubuntu_application_api_mirclient
18 ubuntu_application_api_mircommon
19 #TODO: ubuntu_application_api_d_sensors
20 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
21 "-Wl,--no-whole-archive"
22 #TODO: Alarms
23)
24
25target_link_libraries(
26 ubuntu_application_api_desktop_mirserver
27
28 "-Wl,--whole-archive"
29 ubuntu_application_api_mirserver
30 ubuntu_application_api_mircommon
31 #TODO: ubuntu_application_api_d_sensors
32 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
33 "-Wl,--no-whole-archive"
34 #TODO: Alarms
35)
36
37set_target_properties(
38 ubuntu_application_api_desktop_mirclient
39 PROPERTIES
40 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
41 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
42)
43
44set_target_properties(
45 ubuntu_application_api_desktop_mirserver
46 PROPERTIES
47 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
48 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
49)
50install(
51 TARGETS ubuntu_application_api_desktop_mirclient
52 # this is not a development library to compile against, users should always
53 # specify the SONAME; so don't build a *.so
54 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
55)
56
57install(
58 TARGETS ubuntu_application_api_desktop_mirserver
59 # this is not a development library to compile against, users should always
60 # specify the SONAME; so don't build a *.so
61 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
62)
063
=== added directory 'src/ubuntu/hardware'
=== modified file 'src/ubuntu/testbackend/ubuntu_application_sensors.cpp'
--- src/ubuntu/testbackend/ubuntu_application_sensors.cpp 2013-12-12 14:40:21 +0000
+++ src/ubuntu/testbackend/ubuntu_application_sensors.cpp 2014-05-02 12:23:55 +0000
@@ -375,22 +375,34 @@
375 return static_cast<TestSensor*>(s)->min_delay;375 return static_cast<TestSensor*>(s)->min_delay;
376}376}
377377
378float ua_sensors_accelerometer_get_min_value(UASensorsAccelerometer* s) __SF_FN_ATTR;378UStatus ua_sensors_accelerometer_get_min_value(UASensorsAccelerometer* s, float* value)
379float ua_sensors_accelerometer_get_min_value(UASensorsAccelerometer* s)379{
380{380 if (!value)
381 return static_cast<TestSensor*>(s)->min_value;381 return U_STATUS_ERROR;
382}382
383383 *value = static_cast<TestSensor*>(s)->min_value;
384float ua_sensors_accelerometer_get_max_value(UASensorsAccelerometer* s) __SF_FN_ATTR;384
385float ua_sensors_accelerometer_get_max_value(UASensorsAccelerometer* s)385 return U_STATUS_SUCCESS;
386{386}
387 return static_cast<TestSensor*>(s)->max_value;387
388}388UStatus ua_sensors_accelerometer_get_max_value(UASensorsAccelerometer* s, float* value)
389389{
390float ua_sensors_accelerometer_get_resolution(UASensorsAccelerometer* s) __SF_FN_ATTR;390 if (!value)
391float ua_sensors_accelerometer_get_resolution(UASensorsAccelerometer* s)391 return U_STATUS_ERROR;
392{392
393 return static_cast<TestSensor*>(s)->resolution;393 *value = static_cast<TestSensor*>(s)->max_value;
394
395 return U_STATUS_SUCCESS;
396}
397
398UStatus ua_sensors_accelerometer_get_resolution(UASensorsAccelerometer* s, float* value)
399{
400 if (!value)
401 return U_STATUS_ERROR;
402
403 *value = static_cast<TestSensor*>(s)->resolution;
404
405 return U_STATUS_SUCCESS;
394}406}
395407
396void ua_sensors_accelerometer_set_reading_cb(UASensorsAccelerometer* s, on_accelerometer_event_cb cb, void* ctx)408void ua_sensors_accelerometer_set_reading_cb(UASensorsAccelerometer* s, on_accelerometer_event_cb cb, void* ctx)
@@ -405,22 +417,34 @@
405 return static_cast<TestSensor*>(e)->timestamp;417 return static_cast<TestSensor*>(e)->timestamp;
406}418}
407419
408float uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent* e) __SF_FN_ATTR;420UStatus uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent* e, float* value)
409float uas_accelerometer_event_get_acceleration_x(UASAccelerometerEvent* e)421{
410{422 if (!value)
411 return static_cast<TestSensor*>(e)->x;423 return U_STATUS_ERROR;
412}424
413425 *value = static_cast<TestSensor*>(e)->x;
414float uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent* e) __SF_FN_ATTR;426
415float uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent* e)427 return U_STATUS_SUCCESS;
416{428}
417 return static_cast<TestSensor*>(e)->y;429
418}430UStatus uas_accelerometer_event_get_acceleration_y(UASAccelerometerEvent* e, float* value)
419431{
420float uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent* e) __SF_FN_ATTR;432 if (!value)
421float uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent* e)433 return U_STATUS_ERROR;
422{434
423 return static_cast<TestSensor*>(e)->z;435 *value = static_cast<TestSensor*>(e)->y;
436
437 return U_STATUS_SUCCESS;
438}
439
440UStatus uas_accelerometer_event_get_acceleration_z(UASAccelerometerEvent* e, float* value)
441{
442 if (!value)
443 return U_STATUS_ERROR;
444
445 *value = static_cast<TestSensor*>(e)->z;
446
447 return U_STATUS_SUCCESS;
424}448}
425449
426/***************************************450/***************************************
@@ -452,22 +476,34 @@
452}476}
453477
454// the next three function make no sense in the API, just return zero478// the next three function make no sense in the API, just return zero
455float ua_sensors_proximity_get_min_value(UASensorsProximity*) __SF_FN_ATTR;479UStatus ua_sensors_proximity_get_min_value(UASensorsProximity*, float* value)
456float ua_sensors_proximity_get_min_value(UASensorsProximity*)480{
457{481 if (!value)
458 return 0.0;482 return U_STATUS_ERROR;
459}483
460484 *value = 0.f;
461float ua_sensors_proximity_get_max_value(UASensorsProximity*) __SF_FN_ATTR;485
462float ua_sensors_proximity_get_max_value(UASensorsProximity*)486 return U_STATUS_SUCCESS;
463{487}
464 return 0.0;488
465}489UStatus ua_sensors_proximity_get_max_value(UASensorsProximity*, float* value)
466490{
467float ua_sensors_proximity_get_resolution(UASensorsProximity*) __SF_FN_ATTR;491 if (!value)
468float ua_sensors_proximity_get_resolution(UASensorsProximity*)492 return U_STATUS_ERROR;
469{493
470 return 0.0;494 *value = 0.f;
495
496 return U_STATUS_SUCCESS;
497}
498
499UStatus ua_sensors_proximity_get_resolution(UASensorsProximity*, float* value)
500{
501 if (!value)
502 return U_STATUS_ERROR;
503
504 *value = 0.f;
505
506 return U_STATUS_SUCCESS;
471}507}
472508
473void ua_sensors_proximity_set_reading_cb(UASensorsProximity* s, on_proximity_event_cb cb, void* ctx)509void ua_sensors_proximity_set_reading_cb(UASensorsProximity* s, on_proximity_event_cb cb, void* ctx)
@@ -516,22 +552,34 @@
516 return static_cast<TestSensor*>(s)->min_delay;552 return static_cast<TestSensor*>(s)->min_delay;
517}553}
518554
519float ua_sensors_light_get_min_value(UASensorsLight* s) __SF_FN_ATTR;555UStatus ua_sensors_light_get_min_value(UASensorsLight* s, float* value)
520float ua_sensors_light_get_min_value(UASensorsLight* s)556{
521{557 if (!value)
522 return static_cast<TestSensor*>(s)->min_value;558 return U_STATUS_ERROR;
523}559
524560 *value = static_cast<TestSensor*>(s)->min_value;
525float ua_sensors_light_get_max_value(UASensorsLight* s) __SF_FN_ATTR;561
526float ua_sensors_light_get_max_value(UASensorsLight* s)562 return U_STATUS_SUCCESS;
527{563}
528 return static_cast<TestSensor*>(s)->max_value;564
529}565UStatus ua_sensors_light_get_max_value(UASensorsLight* s, float* value)
530566{
531float ua_sensors_light_get_resolution(UASensorsLight* s) __SF_FN_ATTR;567 if (!value)
532float ua_sensors_light_get_resolution(UASensorsLight* s)568 return U_STATUS_ERROR;
533{569
534 return static_cast<TestSensor*>(s)->resolution;570 *value = static_cast<TestSensor*>(s)->max_value;
571
572 return U_STATUS_SUCCESS;
573}
574
575UStatus ua_sensors_light_get_resolution(UASensorsLight* s, float* value)
576{
577 if (!value)
578 return U_STATUS_ERROR;
579
580 *value = static_cast<TestSensor*>(s)->resolution;
581
582 return U_STATUS_SUCCESS;
535}583}
536584
537void ua_sensors_light_set_reading_cb(UASensorsLight* s, on_light_event_cb cb, void* ctx)585void ua_sensors_light_set_reading_cb(UASensorsLight* s, on_light_event_cb cb, void* ctx)
@@ -546,8 +594,12 @@
546 return static_cast<TestSensor*>(e)->timestamp;594 return static_cast<TestSensor*>(e)->timestamp;
547}595}
548596
549float uas_light_event_get_light(UASLightEvent* e) __SF_FN_ATTR;597UStatus uas_light_event_get_light(UASLightEvent* e, float* value)
550float uas_light_event_get_light(UASLightEvent* e)
551{598{
552 return static_cast<TestSensor*>(e)->x;599 if (!value)
600 return U_STATUS_ERROR;
601
602 *value = static_cast<TestSensor*>(e)->x;
603
604 return U_STATUS_SUCCESS;
553}605}
554606
=== added directory 'src/ubuntu/touch'
=== added file 'src/ubuntu/touch/CMakeLists.txt'
--- src/ubuntu/touch/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/ubuntu/touch/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -0,0 +1,64 @@
1add_subdirectory(hybris)
2
3add_library(
4 ubuntu_application_api_touch_mirclient MODULE
5
6 module_version.h
7)
8
9add_library(
10 ubuntu_application_api_touch_mirserver MODULE
11
12 module_version.h
13)
14
15target_link_libraries(
16 ubuntu_application_api_touch_mirclient
17
18 "-Wl,--whole-archive"
19 ubuntu_application_api_mirclient
20 ubuntu_application_api_mircommon
21 ubuntu_application_api_hybris
22 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
23 "-Wl,--no-whole-archive"
24 #TODO: Alarms
25)
26
27target_link_libraries(
28 ubuntu_application_api_touch_mirserver
29
30 "-Wl,--whole-archive"
31 ubuntu_application_api_mirserver
32 ubuntu_application_api_mircommon
33 ubuntu_application_api_hybris
34 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
35 "-Wl,--no-whole-archive"
36 #TODO: Alarms
37)
38
39set_target_properties(
40 ubuntu_application_api_touch_mirclient
41 PROPERTIES
42 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
43 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
44)
45
46set_target_properties(
47 ubuntu_application_api_touch_mirserver
48 PROPERTIES
49 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
50 SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
51)
52install(
53 TARGETS ubuntu_application_api_touch_mirclient
54 # this is not a development library to compile against, users should always
55 # specify the SONAME; so don't build a *.so
56 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
57)
58
59install(
60 TARGETS ubuntu_application_api_touch_mirserver
61 # this is not a development library to compile against, users should always
62 # specify the SONAME; so don't build a *.so
63 LIBRARY DESTINATION "${LIB_INSTALL_DIR}" NAMELINK_SKIP
64)
065
=== renamed directory 'src/ubuntu/hybris' => 'src/ubuntu/touch/hybris'
=== modified file 'src/ubuntu/touch/hybris/CMakeLists.txt'
--- src/ubuntu/hybris/CMakeLists.txt 2014-02-12 07:35:37 +0000
+++ src/ubuntu/touch/hybris/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -1,30 +1,27 @@
1set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")1set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
22
3add_library(3add_library(
4 ubuntu_application_api SHARED4 ubuntu_application_api_hybris STATIC
55
6 ubuntu_application_api_hybris.cpp6 #ubuntu_application_api_hybris.cpp
7 ubuntu_application_sensors_hybris.cpp7 ubuntu_application_sensors_hybris.cpp
8)8)
99
10include_directories(
11 ${CMAKE_BINARY_DIR}/include
12)
13
14target_link_libraries(
15 ubuntu_application_api_hybris
16
17 ${Hybris}
18)
19
10add_library(20add_library(
11 ubuntu_platform_hardware_api SHARED21 ubuntu_platform_hardware_api SHARED
12 ubuntu_platform_hardware_api.cpp22 ubuntu_platform_hardware_api.cpp
13)23)
1424
15include_directories(
16 ${CMAKE_BINARY_DIR}/include
17)
18
19target_link_libraries(
20 ubuntu_application_api
21
22 "-Wl,--whole-archive"
23 ${UBUNTU_APPLICATION_API_LINK_LIBRARIES}
24 "-Wl,--no-whole-archive"
25 ${Hybris}
26)
27
28target_link_libraries(25target_link_libraries(
29 ubuntu_platform_hardware_api26 ubuntu_platform_hardware_api
30 dl27 dl
@@ -32,13 +29,6 @@
32)29)
3330
34set_target_properties(31set_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
41set_target_properties(
42 ubuntu_platform_hardware_api32 ubuntu_platform_hardware_api
43 PROPERTIES33 PROPERTIES
44 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}34 VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
@@ -46,13 +36,8 @@
46)36)
4737
48install(38install(
49 TARGETS ubuntu_application_api
50 ${INSTALL_TARGETS_DEFAULT_ARGS}
51)
52
53install(
54 TARGETS ubuntu_platform_hardware_api39 TARGETS ubuntu_platform_hardware_api
55 ${INSTALL_TARGETS_DEFAULT_ARGS}40 ${INSTALL_TARGETS_DEFAULT_ARGS}
56)41)
5742
58add_subdirectory(tests/)43#add_subdirectory(tests/)
5944
=== modified file 'src/ubuntu/touch/hybris/bridge.h'
--- src/ubuntu/hybris/bridge.h 2014-02-21 13:07:33 +0000
+++ src/ubuntu/touch/hybris/bridge.h 2014-05-02 12:23:55 +0000
@@ -53,7 +53,7 @@
53 static const char* cache = NULL;53 static const char* cache = NULL;
5454
55 if (cache == NULL) {55 if (cache == NULL) {
56 cache = secure_getenv("UBUNTU_PLATFORM_API_BACKEND");56 cache = secure_getenv("UBUNTU_PLATFORM_API_SENSORS_BACKEND");
57 if (cache == NULL)57 if (cache == NULL)
58 cache = "/system/lib/libubuntu_application_api.so";58 cache = "/system/lib/libubuntu_application_api.so";
59 }59 }
@@ -143,22 +143,6 @@
143 DLSYM(&f, #symbol); \143 DLSYM(&f, #symbol); \
144 return f(_1); }144 return f(_1); }
145145
146// pcs attribute (calling convention) is only defined on ARM, avoid warning on
147// other platforms
148#ifdef __arm__
149#define __SF_FN_ATTR __attribute__((pcs("aapcs")))
150#else
151#define __SF_FN_ATTR
152#endif
153
154#define IMPLEMENT_SF_FUNCTION1(return_type, symbol, arg1) \
155 return_type symbol(arg1 _1) \
156 { \
157 static return_type (*f)(arg1) __SF_FN_ATTR = NULL; \
158 DLSYM(&f, #symbol); \
159 return f(_1); }
160
161
162#define IMPLEMENT_VOID_FUNCTION1(symbol, arg1) \146#define IMPLEMENT_VOID_FUNCTION1(symbol, arg1) \
163 void symbol(arg1 _1) \147 void symbol(arg1 _1) \
164 { \148 { \
165149
=== modified file 'src/ubuntu/touch/hybris/tests/CMakeLists.txt'
--- src/ubuntu/hybris/tests/CMakeLists.txt 2013-08-17 05:22:31 +0000
+++ src/ubuntu/touch/hybris/tests/CMakeLists.txt 2014-05-02 12:23:55 +0000
@@ -12,18 +12,18 @@
12add_executable(test_android_sensors_api test_sensors_api.cpp)12add_executable(test_android_sensors_api test_sensors_api.cpp)
13target_link_libraries(test_android_sensors_api ubuntu_application_api)13target_link_libraries(test_android_sensors_api ubuntu_application_api)
1414
15add_executable(test_android_ubuntu_session_api test_session_c_api.cpp)
16target_link_libraries(test_android_ubuntu_session_api ubuntu_application_api)
17
18add_executable(test_ubuntu_app_api_location_service test_location_api.cpp)15add_executable(test_ubuntu_app_api_location_service test_location_api.cpp)
19target_link_libraries(test_ubuntu_app_api_location_service ubuntu_application_api)16target_link_libraries(test_ubuntu_app_api_location_service ubuntu_application_api)
2017
18add_executable(test_hardware_alarms_api test_alarms_api.cpp)
19target_link_libraries(test_hardware_alarms_api ubuntu_platform_hardware_api)
20
21install(TARGETS21install(TARGETS
22 test_android_ubuntu_app_api22 test_android_ubuntu_app_api
23 test_android_gps_api23 test_android_gps_api
24 test_android_ubuntu_app_api_multiple_surfaces24 test_android_ubuntu_app_api_multiple_surfaces
25 test_android_sensors_api25 test_android_sensors_api
26 test_android_ubuntu_session_api
27 test_ubuntu_app_api_location_service26 test_ubuntu_app_api_location_service
27 test_hardware_alarms_api
28 DESTINATION bin28 DESTINATION bin
29)29)
3030
=== added file 'src/ubuntu/touch/hybris/tests/test_alarms_api.cpp'
--- src/ubuntu/touch/hybris/tests/test_alarms_api.cpp 1970-01-01 00:00:00 +0000
+++ src/ubuntu/touch/hybris/tests/test_alarms_api.cpp 2014-05-02 12:23:55 +0000
@@ -0,0 +1,62 @@
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 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 General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Thomas Voß <thomas.voss@canonicalcom>
17 */
18
19#include <ubuntu/hardware/alarm.h>
20
21#include <cstdio>
22#include <ctime>
23
24int main(int argc, char** argv)
25{
26 UHardwareAlarm alarm = u_hardware_alarm_create();
27
28 if (!alarm)
29 {
30 printf("Error creating handle to hardware alarms.\n");
31 return 1;
32 }
33
34 // Alarm in two seconds.
35 timespec ts { 2, 0 };
36
37
38 UStatus rc = u_hardware_alarm_set_relative_to_with_behavior(
39 alarm,
40 U_HARDWARE_ALARM_TIME_REFERENCE_NOW,
41 U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE,
42 &ts);
43
44 if (rc != U_STATUS_SUCCESS)
45 {
46 printf("Problem setting hardware alarm.\n");
47 return 1;
48 }
49
50 UHardwareAlarmWaitResult wait_result;
51 rc = u_hardware_alarm_wait_for_next_alarm(alarm, &wait_result);
52
53 if (rc != U_STATUS_SUCCESS)
54 {
55 printf("Problem waiting for hardware alarm to go off.\n");
56 return 1;
57 }
58
59 printf("Successfully created and waited for a hw alarm.\n");
60
61 return 0;
62}
063
=== modified file 'src/ubuntu/touch/hybris/tests/test_sensors_api.cpp'
--- src/ubuntu/hybris/tests/test_sensors_api.cpp 2013-12-03 07:10:43 +0000
+++ src/ubuntu/touch/hybris/tests/test_sensors_api.cpp 2014-05-02 12:23:55 +0000
@@ -28,11 +28,15 @@
2828
29void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)29void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)
30{30{
31 float x; uas_accelerometer_event_get_acceleration_x(event, &x);
32 float y; uas_accelerometer_event_get_acceleration_y(event, &y);
33 float z; uas_accelerometer_event_get_acceleration_z(event, &z);
34
31 printf("%s \n", __PRETTY_FUNCTION__);35 printf("%s \n", __PRETTY_FUNCTION__);
32 printf("\ttime: %" PRIu64 "\n", uas_accelerometer_event_get_timestamp(event));36 printf("\ttime: %" PRIu64 "\n", uas_accelerometer_event_get_timestamp(event));
33 printf("\tx: %f\n", uas_accelerometer_event_get_acceleration_x(event));37 printf("\tx: %f\n", x);
34 printf("\ty: %f\n", uas_accelerometer_event_get_acceleration_y(event));38 printf("\ty: %f\n", y);
35 printf("\tz: %f\n", uas_accelerometer_event_get_acceleration_z(event));39 printf("\tz: %f\n", z);
36}40}
3741
38void on_new_proximity_event(UASProximityEvent* event, void* context)42void on_new_proximity_event(UASProximityEvent* event, void* context)
@@ -57,9 +61,11 @@
5761
58void on_new_light_event(UASLightEvent* event, void* context)62void on_new_light_event(UASLightEvent* event, void* context)
59{63{
64 float light = -1.f; uas_light_event_get_light(event, &light);
65
60 printf("%s \n", __PRETTY_FUNCTION__);66 printf("%s \n", __PRETTY_FUNCTION__);
61 printf("\ttime: %" PRIu64 "\n", uas_light_event_get_timestamp(event));67 printf("\ttime: %" PRIu64 "\n", uas_light_event_get_timestamp(event));
62 printf("\tlight: %f\n", uas_light_event_get_light(event));68 printf("\tlight: %f\n", light);
63}69}
6470
65int main(int argc, char** argv)71int main(int argc, char** argv)
6672
=== modified file 'src/ubuntu/touch/hybris/ubuntu_application_sensors_hybris.cpp'
--- src/ubuntu/hybris/ubuntu_application_sensors_hybris.cpp 2014-02-05 09:26:23 +0000
+++ src/ubuntu/touch/hybris/ubuntu_application_sensors_hybris.cpp 2014-05-02 12:23:55 +0000
@@ -30,25 +30,25 @@
30IMPLEMENT_FUNCTION1(UStatus, ua_sensors_accelerometer_enable, UASensorsAccelerometer*);30IMPLEMENT_FUNCTION1(UStatus, ua_sensors_accelerometer_enable, UASensorsAccelerometer*);
31IMPLEMENT_FUNCTION1(UStatus, ua_sensors_accelerometer_disable, UASensorsAccelerometer*);31IMPLEMENT_FUNCTION1(UStatus, ua_sensors_accelerometer_disable, UASensorsAccelerometer*);
32IMPLEMENT_FUNCTION1(uint32_t, ua_sensors_accelerometer_get_min_delay, UASensorsAccelerometer*);32IMPLEMENT_FUNCTION1(uint32_t, ua_sensors_accelerometer_get_min_delay, UASensorsAccelerometer*);
33IMPLEMENT_SF_FUNCTION1(float, ua_sensors_accelerometer_get_min_value, UASensorsAccelerometer*);33IMPLEMENT_FUNCTION2(UStatus, ua_sensors_accelerometer_get_min_value, UASensorsAccelerometer*, float*);
34IMPLEMENT_SF_FUNCTION1(float, ua_sensors_accelerometer_get_max_value, UASensorsAccelerometer*);34IMPLEMENT_FUNCTION2(UStatus, ua_sensors_accelerometer_get_max_value, UASensorsAccelerometer*, float*);
35IMPLEMENT_SF_FUNCTION1(float, ua_sensors_accelerometer_get_resolution, UASensorsAccelerometer*);35IMPLEMENT_FUNCTION2(UStatus, ua_sensors_accelerometer_get_resolution, UASensorsAccelerometer*, float*);
36IMPLEMENT_VOID_FUNCTION3(ua_sensors_accelerometer_set_reading_cb, UASensorsAccelerometer*, on_accelerometer_event_cb, void*);36IMPLEMENT_VOID_FUNCTION3(ua_sensors_accelerometer_set_reading_cb, UASensorsAccelerometer*, on_accelerometer_event_cb, void*);
3737
38// Acceleration Sensor Event38// Acceleration Sensor Event
39IMPLEMENT_FUNCTION1(uint64_t, uas_accelerometer_event_get_timestamp, UASAccelerometerEvent*);39IMPLEMENT_FUNCTION1(uint64_t, uas_accelerometer_event_get_timestamp, UASAccelerometerEvent*);
40IMPLEMENT_SF_FUNCTION1(float, uas_accelerometer_event_get_acceleration_x, UASAccelerometerEvent*);40IMPLEMENT_FUNCTION2(UStatus, uas_accelerometer_event_get_acceleration_x, UASAccelerometerEvent*, float*);
41IMPLEMENT_SF_FUNCTION1(float, uas_accelerometer_event_get_acceleration_y, UASAccelerometerEvent*);41IMPLEMENT_FUNCTION2(UStatus, uas_accelerometer_event_get_acceleration_y, UASAccelerometerEvent*, float*);
42IMPLEMENT_SF_FUNCTION1(float, uas_accelerometer_event_get_acceleration_z, UASAccelerometerEvent*);42IMPLEMENT_FUNCTION2(UStatus, uas_accelerometer_event_get_acceleration_z, UASAccelerometerEvent*, float*);
4343
44// Proximity Sensor44// Proximity Sensor
45IMPLEMENT_CTOR0(UASensorsProximity*, ua_sensors_proximity_new);45IMPLEMENT_CTOR0(UASensorsProximity*, ua_sensors_proximity_new);
46IMPLEMENT_FUNCTION1(UStatus, ua_sensors_proximity_enable, UASensorsProximity*);46IMPLEMENT_FUNCTION1(UStatus, ua_sensors_proximity_enable, UASensorsProximity*);
47IMPLEMENT_FUNCTION1(UStatus, ua_sensors_proximity_disable, UASensorsProximity*);47IMPLEMENT_FUNCTION1(UStatus, ua_sensors_proximity_disable, UASensorsProximity*);
48IMPLEMENT_FUNCTION1(uint32_t, ua_sensors_proximity_get_min_delay, UASensorsProximity*);48IMPLEMENT_FUNCTION1(uint32_t, ua_sensors_proximity_get_min_delay, UASensorsProximity*);
49IMPLEMENT_SF_FUNCTION1(float, ua_sensors_proximity_get_min_value, UASensorsProximity*);49IMPLEMENT_FUNCTION2(UStatus, ua_sensors_proximity_get_min_value, UASensorsProximity*, float*);
50IMPLEMENT_SF_FUNCTION1(float, ua_sensors_proximity_get_max_value, UASensorsProximity*);50IMPLEMENT_FUNCTION2(UStatus, ua_sensors_proximity_get_max_value, UASensorsProximity*, float*);
51IMPLEMENT_SF_FUNCTION1(float, ua_sensors_proximity_get_resolution, UASensorsProximity*);51IMPLEMENT_FUNCTION2(UStatus, ua_sensors_proximity_get_resolution, UASensorsProximity*, float*);
52IMPLEMENT_VOID_FUNCTION3(ua_sensors_proximity_set_reading_cb, UASensorsProximity*, on_proximity_event_cb, void*);52IMPLEMENT_VOID_FUNCTION3(ua_sensors_proximity_set_reading_cb, UASensorsProximity*, on_proximity_event_cb, void*);
5353
54// Proximity Sensor Event54// Proximity Sensor Event
@@ -60,11 +60,11 @@
60IMPLEMENT_FUNCTION1(UStatus, ua_sensors_light_enable, UASensorsLight*);60IMPLEMENT_FUNCTION1(UStatus, ua_sensors_light_enable, UASensorsLight*);
61IMPLEMENT_FUNCTION1(UStatus, ua_sensors_light_disable, UASensorsLight*);61IMPLEMENT_FUNCTION1(UStatus, ua_sensors_light_disable, UASensorsLight*);
62IMPLEMENT_FUNCTION1(uint32_t, ua_sensors_light_get_min_delay, UASensorsLight*);62IMPLEMENT_FUNCTION1(uint32_t, ua_sensors_light_get_min_delay, UASensorsLight*);
63IMPLEMENT_SF_FUNCTION1(float, ua_sensors_light_get_min_value, UASensorsLight*);63IMPLEMENT_FUNCTION2(UStatus, ua_sensors_light_get_min_value, UASensorsLight*, float*);
64IMPLEMENT_SF_FUNCTION1(float, ua_sensors_light_get_max_value, UASensorsLight*);64IMPLEMENT_FUNCTION2(UStatus, ua_sensors_light_get_max_value, UASensorsLight*, float*);
65IMPLEMENT_SF_FUNCTION1(float, ua_sensors_light_get_resolution, UASensorsLight*);65IMPLEMENT_FUNCTION2(UStatus, ua_sensors_light_get_resolution, UASensorsLight*, float*);
66IMPLEMENT_VOID_FUNCTION3(ua_sensors_light_set_reading_cb, UASensorsLight*, on_light_event_cb, void*);66IMPLEMENT_VOID_FUNCTION3(ua_sensors_light_set_reading_cb, UASensorsLight*, on_light_event_cb, void*);
6767
68// Ambient Light Sensor Event68// Ambient Light Sensor Event
69IMPLEMENT_FUNCTION1(uint64_t, uas_light_event_get_timestamp, UASLightEvent*);69IMPLEMENT_FUNCTION1(uint64_t, uas_light_event_get_timestamp, UASLightEvent*);
70IMPLEMENT_SF_FUNCTION1(float, uas_light_event_get_light, UASLightEvent*);70IMPLEMENT_FUNCTION2(UStatus, uas_light_event_get_light, UASLightEvent*, float*);
7171
=== modified file 'src/ubuntu/touch/hybris/ubuntu_platform_hardware_api.cpp'
--- src/ubuntu/hybris/ubuntu_platform_hardware_api.cpp 2013-06-13 08:37:52 +0000
+++ src/ubuntu/touch/hybris/ubuntu_platform_hardware_api.cpp 2014-05-02 12:23:55 +0000
@@ -18,6 +18,7 @@
18 */18 */
1919
20// C APIs20// C APIs
21#include <ubuntu/hardware/alarm.h>
21#include <ubuntu/hardware/gps.h>22#include <ubuntu/hardware/gps.h>
2223
23#include "bridge.h"24#include "bridge.h"
@@ -76,3 +77,37 @@
76UHardwareGps, 77UHardwareGps,
77char*, 78char*,
78int);79int);
80
81/****************** HW ALARMS API ******************/
82
83IMPLEMENT_CTOR0(
84 UHardwareAlarm,
85 u_hardware_alarm_create);
86
87IMPLEMENT_VOID_FUNCTION1(
88 u_hardware_alarm_ref,
89 UHardwareAlarm);
90
91IMPLEMENT_VOID_FUNCTION1(
92 u_hardware_alarm_unref,
93 UHardwareAlarm);
94
95IMPLEMENT_FUNCTION2(
96 UStatus,
97 u_hardware_alarm_set_timezone,
98 UHardwareAlarm,
99 const struct timezone*);
100
101IMPLEMENT_FUNCTION4(
102 UStatus,
103 u_hardware_alarm_set_relative_to_with_behavior,
104 UHardwareAlarm,
105 UHardwareAlarmTimeReference,
106 UHardwareAlarmSleepBehavior,
107 const struct timespec*);
108
109IMPLEMENT_FUNCTION2(
110 UStatus,
111 u_hardware_alarm_wait_for_next_alarm,
112 UHardwareAlarm,
113 UHardwareAlarmWaitResult*);
79114
=== modified file 'tests/test_ubuntu_application_sensors.cpp'
--- tests/test_ubuntu_application_sensors.cpp 2014-02-07 12:24:32 +0000
+++ tests/test_ubuntu_application_sensors.cpp 2014-05-02 12:23:55 +0000
@@ -65,7 +65,7 @@
65 abort();65 abort();
66 }66 }
67 setenv("UBUNTU_PLATFORM_API_SENSOR_TEST", data_file, 1);67 setenv("UBUNTU_PLATFORM_API_SENSOR_TEST", data_file, 1);
68 setenv("UBUNTU_PLATFORM_API_BACKEND", "libubuntu_application_api_test.so.1", 1);68 setenv("UBUNTU_PLATFORM_API_SENSORS_BACKEND", "libubuntu_application_api_test.so.1", 1);
6969
70 // ensure the queue is clear70 // ensure the queue is clear
71 while (events.size() > 0)71 while (events.size() > 0)
@@ -110,9 +110,14 @@
110110
111 UASensorsAccelerometer *s = ua_sensors_accelerometer_new();111 UASensorsAccelerometer *s = ua_sensors_accelerometer_new();
112 EXPECT_TRUE(s != NULL);112 EXPECT_TRUE(s != NULL);
113 EXPECT_FLOAT_EQ(0.5, ua_sensors_accelerometer_get_min_value(s));113
114 EXPECT_FLOAT_EQ(1000.0, ua_sensors_accelerometer_get_max_value(s));114 float min = 0.f; ua_sensors_accelerometer_get_min_value(s, &min);
115 EXPECT_FLOAT_EQ(0.1, ua_sensors_accelerometer_get_resolution(s));115 float max = 0.f; ua_sensors_accelerometer_get_max_value(s, &max);
116 float res = 0.f; ua_sensors_accelerometer_get_resolution(s, &res);
117
118 EXPECT_FLOAT_EQ(0.5, min);
119 EXPECT_FLOAT_EQ(1000.0, max);
120 EXPECT_FLOAT_EQ(0.1, res);
116})121})
117122
118TESTP_F(SimBackendTest, CreateLight, {123TESTP_F(SimBackendTest, CreateLight, {
@@ -122,9 +127,14 @@
122127
123 UASensorsLight *s = ua_sensors_light_new();128 UASensorsLight *s = ua_sensors_light_new();
124 EXPECT_TRUE(s != NULL);129 EXPECT_TRUE(s != NULL);
125 EXPECT_FLOAT_EQ(0.0, ua_sensors_light_get_min_value(s));130
126 EXPECT_FLOAT_EQ(10.0, ua_sensors_light_get_max_value(s));131 float min = 0.f; ua_sensors_light_get_min_value(s, &min);
127 EXPECT_FLOAT_EQ(0.5, ua_sensors_light_get_resolution(s));132 float max = 0.f; ua_sensors_light_get_max_value(s, &max);
133 float res = 0.f; ua_sensors_light_get_resolution(s, &res);
134
135 EXPECT_FLOAT_EQ(0.0, min);
136 EXPECT_FLOAT_EQ(10.0, max);
137 EXPECT_FLOAT_EQ(0.5, res);
128})138})
129139
130TESTP_F(SimBackendTest, ProximityEvents, {140TESTP_F(SimBackendTest, ProximityEvents, {
@@ -191,8 +201,10 @@
191201
192 ua_sensors_light_set_reading_cb(s,202 ua_sensors_light_set_reading_cb(s,
193 [](UASLightEvent* ev, void* ctx) {203 [](UASLightEvent* ev, void* ctx) {
204 float light = -1.f;
205 uas_light_event_get_light(ev, &light);
194 events.push({uas_light_event_get_timestamp(ev),206 events.push({uas_light_event_get_timestamp(ev),
195 uas_light_event_get_light(ev), .0, .0,207 light, .0, .0,
196 (UASProximityDistance) 0, ctx});208 (UASProximityDistance) 0, ctx});
197 }, NULL);209 }, NULL);
198210
@@ -229,10 +241,14 @@
229241
230 ua_sensors_accelerometer_set_reading_cb(s,242 ua_sensors_accelerometer_set_reading_cb(s,
231 [](UASAccelerometerEvent* ev, void* ctx) {243 [](UASAccelerometerEvent* ev, void* ctx) {
244 float x; uas_accelerometer_event_get_acceleration_x(ev, &x);
245 float y; uas_accelerometer_event_get_acceleration_y(ev, &y);
246 float z; uas_accelerometer_event_get_acceleration_z(ev, &z);
247
232 events.push({uas_accelerometer_event_get_timestamp(ev),248 events.push({uas_accelerometer_event_get_timestamp(ev),
233 uas_accelerometer_event_get_acceleration_x(ev),249 x,
234 uas_accelerometer_event_get_acceleration_y(ev),250 y,
235 uas_accelerometer_event_get_acceleration_z(ev),251 z,
236 (UASProximityDistance) 0, ctx});252 (UASProximityDistance) 0, ctx});
237 }, NULL);253 }, NULL);
238254
@@ -274,8 +290,12 @@
274 // calling its functions should not crash; we can't assert much about290 // calling its functions should not crash; we can't assert much about
275 // their actual values, though291 // their actual values, though
276 ua_sensors_proximity_enable(s);292 ua_sensors_proximity_enable(s);
277 EXPECT_LE(ua_sensors_proximity_get_min_value(s), ua_sensors_proximity_get_max_value(s));293 float min; ua_sensors_proximity_get_min_value(s, &min);
278 ua_sensors_proximity_get_resolution(s);294 float max; ua_sensors_proximity_get_max_value(s, &max);
295
296 EXPECT_LE(min, max);
297
298 float res; ua_sensors_proximity_get_resolution(s, &res);
279 ua_sensors_proximity_disable(s);299 ua_sensors_proximity_disable(s);
280 } else {300 } else {
281 cerr << "no proximity sensor on this hardware\n";301 cerr << "no proximity sensor on this hardware\n";
@@ -291,8 +311,12 @@
291 // calling its functions should not crash; we can't assert much about311 // calling its functions should not crash; we can't assert much about
292 // their actual values, though312 // their actual values, though
293 ua_sensors_accelerometer_enable(s);313 ua_sensors_accelerometer_enable(s);
294 EXPECT_LE(ua_sensors_accelerometer_get_min_value(s), ua_sensors_accelerometer_get_max_value(s));314 float min; ua_sensors_accelerometer_get_min_value(s, &min);
295 ua_sensors_accelerometer_get_resolution(s);315 float max; ua_sensors_accelerometer_get_max_value(s, &max);
316
317 EXPECT_LE(min, max);
318
319 float res; ua_sensors_accelerometer_get_resolution(s, &res);
296 ua_sensors_accelerometer_disable(s);320 ua_sensors_accelerometer_disable(s);
297 } else {321 } else {
298 cerr << "no accelerometer sensor on this hardware\n";322 cerr << "no accelerometer sensor on this hardware\n";
@@ -308,8 +332,12 @@
308 // calling its functions should not crash; we can't assert much about332 // calling its functions should not crash; we can't assert much about
309 // their actual values, though333 // their actual values, though
310 ua_sensors_light_enable(s);334 ua_sensors_light_enable(s);
311 EXPECT_LE(ua_sensors_light_get_min_value(s), ua_sensors_light_get_max_value(s));335 float min; ua_sensors_light_get_min_value(s, &min);
312 ua_sensors_light_get_resolution(s);336 float max; ua_sensors_light_get_max_value(s, &max);
337
338 EXPECT_LE(min, max);
339
340 float res; ua_sensors_light_get_resolution(s, &res);
313 ua_sensors_light_disable(s);341 ua_sensors_light_disable(s);
314 } else {342 } else {
315 cerr << "no light sensor on this hardware\n";343 cerr << "no light sensor on this hardware\n";

Subscribers

People subscribed via source and target branches