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

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

Commit message

Add readonly notifyable property "orientation" to Window

Description of the change

Add window orientation property

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

Add newline to warning message

262. By Gerry Boland

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

263. By Gerry Boland

Merge trunk. Bump to version 2.4.0

Unmerged revisions

263. By Gerry Boland

Merge trunk. Bump to version 2.4.0

262. By Gerry Boland

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

261. By Gerry Boland

Add newline to warning message

260. By Gerry Boland

Merge trunk & update changelog

259. By Gerry Boland

Small tweaks to fix build and syntax

258. By Gerry Boland

Add readonly notifyable property "orientation" to Window

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-05-07 12:21:22 +0000
3+++ CMakeLists.txt 2014-08-26 16:06:15 +0000
4@@ -2,8 +2,8 @@
5
6 project(ubuntu-platform-api)
7
8-set(UBUNTU_PLATFORM_API_VERSION_MAJOR 1)
9-set(UBUNTU_PLATFORM_API_VERSION_MINOR 1)
10+set(UBUNTU_PLATFORM_API_VERSION_MAJOR 2)
11+set(UBUNTU_PLATFORM_API_VERSION_MINOR 2)
12 set(UBUNTU_PLATFORM_API_VERSION_PATCH 0)
13
14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
15@@ -57,35 +57,13 @@
16 ON
17 )
18
19-option(
20- ENABLE_MIRSERVER_IMPLEMENTATION
21- "Enable mirserver based platorm API implementation"
22- OFF
23-)
24-
25-if(ENABLE_MIRSERVER_IMPLEMENTATION)
26- find_package(PkgConfig)
27- pkg_check_modules(MIRSERVER REQUIRED mirserver)
28-endif(ENABLE_MIRSERVER_IMPLEMENTATION)
29-
30-option(
31- ENABLE_MIRCLIENT_IMPLEMENTATION
32- "Enable mirclient based platform API implementation"
33- OFF
34-)
35-
36-if(ENABLE_MIRCLIENT_IMPLEMENTATION)
37- find_package(PkgConfig)
38- pkg_check_modules(MIRCLIENT REQUIRED mirclient)
39-
40- find_package(Protobuf REQUIRED)
41- if(PROTOBUF_PROTOC_EXECUTABLE STREQUAL "PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND")
42- message(SEND_ERROR "protoc executable not found! Missing protobuf-compiler package?")
43- endif()
44-endif(ENABLE_MIRCLIENT_IMPLEMENTATION)
45-
46-if(ENABLE_MIRCLIENT_IMPLEMENTATION OR ENABLE_MIRSERVER_IMPLEMENTATION)
47- pkg_check_modules(MIRCOMMON REQUIRED mircommon)
48+find_package(PkgConfig)
49+pkg_check_modules(MIRSERVER REQUIRED mirserver)
50+pkg_check_modules(MIRCLIENT REQUIRED mirclient)
51+
52+find_package(Protobuf REQUIRED)
53+if(PROTOBUF_PROTOC_EXECUTABLE STREQUAL "PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND")
54+ message(SEND_ERROR "protoc executable not found! Missing protobuf-compiler package?")
55 endif()
56
57 # Try to find hybris, and disable hybris from build if not found
58@@ -105,6 +83,7 @@
59 add_subdirectory(doc/)
60 add_subdirectory(include/)
61 add_subdirectory(src/)
62+add_subdirectory(examples/)
63
64 #### Enable tests
65 include(CTest)
66
67=== modified file 'android/default/default_ubuntu_application_sensor.cpp'
68--- android/default/default_ubuntu_application_sensor.cpp 2014-02-13 14:04:30 +0000
69+++ android/default/default_ubuntu_application_sensor.cpp 2014-08-26 16:06:15 +0000
70@@ -17,10 +17,10 @@
71 * Ricardo Mendoza <ricardo.mendoza@canonical.com>
72 */
73
74-#include <ubuntu/application/sensors/ubuntu_application_sensors.h>
75 #include <ubuntu/application/sensors/accelerometer.h>
76 #include <ubuntu/application/sensors/proximity.h>
77 #include <ubuntu/application/sensors/light.h>
78+#include <ubuntu/application/sensors/orientation.h>
79
80 #include <private/application/sensors/sensor.h>
81 #include <private/application/sensors/sensor_listener.h>
82@@ -55,7 +55,8 @@
83 {
84 SensorListener() : on_accelerometer_event(NULL),
85 on_proximity_event(NULL),
86- on_light_event(NULL)
87+ on_light_event(NULL),
88+ on_orientation_event(NULL)
89 {
90 }
91
92@@ -63,6 +64,25 @@
93 {
94 switch(sensor_type)
95 {
96+ case ubuntu::application::sensors::sensor_type_orientation:
97+ {
98+ if (!on_orientation_event)
99+ return;
100+
101+ ubuntu::application::sensors::OrientationEvent::Ptr ev(
102+ new ubuntu::application::sensors::OrientationEvent(
103+ reading->timestamp,
104+ reading->vector[0],
105+ reading->vector[1],
106+ reading->vector[2])
107+ );
108+
109+ on_orientation_event(
110+ make_holder(ev), this->context
111+ );
112+
113+ break;
114+ }
115 case ubuntu::application::sensors::sensor_type_accelerometer:
116 {
117 if (!on_accelerometer_event)
118@@ -122,12 +142,15 @@
119 on_accelerometer_event_cb on_accelerometer_event;
120 on_proximity_event_cb on_proximity_event;
121 on_light_event_cb on_light_event;
122+ on_orientation_event_cb on_orientation_event;
123 void *context;
124 };
125
126+ubuntu::application::sensors::Sensor::Ptr orientation;
127 ubuntu::application::sensors::Sensor::Ptr accelerometer;
128 ubuntu::application::sensors::Sensor::Ptr proximity;
129 ubuntu::application::sensors::Sensor::Ptr light;
130+ubuntu::application::sensors::SensorListener::Ptr orientation_listener;
131 ubuntu::application::sensors::SensorListener::Ptr accelerometer_listener;
132 ubuntu::application::sensors::SensorListener::Ptr proximity_listener;
133 ubuntu::application::sensors::SensorListener::Ptr light_listener;
134@@ -266,6 +289,22 @@
135 s->register_listener(proximity_listener);
136 }
137
138+UStatus
139+ua_sensors_proximity_set_event_rate(
140+ UASensorsProximity* sensor,
141+ uint32_t rate)
142+{
143+ if (sensor == NULL)
144+ return U_STATUS_ERROR;
145+
146+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
147+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
148+ if (!s->set_event_rate(rate))
149+ return U_STATUS_ERROR;
150+
151+ return U_STATUS_SUCCESS;
152+}
153+
154 uint64_t
155 uas_proximity_event_get_timestamp(
156 UASProximityEvent* event)
157@@ -410,6 +449,22 @@
158 s->register_listener(light_listener);
159 }
160
161+UStatus
162+ua_sensors_light_set_event_rate(
163+ UASensorsLight* sensor,
164+ uint32_t rate)
165+{
166+ if (sensor == NULL)
167+ return U_STATUS_ERROR;
168+
169+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
170+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
171+ if (!s->set_event_rate(rate))
172+ return U_STATUS_ERROR;
173+
174+ return U_STATUS_SUCCESS;
175+}
176+
177 uint64_t
178 uas_light_event_get_timestamp(
179 UASLightEvent* event)
180@@ -554,6 +609,22 @@
181 s->register_listener(accelerometer_listener);
182 }
183
184+UStatus
185+ua_sensors_accelerometer_set_event_rate(
186+ UASensorsAccelerometer* sensor,
187+ uint32_t rate)
188+{
189+ if (sensor == NULL)
190+ return U_STATUS_ERROR;
191+
192+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
193+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
194+ if (!s->set_event_rate(rate))
195+ return U_STATUS_ERROR;
196+
197+ return U_STATUS_SUCCESS;
198+}
199+
200 uint64_t
201 uas_accelerometer_event_get_timestamp(
202 UASAccelerometerEvent* event)
203@@ -603,3 +674,191 @@
204
205 return U_STATUS_SUCCESS;
206 }
207+
208+/*
209+ * Orientation Sensor
210+ */
211+
212+UASensorsOrientation*
213+ua_sensors_orientation_new()
214+{
215+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
216+ orientation =
217+ ubuntu::application::sensors::SensorService::sensor_for_type(
218+ ubuntu::application::sensors::sensor_type_orientation);
219+
220+ return orientation.get();
221+}
222+
223+UStatus
224+ua_sensors_orientation_enable(
225+ UASensorsOrientation* sensor)
226+{
227+ if (sensor == NULL)
228+ return U_STATUS_ERROR;
229+
230+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
231+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
232+
233+ s->enable();
234+
235+ return U_STATUS_SUCCESS;
236+}
237+
238+UStatus
239+ua_sensors_orientation_disable(
240+ UASensorsOrientation* sensor)
241+{
242+ if (sensor == NULL)
243+ return U_STATUS_ERROR;
244+
245+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
246+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
247+ s->disable();
248+
249+ return U_STATUS_SUCCESS;
250+}
251+
252+uint32_t
253+ua_sensors_orientation_get_min_delay(
254+ UASensorsOrientation* sensor)
255+{
256+ if (sensor == NULL)
257+ return -1;
258+
259+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
260+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
261+ return toHz(s->min_delay());
262+}
263+
264+UStatus
265+ua_sensors_orientation_get_min_value(
266+ UASensorsOrientation* sensor,
267+ float* value)
268+{
269+ if (sensor == NULL || value == NULL)
270+ return U_STATUS_ERROR;
271+
272+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
273+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
274+ *value = s->min_value();
275+
276+ return U_STATUS_SUCCESS;
277+}
278+
279+UStatus
280+ua_sensors_orientation_get_max_value(
281+ UASensorsOrientation* sensor,
282+ float* value)
283+{
284+ if (sensor == NULL || value == NULL)
285+ return U_STATUS_ERROR;
286+
287+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
288+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
289+ *value = s->max_value();
290+
291+ return U_STATUS_SUCCESS;
292+}
293+
294+UStatus
295+ua_sensors_orientation_get_resolution(
296+ UASensorsOrientation* sensor,
297+ float* value)
298+{
299+ if (sensor == NULL || value == NULL)
300+ return U_STATUS_ERROR;
301+
302+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
303+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
304+ *value = s->resolution();
305+
306+ return U_STATUS_SUCCESS;
307+}
308+
309+void
310+ua_sensors_orientation_set_reading_cb(
311+ UASensorsOrientation* sensor,
312+ on_orientation_event_cb cb,
313+ void *ctx)
314+{
315+ if (sensor == NULL)
316+ return;
317+
318+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
319+
320+ SensorListener<ubuntu::application::sensors::sensor_type_orientation>* sl
321+ = new SensorListener<ubuntu::application::sensors::sensor_type_orientation>();
322+
323+ sl->on_orientation_event = cb;
324+ sl->context = ctx;
325+
326+ orientation_listener = sl;
327+ s->register_listener(orientation_listener);
328+}
329+
330+UStatus
331+ua_sensors_orientation_set_event_rate(
332+ UASensorsOrientation* sensor,
333+ uint32_t rate)
334+{
335+ if (sensor == NULL)
336+ return U_STATUS_ERROR;
337+
338+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
339+ auto s = static_cast<ubuntu::application::sensors::Sensor*>(sensor);
340+ if (!s->set_event_rate(rate))
341+ return U_STATUS_ERROR;
342+
343+ return U_STATUS_SUCCESS;
344+}
345+
346+uint64_t
347+uas_orientation_event_get_timestamp(
348+ UASOrientationEvent* event)
349+{
350+ auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
351+ return ev->value->get_timestamp();
352+}
353+
354+UStatus
355+uas_orientation_event_get_azimuth(
356+ UASOrientationEvent* event,
357+ float* value)
358+{
359+ if (event == NULL || value == NULL)
360+ return U_STATUS_ERROR;
361+
362+ auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
363+ *value = ev->value->get_azimuth();
364+
365+ return U_STATUS_SUCCESS;
366+}
367+
368+UStatus
369+uas_orientation_event_get_pitch(
370+ UASOrientationEvent* event,
371+ float* value)
372+{
373+ if (event == NULL || value == NULL)
374+ return U_STATUS_ERROR;
375+
376+ auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
377+ *value = ev->value->get_pitch();
378+
379+ return U_STATUS_SUCCESS;
380+}
381+
382+UStatus
383+uas_orientation_event_get_roll(
384+ UASOrientationEvent* event,
385+ float* value)
386+{
387+ if (event == NULL || value == NULL)
388+ return U_STATUS_ERROR;
389+
390+ auto ev = static_cast<Holder<ubuntu::application::sensors::OrientationEvent::Ptr>*>(event);
391+ *value = ev->value->get_roll();
392+
393+ return U_STATUS_SUCCESS;
394+}
395
396=== modified file 'android/default/default_ubuntu_application_ui.cpp'
397--- android/default/default_ubuntu_application_ui.cpp 2013-12-11 06:11:34 +0000
398+++ android/default/default_ubuntu_application_ui.cpp 2014-08-26 16:06:15 +0000
399@@ -229,6 +229,11 @@
400 }
401
402 void
403+ua_ui_window_properties_set_event_cb_and_ctx(UAUiWindowProperties*, UAUiWindowEventCb, void *)
404+{
405+}
406+
407+void
408 ua_ui_window_properties_set_dimensions(
409 UAUiWindowProperties *properties,
410 uint32_t width,
411@@ -438,3 +443,14 @@
412 auto p = static_cast<Holder<ubuntu::application::ui::Surface::Ptr>*>(window);
413 return p->value->to_native_window_type();
414 }
415+
416+UApplicationUiWindowOrientation
417+ua_ui_window_get_orientation(
418+ UAUiWindow *window)
419+{
420+ ALOGI("%s():%d", __PRETTY_FUNCTION__, __LINE__);
421+
422+ auto p = static_cast<Holder<ubuntu::application::ui::Surface::Ptr>*>(window);
423+ return p->value->get_orientation();
424+}
425+
426
427=== modified file 'android/hybris/test_sensors_c_api.cpp'
428--- android/hybris/test_sensors_c_api.cpp 2014-02-13 14:06:55 +0000
429+++ android/hybris/test_sensors_c_api.cpp 2014-08-26 16:06:15 +0000
430@@ -19,18 +19,22 @@
431 #include <stdint.h>
432 #include <stdio.h>
433 #include <string.h>
434+#define __STDC_FORMAT_MACROS
435+#include <inttypes.h>
436
437 #include <ubuntu/application/sensors/accelerometer.h>
438 #include <ubuntu/application/sensors/proximity.h>
439 #include <ubuntu/application/sensors/light.h>
440+#include <ubuntu/application/sensors/orientation.h>
441
442 void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)
443 {
444- printf("%s \n", __PRETTY_FUNCTION__);
445 float x; uas_accelerometer_event_get_acceleration_x(event, &x);
446- float y; uas_accelerometer_event_get_acceleration_x(event, &y);
447- float z; uas_accelerometer_event_get_acceleration_x(event, &z);
448- printf("\ttime: %llu\n", uas_accelerometer_event_get_timestamp(event));
449+ float y; uas_accelerometer_event_get_acceleration_y(event, &y);
450+ float z; uas_accelerometer_event_get_acceleration_z(event, &z);
451+
452+ printf("%s \n", __PRETTY_FUNCTION__);
453+ printf("\ttime: %" PRIu64 "\n", uas_accelerometer_event_get_timestamp(event));
454 printf("\tx: %f\n", x);
455 printf("\ty: %f\n", y);
456 printf("\tz: %f\n", z);
457@@ -39,7 +43,7 @@
458 void on_new_proximity_event(UASProximityEvent* event, void* context)
459 {
460 printf("%s \n", __PRETTY_FUNCTION__);
461- printf("\ttime: %llu\n", uas_proximity_event_get_timestamp(event));
462+ printf("\ttime: %" PRIu64 "\n", uas_proximity_event_get_timestamp(event));
463
464 switch (uas_proximity_event_get_distance(event))
465 {
466@@ -58,17 +62,32 @@
467
468 void on_new_light_event(UASLightEvent* event, void* context)
469 {
470+ float light = -1.f; uas_light_event_get_light(event, &light);
471+
472 printf("%s \n", __PRETTY_FUNCTION__);
473- printf("\ttime: %llu\n", uas_light_event_get_timestamp(event));
474- float light; uas_light_event_get_light(event, &light);
475+ printf("\ttime: %" PRIu64 "\n", uas_light_event_get_timestamp(event));
476 printf("\tlight: %f\n", light);
477 }
478
479+void on_new_orientation_event(UASOrientationEvent* event, void* context)
480+{
481+ float x; uas_orientation_event_get_azimuth(event, &x);
482+ float y; uas_orientation_event_get_pitch(event, &y);
483+ float z; uas_orientation_event_get_roll(event, &z);
484+
485+ printf("%s \n", __PRETTY_FUNCTION__);
486+ printf("\ttime: %" PRIu64 "\n", uas_orientation_event_get_timestamp(event));
487+ printf("\tx: %f\n", x);
488+ printf("\ty: %f\n", y);
489+ printf("\tz: %f\n", z);
490+}
491+
492 int main(int argc, char** argv)
493 {
494 UASensorsAccelerometer* accelerometer = ua_sensors_accelerometer_new();
495 UASensorsProximity* proximity = ua_sensors_proximity_new();
496 UASensorsLight* ambientlight = ua_sensors_light_new();
497+ UASensorsOrientation* orientation = ua_sensors_orientation_new();
498
499 ua_sensors_accelerometer_set_reading_cb(accelerometer,
500 on_new_accelerometer_event,
501@@ -82,9 +101,14 @@
502 on_new_light_event,
503 NULL);
504
505+ ua_sensors_orientation_set_reading_cb(orientation,
506+ on_new_orientation_event,
507+ NULL);
508+
509 ua_sensors_accelerometer_enable(accelerometer);
510 ua_sensors_proximity_enable(proximity);
511 ua_sensors_light_enable(ambientlight);
512+ ua_sensors_orientation_enable(orientation);
513
514 while(true)
515 {
516
517=== modified file 'android/hybris/ubuntu_application_gps_for_hybris.cpp'
518--- android/hybris/ubuntu_application_gps_for_hybris.cpp 2013-06-14 11:42:24 +0000
519+++ android/hybris/ubuntu_application_gps_for_hybris.cpp 2014-08-26 16:06:15 +0000
520@@ -36,7 +36,15 @@
521 bool stop();
522 void inject_time(int64_t time, int64_t timeReference, int uncertainty);
523 void inject_location(double latitude, double longitude, float accuracy);
524- void delete_aiding_data(uint16_t flags);
525+ void delete_aiding_data(UHardwareGpsAidingData flags);
526+
527+ void set_server_for_type(UHardwareGpsAGpsType type, const char* hostname, uint16_t port);
528+ void set_reference_location(UHardwareGpsAGpsRefLocation* location, size_t size_of_struct);
529+
530+ void notify_connection_is_open(const char* apn);
531+ void notify_connection_is_closed();
532+ void notify_connection_not_available();
533+
534 bool set_position_mode(uint32_t mode, uint32_t recurrence, uint32_t min_interval,
535 uint32_t preferred_accuracy, uint32_t preferred_time);
536 void inject_xtra_data(char* data, int length);
537@@ -344,7 +352,7 @@
538
539 void UHardwareGps_::inject_location(double latitude, double longitude, float accuracy)
540 {
541- if (gps_interface)
542+ if (gps_interface && gps_interface->inject_location)
543 gps_interface->inject_location(latitude, longitude, accuracy);
544 }
545
546@@ -354,6 +362,44 @@
547 gps_interface->delete_aiding_data(flags);
548 }
549
550+void UHardwareGps_::set_server_for_type(UHardwareGpsAGpsType type, const char* hostname, uint16_t port)
551+{
552+ if (agps_interface && agps_interface->set_server)
553+ agps_interface->set_server(type, hostname, port);
554+}
555+
556+void UHardwareGps_::set_reference_location(UHardwareGpsAGpsRefLocation* location, size_t size_of_struct)
557+{
558+ AGpsRefLocation ref_loc;
559+ ref_loc.type = location->type;
560+ ref_loc.u.cellID.type = location->u.cellID.type;
561+ ref_loc.u.cellID.mcc = location->u.cellID.mcc;
562+ ref_loc.u.cellID.mnc = location->u.cellID.mnc;
563+ ref_loc.u.cellID.lac = location->u.cellID.lac;
564+ ref_loc.u.cellID.cid = location->u.cellID.cid;
565+
566+ if (agps_ril_interface && agps_ril_interface->set_ref_location)
567+ agps_ril_interface->set_ref_location(&ref_loc, sizeof(ref_loc));
568+}
569+
570+void UHardwareGps_::notify_connection_is_open(const char* apn)
571+{
572+ if (agps_interface && agps_interface->data_conn_open)
573+ agps_interface->data_conn_open(apn);
574+}
575+
576+void UHardwareGps_::notify_connection_is_closed()
577+{
578+ if (agps_interface && agps_interface->data_conn_closed)
579+ agps_interface->data_conn_closed();
580+}
581+
582+void UHardwareGps_::notify_connection_not_available()
583+{
584+ if (agps_interface && agps_interface->data_conn_failed)
585+ agps_interface->data_conn_failed();
586+}
587+
588 bool UHardwareGps_::set_position_mode(uint32_t mode, uint32_t recurrence, uint32_t min_interval,
589 uint32_t preferred_accuracy, uint32_t preferred_time)
590 {
591@@ -413,17 +459,53 @@
592 self->inject_time(time, time_reference, uncertainty);
593 }
594
595-void u_hardware_gps_inject_location(UHardwareGps self, double latitude, double longitude,
596- float accuracy)
597+void u_hardware_gps_inject_location(UHardwareGps self,
598+ UHardwareGpsLocation location)
599 {
600- self->inject_location(latitude, longitude, accuracy);
601+ self->inject_location(location.latitude, location.longitude,
602+ location.accuracy);
603 }
604
605-void u_hardware_gps_delete_aiding_data(UHardwareGps self, uint16_t flags)
606+void u_hardware_gps_delete_aiding_data(UHardwareGps self, UHardwareGpsAidingData flags)
607 {
608 self->delete_aiding_data(flags);
609 }
610
611+void u_hardware_gps_agps_set_server_for_type(
612+ UHardwareGps self,
613+ UHardwareGpsAGpsType type,
614+ const char* hostname,
615+ uint16_t port)
616+{
617+ self->set_server_for_type(type, hostname, port);
618+}
619+
620+void u_hardware_gps_agps_set_reference_location(
621+ UHardwareGps self,
622+ UHardwareGpsAGpsRefLocation *location,
623+ size_t size_of_struct)
624+{
625+ self->set_reference_location(location, size_of_struct);
626+}
627+
628+void u_hardware_gps_agps_notify_connection_is_open(
629+ UHardwareGps self,
630+ const char *apn)
631+{
632+ self->notify_connection_is_open(apn);
633+}
634+
635+void u_hardware_gps_agps_notify_connection_is_closed(UHardwareGps self)
636+{
637+ self->notify_connection_is_closed();
638+}
639+
640+void u_hardware_gps_agps_notify_connection_not_available(UHardwareGps self)
641+{
642+ self->notify_connection_not_available();
643+}
644+
645+
646 bool u_hardware_gps_set_position_mode(UHardwareGps self, uint32_t mode, uint32_t recurrence,
647 uint32_t min_interval, uint32_t preferred_accuracy,
648 uint32_t preferred_time)
649
650=== modified file 'android/hybris/ubuntu_application_sensors_for_hybris.cpp'
651--- android/hybris/ubuntu_application_sensors_for_hybris.cpp 2013-05-30 02:03:42 +0000
652+++ android/hybris/ubuntu_application_sensors_for_hybris.cpp 2014-08-26 16:06:15 +0000
653@@ -162,6 +162,11 @@
654 return sensor->getPowerUsage();
655 }
656
657+ int set_event_rate(uint32_t nsecs)
658+ {
659+ return sensor_event_queue->setEventRate(sensor, nsecs);
660+ }
661+
662 const android::Sensor* sensor;
663 ubuntu::application::sensors::SensorListener::Ptr listener;
664 android::List<ubuntu::application::sensors::SensorListener::Ptr> listeners;
665
666=== modified file 'android/include/private/application/sensors/events.h'
667--- android/include/private/application/sensors/events.h 2013-05-30 02:03:42 +0000
668+++ android/include/private/application/sensors/events.h 2014-08-26 16:06:15 +0000
669@@ -28,6 +28,40 @@
670 {
671 namespace sensors
672 {
673+class OrientationEvent : public platform::ReferenceCountedBase
674+{
675+public:
676+ OrientationEvent(uint64_t timestamp, float azimuth, float pitch, float roll)
677+ : timestamp(timestamp),
678+ azimuth(azimuth),
679+ pitch(pitch),
680+ roll(roll)
681+ {}
682+
683+ typedef ubuntu::platform::shared_ptr<OrientationEvent> Ptr;
684+
685+ uint64_t get_timestamp()
686+ {
687+ return this->timestamp;
688+ }
689+
690+ float get_azimuth() { return this->azimuth; }
691+ float get_pitch() { return this->pitch; }
692+ float get_roll() { return this->roll; }
693+
694+private:
695+ uint64_t timestamp;
696+ float azimuth;
697+ float pitch;
698+ float roll;
699+
700+protected:
701+ virtual ~OrientationEvent() {}
702+
703+ OrientationEvent(const OrientationEvent&) = delete;
704+ OrientationEvent& operator=(const OrientationEvent&) = delete;
705+};
706+
707 class AccelerometerEvent : public platform::ReferenceCountedBase
708 {
709 public:
710
711=== modified file 'android/include/private/application/sensors/sensor.h'
712--- android/include/private/application/sensors/sensor.h 2013-05-30 02:03:42 +0000
713+++ android/include/private/application/sensors/sensor.h 2014-08-26 16:06:15 +0000
714@@ -66,6 +66,9 @@
715 /** Returns an estimate of the sensor's power consumption, normalized to [0,1]. */
716 virtual float power_consumption() = 0;
717
718+ /** Set event delivery rate for the given sensor, in nanoseconds */
719+ virtual int set_event_rate(uint32_t nsecs) = 0;
720+
721 /** Returns the minimum delay between two consecutive sensor readings. */
722 virtual int32_t min_delay() = 0;
723
724
725=== removed file 'android/include/private/application/ui/input/event.h'
726--- android/include/private/application/ui/input/event.h 2013-05-21 20:54:48 +0000
727+++ android/include/private/application/ui/input/event.h 1970-01-01 00:00:00 +0000
728@@ -1,106 +0,0 @@
729-/*
730- * Copyright © 2012 Canonical Ltd.
731- *
732- * This program is free software: you can redistribute it and/or modify
733- * it under the terms of the GNU Lesser General Public License version 3 as
734- * published by the Free Software Foundation.
735- *
736- * This program is distributed in the hope that it will be useful,
737- * but WITHOUT ANY WARRANTY; without even the implied warranty of
738- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
739- * GNU Lesser General Public License for more details.
740- *
741- * You should have received a copy of the GNU Lesser General Public License
742- * along with this program. If not, see <http://www.gnu.org/licenses/>.
743- *
744- * Authored by: Thomas Voß <thomas.voss@canonical.com>
745- */
746-#ifndef UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
747-#define UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
748-
749-#include <stddef.h>
750-#include <stdint.h>
751-
752-#ifdef __cplusplus
753-extern "C" {
754-#endif
755-
756- /** Maximum number of pointers reported within one input event. */
757-#define UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT (16)
758-
759- /** Reference timebase, nanoseconds as measured by CLOCK_MONOTONIC. */
760- typedef int64_t nsecs_t;
761-
762- /** Describes the different event types. */
763- typedef enum
764- {
765- KEY_EVENT_TYPE, ///< Event originates from a keyboard.
766- MOTION_EVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
767- HW_SWITCH_EVENT_TYPE ///< Event originates from an additional button attached to the device's HW, e.g., power button.
768- } EventType;
769-
770- /** Models an input event. */
771- typedef struct
772- {
773- EventType type; ///< Type of the event.
774- int32_t device_id; ///< Device that this event originated from.
775- int32_t source_id; ///< Source that this event originated from.
776- int32_t action; ///< Action signalled by this event.
777- int32_t flags; ///< Flags associated with this event.
778- int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
779- /** Information specific to key/motion event types. */
780- union
781- {
782- /** Information describing an event originating from a HW switch. */
783- struct HardwareSwitchEvent
784- {
785- nsecs_t event_time; ///< Timestamp when the event happened.
786- uint32_t policy_flags; ///< Policy flags.
787- int32_t switch_code; ///< The scan code of the switch.
788- int32_t switch_value; ///< The value reported by the switch.
789- } hw_switch;
790- /** Information describing an event originating from a keyboard key. */
791- struct KeyEvent
792- {
793- int32_t key_code;
794- int32_t scan_code;
795- int32_t repeat_count;
796- nsecs_t down_time;
797- nsecs_t event_time;
798- int is_system_key; ///< \deprecated Do not use.
799- } key;
800- /** Information describing an event originating from a
801- * "moving" device, e.g., a mouse, a mouse-wheel, a finger
802- * on a touchpad.
803- */
804- struct MotionEvent
805- {
806- int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
807- int32_t button_state; ///< State of buttons of the device
808- float x_offset; ///< Movement in x direction since down event
809- float y_offset; ///< Movement in y direction since down event
810- float x_precision; ///< Sampling precision in x direction
811- float y_precision; ///< Sampling precision in y direction
812- nsecs_t down_time; ///< Timestamp that marks the down event
813- nsecs_t event_time; ///< Timestamp that marks when this event happened
814- size_t pointer_count; ///< Number of pointers reported in this event
815- struct PointerCoordinate
816- {
817- int id; ///< Unique id of the pointer
818- float x, raw_x; ///< Processed and raw x coordinates
819- float y, raw_y; ///< Processed and raw y coordinates
820- float touch_major; ///< Touch major coordinate
821- float touch_minor; ///< Touch minor coordinate
822- float size; ///< Size of the pointer/touch
823- float pressure; ///< Pressure of the touch
824- float orientation; ///< Orientation
825- } pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
826- } motion;
827- } details;
828- } Event;
829-
830-#ifdef __cplusplus
831-}
832-#endif
833-
834-#endif // UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
835
836=== modified file 'android/include/private/application/ui/input/listener.h'
837--- android/include/private/application/ui/input/listener.h 2013-05-21 20:54:48 +0000
838+++ android/include/private/application/ui/input/listener.h 2014-08-26 16:06:15 +0000
839@@ -18,7 +18,7 @@
840 #ifndef UBUNTU_APPLICATION_UI_INPUT_LISTENER_H_
841 #define UBUNTU_APPLICATION_UI_INPUT_LISTENER_H_
842
843-#include "private/application/ui/input/event.h"
844+#include "ubuntu/application/ui/input/event.h"
845 #include "private/platform/shared_ptr.h"
846
847 namespace ubuntu
848
849=== modified file 'data/CMakeLists.txt'
850--- data/CMakeLists.txt 2013-06-13 12:04:14 +0000
851+++ data/CMakeLists.txt 2014-08-26 16:06:15 +0000
852@@ -2,7 +2,11 @@
853 ubuntu-platform-api.pc.in ubuntu-platform-api.pc @ONLY
854 )
855
856+configure_file(
857+ ubuntu-platform-hardware-api.pc.in ubuntu-platform-hardware-api.pc @ONLY
858+)
859+
860 install(
861- FILES ${CMAKE_CURRENT_BINARY_DIR}/ubuntu-platform-api.pc
862+ FILES ${CMAKE_CURRENT_BINARY_DIR}/ubuntu-platform-api.pc ${CMAKE_CURRENT_BINARY_DIR}/ubuntu-platform-hardware-api.pc
863 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig
864-)
865\ No newline at end of file
866+)
867
868=== added file 'data/ubuntu-platform-hardware-api.pc.in'
869--- data/ubuntu-platform-hardware-api.pc.in 1970-01-01 00:00:00 +0000
870+++ data/ubuntu-platform-hardware-api.pc.in 2014-08-26 16:06:15 +0000
871@@ -0,0 +1,10 @@
872+prefix=@CMAKE_INSTALL_PREFIX@
873+exec_prefix=${prefix}
874+libdir=${prefix}/@LIB_INSTALL_DIR@
875+includedir=${exec_prefix}/include
876+
877+Name: ubuntu_platform_hardware_api
878+Description: Ubuntu's platform hardware abstraction layer.
879+Version: @UBUNTU_PLATFORM_API_VERSION_MAJOR@.@UBUNTU_PLATFORM_API_VERSION_MINOR@.@UBUNTU_PLATFORM_API_VERSION_PATCH@
880+Libs: -L${libdir} -lubuntu_platform_hardware_api
881+Cflags: -I${includedir}/ubuntu
882
883=== modified file 'debian/changelog'
884--- debian/changelog 2014-05-14 22:05:06 +0000
885+++ debian/changelog 2014-08-26 16:06:15 +0000
886@@ -1,12 +1,220 @@
887-platform-api (1.1.0-0ubuntu1) UNRELEASED; urgency=medium
888-
889+platform-api (2.2.1) UNRELEASED; urgency=medium
890+
891+ * Add window orientation property (readonly, notifyable)
892+
893+ -- Gerry Boland <gerry.boland@canonical.com> Wed, 20 Aug 2014 18:10:51 +0100
894+
895+platform-api (2.2.0+14.10.20140825-0ubuntu1) utopic; urgency=low
896+
897+ [ thomas-voss ]
898+ * Implement installation of changed handlers. Subscribe to state
899+ properties. (LP: #1348334)
900+
901+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 25 Aug 2014 08:34:53 +0000
902+
903+platform-api (2.2.0+14.10.20140821-0ubuntu1) utopic; urgency=low
904+
905+ [ Iain Lane ]
906+ * Fix error by pulling out and sharing a struct instead of defining it
907+ twice. (LP: #1350874)
908+
909+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 21 Aug 2014 09:32:54 +0000
910+
911+platform-api (2.2.0+14.10.20140812-0ubuntu1) utopic; urgency=low
912+
913+ [ Cemil Azizoglu ]
914+ * Bump ABI for Mir 0.6.0 release.
915+
916+ [ Alan Griffiths ]
917+ * Bump ABI for Mir 0.6.0 release.
918+
919+ [ Kevin Gunn ]
920+ * Bump ABI for Mir 0.6.0 release.
921+
922+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 12 Aug 2014 18:49:40 +0000
923+
924+platform-api (2.2.0+14.10.20140808-0ubuntu1) utopic; urgency=low
925+
926+ [ thomas-voss ]
927+ * Implement installation of changed handlers. Subscribe to state
928+ properties. (LP: #1348334)
929+
930+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 08 Aug 2014 02:07:56 +0000
931+
932+platform-api (2.2.0+14.10.20140801-0ubuntu1) utopic; urgency=low
933+
934+ [ Ricardo Mendoza ]
935+ * Remove stale event.h header, use public one instead.
936+
937+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 01 Aug 2014 10:16:51 +0000
938+
939+platform-api (2.2.0+14.10.20140730-0ubuntu1) utopic; urgency=low
940+
941+ [ thomas-voss ]
942+ * Check for null in functions accessing a session object. Make sure
943+ that exceptions cannot propagate for controller interactions. (LP:
944+ #1338610)
945+
946+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 30 Jul 2014 07:26:34 +0000
947+
948+platform-api (2.2.0+14.10.20140728-0ubuntu1) utopic; urgency=medium
949+
950+ [ Gerry Boland ]
951+ * Add window resize support
952+ * Add window focus event
953+
954+ [ Ubuntu daily release ]
955+ * debian/libubuntu-application-api2.symbols: auto-update to released
956+ version
957+ * New rebuild forced
958+
959+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 28 Jul 2014 02:53:27 +0000
960+
961+platform-api (2.1.0+14.10.20140721-0ubuntu1) utopic; urgency=low
962+
963+ [ thomas-voss ]
964+ * Explicitly select g++-4.9 to prevent from ABI breaks.
965+
966+ [ Steve Langasek ]
967+ * Explicitly select g++-4.9 to prevent from ABI breaks.
968+
969+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 21 Jul 2014 08:47:18 +0000
970+
971+platform-api (2.1.0+14.10.20140717-0ubuntu1) utopic; urgency=low
972+
973+ [ Cemil Azizoglu ]
974+ * Mir display server 0.5.0 release.
975+
976+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 17 Jul 2014 08:03:12 +0000
977+
978+platform-api (2.1.0+14.10.20140715-0ubuntu1) utopic; urgency=low
979+
980+ * New rebuild forced
981+
982+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 15 Jul 2014 14:20:04 +0000
983+
984+platform-api (2.1.0+14.10.20140702-0ubuntu1) utopic; urgency=low
985+
986+ [ Alberto Aguirre ]
987+ * Bump Mir dependencies to 0.4.0.
988+
989+ [ Cemil Azizoglu ]
990+ * Bump Mir dependencies to 0.4.0.
991+
992+ [ Kevin Gunn ]
993+ * Bump Mir dependencies to 0.4.0.
994+
995+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 02 Jul 2014 02:11:11 +0000
996+
997+platform-api (2.1.0+14.10.20140701-0ubuntu1) utopic; urgency=low
998+
999+ [ Sergio Schvezov ]
1000+ * Setting -Wl,--no-as-needed for sensors.
1001+
1002+ [ Ricardo Mendoza ]
1003+ * Run thread for dbus client connection (sensors service)
1004+
1005+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 01 Jul 2014 15:17:32 +0000
1006+
1007+platform-api (2.1.0+14.10.20140630-0ubuntu1) utopic; urgency=low
1008+
1009+ [ Ubuntu daily release ]
1010+ * debian/*symbols: auto-update new symbols to released version
1011+
1012+ [ thomas-voss ]
1013+ * Adjust to API changes in location service. Implement controller
1014+ interface. Add functions to query the accuracy estimates for a
1015+ position update. (LP: #1281817)
1016+
1017+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 30 Jun 2014 08:54:28 +0000
1018+
1019+platform-api (2.1.0+14.10.20140624.4-0ubuntu1) utopic; urgency=low
1020+
1021+ [ Ricardo Mendoza ]
1022+ * Add missing enable/disable functions for haptic
1023+
1024+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 24 Jun 2014 20:22:48 +0000
1025+
1026+platform-api (2.1.0+14.10.20140623.1-0ubuntu1) utopic; urgency=medium
1027+
1028+ [ Ricardo Mendoza ]
1029+ * Added orientation sensor, extended existing sensor API to allow
1030+ for dynamic event rate setting.
1031+
1032+ [ Ubuntu daily release ]
1033+ * debian/*symbols: auto-update new symbols to released version
1034+
1035+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 23 Jun 2014 16:39:59 +0000
1036+
1037+platform-api (2.0.0+14.10.20140618.1-0ubuntu1) utopic; urgency=low
1038+
1039+ [ Tarmac ]
1040+ * Updated for Mir 0.3.0 release.
1041+
1042+ [ Ubuntu daily release ]
1043+ * New rebuild forced
1044+
1045+ [ Cemil Azizoglu ]
1046+ * Updated for Mir 0.3.0 release.
1047+
1048+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 18 Jun 2014 19:31:24 +0000
1049+
1050+platform-api (2.0.0+14.10.20140612-0ubuntu1) utopic; urgency=medium
1051+
1052+ [ Ricardo Mendoza ]
1053+ * Bump API version to 2.0
1054+ * Introduce support for dynamic backend loading
1055+ * Package naming changes
1056+ * Further support for test backend
1057+ * Unified bridge
1058+
1059+ [ Ubuntu daily release ]
1060+ * debian/*symbols: auto-update new symbols to released version
1061+ * New rebuild forced
1062+
1063+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 12 Jun 2014 09:48:31 +0000
1064+
1065+platform-api (1.2.0+14.10.20140605-0ubuntu1) utopic; urgency=low
1066+
1067+ [ Ubuntu daily release ]
1068+ * New rebuild forced
1069+
1070+ [ Cemil Azizoglu ]
1071+ * staging 0.2.0
1072+
1073+ [ Kevin Gunn ]
1074+ * staging 0.2.0
1075+
1076+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 05 Jun 2014 14:08:48 +0000
1077+
1078+platform-api (1.2.0+14.10.20140522.1-0ubuntu1) utopic; urgency=medium
1079+
1080+ [ Manuel de la Pena ]
1081+ * Add agps hooks in the hardware api to allow the use of supl.
1082+
1083+ [ Ubuntu daily release ]
1084+ * debian/*symbols: auto-update new symbols to released version
1085+
1086+ [ thomas-voss ]
1087+ * Add hw alarm api implementation for android's /dev/alarm. Add simple
1088+ test executable for hw alarm api implementation on android. Adjust
1089+ interface signatures to make sure that status of operations is
1090+ reported correctly. Add HW Alarms API interface definition. Add
1091+ Ubuntu implementation that will bridge over to the android world.
1092+ (LP: #1299916)
1093+
1094+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 22 May 2014 15:29:47 +0000
1095+
1096+platform-api (1.1.0+14.10.20140515.1-0ubuntu1) utopic; urgency=medium
1097+
1098+ [ Gerry Boland ]
1099 [Daniel d'Andrada]
1100 * Add ua_ui_window_get_size().
1101
1102 [Gerry Boland]
1103 * Bump package version to match library version.
1104
1105- -- Gerry Boland <gerry.boland@canonical.com> Tue, 13 May 2014 16:18:07 +0100
1106+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 15 May 2014 17:18:39 +0000
1107
1108 platform-api (0.21+14.10.20140507-0ubuntu1) utopic; urgency=medium
1109
1110
1111=== modified file 'debian/control'
1112--- debian/control 2014-05-07 07:39:57 +0000
1113+++ debian/control 2014-08-26 16:06:15 +0000
1114@@ -2,19 +2,24 @@
1115 Priority: optional
1116 Section: devel
1117 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
1118-Build-Depends: cmake,
1119+Build-Depends: android-headers,
1120+ cmake,
1121 debhelper (>= 9),
1122 doxygen,
1123 graphviz,
1124+# We rely on C++11 features, and to prevent from ABI breaks
1125+# in libstdc++ causing us issues, we explicitly select a G++
1126+# version.
1127+ g++-4.9,
1128 libgles2-mesa-dev,
1129 libhybris-common-dev,
1130 pkg-config,
1131- libmirclient-dev (>= 0.1.8),
1132- libmirserver-dev (>= 0.1.9),
1133+ libmirclient-dev (>= 0.6.0),
1134+ libmirserver-dev (>= 0.6.0),
1135 liburl-dispatcher1-dev,
1136 libdbus-1-dev,
1137- libdbus-cpp-dev (>= 2.0.0),
1138- libubuntu-location-service-dev,
1139+ libdbus-cpp-dev (>= 4.0.0),
1140+ libubuntu-location-service-dev (>= 1.0.0),
1141 libgtest-dev,
1142 libprocess-cpp-dev (>= 0.0.1+14.04.20131212),
1143 libproperties-cpp-dev,
1144@@ -26,9 +31,11 @@
1145 # just go ahead. ~phablet-team will notice and sync up the code again.
1146 Vcs-Browser: https://code.launchpad.net/platform-api
1147
1148-Package: libplatform-api-headers
1149+Package: libubuntu-application-api-headers
1150 Section: libdevel
1151 Architecture: any
1152+Replaces: libplatform-api-headers (<< 2.0.0)
1153+Breaks: libplatform-api-headers (<< 2.0.0)
1154 Pre-Depends: ${misc:Pre-Depends},
1155 Multi-Arch: same
1156 Depends: ${misc:Depends},
1157@@ -39,9 +46,11 @@
1158 should build depend on the libplatform-api-dev package instead, which
1159 will pull this package as well.
1160
1161-Package: libplatform-hardware-api-headers
1162+Package: libubuntu-platform-hardware-api-headers
1163 Section: libdevel
1164 Architecture: any
1165+Replaces: libplatform-hardware-api-headers (<< 2.0.0)
1166+Breaks: libplatform-hardware-api-headers (<< 2.0.0)
1167 Pre-Depends: ${misc:Pre-Depends},
1168 Multi-Arch: same
1169 Depends: ${misc:Depends},
1170@@ -50,75 +59,81 @@
1171 This package provides the library headers for the hw-access parts of the Platform API.
1172 .
1173 Unless a new backend for the Platform API is developed, packages
1174- should build depend on the libplatform-hardware-api-dev package instead, which
1175+ should build depend on the libubuntu-platform-hardware-api-dev package instead, which
1176 will pull this package as well.
1177
1178-Package: libplatform-api1-dev
1179+Package: libubuntu-application-api-dev
1180 Section: libdevel
1181 Architecture: any
1182+Replaces: libplatform-api1-dev (<< 2.0.0)
1183+Breaks: libplatform-api1-dev (<< 2.0.0)
1184 Pre-Depends: ${misc:Pre-Depends},
1185 Multi-Arch: same
1186 Depends: ${misc:Depends},
1187 libgles2-mesa-dev,
1188- libplatform-api-headers (= ${binary:Version}),
1189- libubuntu-application-api1 | libplatform-api1,
1190- libubuntu-application-api-mirserver1 (= ${binary:Version}),
1191- libubuntu-application-api-mirclient1 (= ${binary:Version}),
1192+ libubuntu-application-api-headers (= ${binary:Version}),
1193+ libubuntu-application-api2,
1194+ ubuntu-application-api2-touch (= ${binary:Version}),
1195+ ubuntu-application-api2-desktop (= ${binary:Version}),
1196 ${misc:Depends},
1197-Suggests: libplatform-api1-doc,
1198-Description: Platform API for system level capabilities (development)
1199+Suggests: libubuntu-application-api-doc,
1200+Description: Ubuntu Application API for system level capabilities (development)
1201 This package provides the development library and headers (via
1202- dependency) for the Platform API.
1203-
1204-Package: libubuntu-application-api-mirserver1
1205-Section: libs
1206-Pre-Depends: ${misc:Pre-Depends},
1207-Multi-Arch: same
1208-Architecture: any
1209-Depends: ${misc:Depends},
1210- ${shlibs:Depends},
1211-Description: Implementation of the Platform API for a Mir server
1212- This package provides the implementation of the Platform API to
1213- provide a server instance of Mir.
1214-
1215-Package: libubuntu-application-api-mirclient1
1216-Section: libs
1217-Pre-Depends: ${misc:Pre-Depends},
1218-Multi-Arch: same
1219-Architecture: any
1220-Depends: ${misc:Depends},
1221- ${shlibs:Depends},
1222-Description: Implementation of the Platform API for a Mir client
1223- This package provides the implementation of the Platform API to
1224- allow a client to connect to a Mir server.
1225-
1226-Package: libplatform-hardware-api1-dev
1227+ dependency) for the Ubuntu Application API.
1228+
1229+Package: ubuntu-application-api2-touch
1230+Section: libs
1231+Pre-Depends: ${misc:Pre-Depends},
1232+Multi-Arch: same
1233+Architecture: any
1234+Depends: ${misc:Depends},
1235+ ${shlibs:Depends},
1236+ libubuntu-application-api2 (= ${binary:Version}),
1237+Description: Implementation of the Platform API for Ubuntu Touch
1238+ This package provides the implementation of the Platform API to
1239+ bring up an Ubuntu Touch system.
1240+
1241+Package: ubuntu-application-api2-desktop
1242+Section: libs
1243+Pre-Depends: ${misc:Pre-Depends},
1244+Multi-Arch: same
1245+Architecture: any
1246+Depends: ${misc:Depends},
1247+ ${shlibs:Depends},
1248+ libubuntu-application-api2 (= ${binary:Version}),
1249+Description: Implementation of the Platform API for Ubuntu Desktop
1250+ This package provides the implementation of the Platform API to
1251+ bring up an Ubuntu Desktop system.
1252+
1253+Package: libubuntu-platform-hardware-api-dev
1254 Section: libdevel
1255 Architecture: any
1256+Replaces: libplatform-hardware-api1-dev (<< 2.0.0)
1257+Breaks: libplatform-hardware-api1-dev (<< 2.0.0)
1258 Pre-Depends: ${misc:Pre-Depends},
1259 Multi-Arch: same
1260 Depends: ${misc:Depends},
1261 libgles2-mesa-dev,
1262- libplatform-hardware-api-headers (= ${binary:Version}),
1263- libubuntu-platform-hardware-api1 | libplatform-hardware-api1,
1264-Suggests: libplatform-api1-doc,
1265+ libubuntu-platform-hardware-api-headers (= ${binary:Version}),
1266+ libubuntu-platform-hardware-api2
1267+Suggests: libubuntu-application-api-doc,
1268 Description: Platform API for system level capabilities (development)
1269 This package provides the development library and headers (via
1270 dependency) for the hw-access portions of the Platform API.
1271
1272-Package: libplatform-api1-doc
1273+Package: libubuntu-application-api-doc
1274 Section: doc
1275 Architecture: all
1276+Replaces: libplatform-api1-doc (<< 2.0.0)
1277+Breaks: libplatform-api1-doc (<< 2.0.0)
1278 Depends: ${misc:Depends},
1279- libplatform-api1-dev,
1280+ libubuntu-application-api-dev,
1281 Description: Platform API for system level capabilities (development)
1282 This package provides the developer documentation for the Platform API.
1283
1284-Package: libubuntu-platform-hardware-api1
1285+Package: libubuntu-platform-hardware-api2
1286 Section: libs
1287 Architecture: any
1288-Replaces: libplatform-hardware-api1-hybris (<< 0.18.3)
1289-Breaks: libplatform-hardware-api1-hybris (<< 0.18.3)
1290 Pre-Depends: ${misc:Pre-Depends},
1291 Multi-Arch: same
1292 Depends: ${misc:Depends},
1293@@ -129,11 +144,9 @@
1294 The produced library should be used via libhybris, to communicate with the
1295 Android userspace, which is where the device drivers live.
1296
1297-Package: libubuntu-application-api1
1298+Package: libubuntu-application-api2
1299 Section: libs
1300 Architecture: any
1301-Replaces: libplatform-api1-hybris (<< 0.18.3)
1302-Breaks: libplatform-api1-hybris (<< 0.18.3)
1303 Pre-Depends: ${misc:Pre-Depends},
1304 Multi-Arch: same
1305 Depends: ${misc:Depends},
1306@@ -144,13 +157,14 @@
1307 The produced library should be used via libhybris, to communicate with the
1308 Android userspace, which is where the Ubuntu Application Manager lives.
1309
1310-Package: libubuntu-application-api-test1
1311+Package: ubuntu-application-api2-test
1312 Section: libs
1313 Architecture: any
1314 Pre-Depends: ${misc:Pre-Depends},
1315 Multi-Arch: same
1316 Depends: ${misc:Depends},
1317 ${shlibs:Depends},
1318+ libubuntu-application-api2 (= ${binary:Version}),
1319 Description: test implementation of the Platform API
1320 This package provides an implementation of the Platform API for testing. It
1321 does not communicate with actual hardware, but reads input from a text file.
1322@@ -160,40 +174,66 @@
1323 .
1324 For now this provides simulated sensors.
1325
1326+Package: ubuntu-application-api2-examples
1327+Architecture: any
1328+Replaces: libplatform-api1-hybris-tests (<< 2.0.0)
1329+Breaks: libplatform-api1-hybris-tests (<< 2.0.0)
1330+Depends: ${misc:Depends},
1331+ ${shlibs:Depends},
1332+ ubuntu-application-api2-test,
1333+ ubuntu-application-api2-touch | ubuntu-application-api2-desktop,
1334+Description: Binary examples for Ubuntu Application API
1335+ This package provides a set of example programs that excercise most the
1336+ set of APIs provided by the Application API.
1337+
1338+Package: libplatform-api-headers
1339+Section: oldlibs
1340+Architecture: all
1341+Depends: libubuntu-application-api-headers,
1342+ ${misc:Depends},
1343+Description: dummy transitional package for libplatform-api-headers
1344+ This is a dummy transitional package, please use libubuntu-application-api-headers
1345+ instead.
1346+
1347+Package: libplatform-hardware-api-headers
1348+Section: oldlibs
1349+Architecture: all
1350+Depends: libubuntu-platform-hardware-api-headers,
1351+ ${misc:Depends},
1352+Description: dummy transitional package for libplatform-hardware-api-headers
1353+ This is a dummy transitional package, please use libubuntu-platform-hardware-api-headers
1354+ instead.
1355+
1356+Package: libplatform-api1-dev
1357+Section: oldlibs
1358+Architecture: all
1359+Depends: libubuntu-application-api-dev,
1360+ ${misc:Depends},
1361+Description: dummy transitional package for libplatform-api1-dev
1362+ This is a dummy transitional package, please use libubuntu-application-api-dev
1363+
1364+Package: libplatform-hardware-api1-dev
1365+Section: oldlibs
1366+Architecture: all
1367+Depends: libubuntu-platform-hardware-api-dev,
1368+ ${misc:Depends},
1369+Description: dummy transitional package for libplatform-hardware-api1-dev
1370+ This is a dummy transitional package, please use libubuntu-platform-hardware-api-dev
1371+ instead.
1372+
1373 Package: libplatform-api1-hybris-tests
1374-Architecture: any
1375-Depends: ${misc:Depends},
1376- ${shlibs:Depends},
1377- libubuntu-application-api1 (= ${binary:Version}),
1378-Description: Hybris implementation of the Platform API (tests)
1379- This package provides the test cases for the hybris implementation
1380- of the Platform API.
1381-
1382-Package: libubuntu-platform-api1-dev
1383-Section: oldlibs
1384-Architecture: all
1385-Depends: ${misc:Depends},
1386- libplatform-api1-dev (= ${binary:Version}),
1387-Description: dummy transitional package for libplatform-api1-dev
1388- This is dummy transitional package, please use libplatform-api1-dev instead.
1389- .
1390- This package can be safely removed.
1391-
1392-Package: libplatform-api1-hybris
1393-Section: oldlibs
1394-Architecture: all
1395-Depends: libubuntu-application-api1,
1396- ${misc:Depends},
1397-Description: dummy transitional package for libplatform-api1-hybris
1398- This is a dummy transitional package, please use libubuntu-application-api1
1399- instead.
1400-
1401-Package: libplatform-hardware-api1-hybris
1402-Section: oldlibs
1403-Architecture: all
1404-Depends: libubuntu-platform-hardware-api1,
1405- ${misc:Depends},
1406-Description: dummy transitional package for libplatform-hardware-api1-hybris
1407- This is a dummy transitional package, please use libubuntu-platform-hardware-api1
1408- instead.
1409+Section: oldlibs
1410+Architecture: all
1411+Depends: ubuntu-application-api2-examples,
1412+ ${misc:Depends},
1413+Description: dummy transitional package for libplatform-api1-hybris-tests
1414+ This is a dummy transitional package, please use ubuntu-application-api2-examples
1415+
1416+Package: libplatform-api1-doc
1417+Section: oldlibs
1418+Architecture: all
1419+Depends: libubuntu-application-api-doc,
1420+ ${misc:Depends},
1421+Description: dummy transitional package for libplatform-api1-doc
1422+ This is a dummy transitional package, please use libubuntu-application-api-doc
1423
1424
1425=== removed file 'debian/libplatform-api1-hybris-tests.install'
1426--- debian/libplatform-api1-hybris-tests.install 2013-08-17 05:22:31 +0000
1427+++ debian/libplatform-api1-hybris-tests.install 1970-01-01 00:00:00 +0000
1428@@ -1,6 +0,0 @@
1429-usr/bin/test_android_gps_api
1430-usr/bin/test_android_sensors_api
1431-usr/bin/test_android_ubuntu_app_api
1432-usr/bin/test_android_ubuntu_app_api_multiple_surfaces
1433-usr/bin/test_android_ubuntu_session_api
1434-usr/bin/test_ubuntu_app_api_location_service
1435\ No newline at end of file
1436
1437=== renamed file 'debian/libplatform-api1-dev.install' => 'debian/libubuntu-application-api-dev.install'
1438--- debian/libplatform-api1-dev.install 2013-08-23 13:53:42 +0000
1439+++ debian/libubuntu-application-api-dev.install 2014-08-26 16:06:15 +0000
1440@@ -1,4 +1,2 @@
1441 usr/lib/*/libubuntu_application_api.so
1442-usr/lib/*/libubuntu_application_api_mirclient.so
1443-usr/lib/*/libubuntu_application_api_mirserver.so
1444 usr/lib/*/pkgconfig/ubuntu-platform-api.pc
1445
1446=== renamed file 'debian/libplatform-api1-doc.doc-base' => 'debian/libubuntu-application-api-doc.doc-base'
1447=== renamed file 'debian/libplatform-api1-doc.install' => 'debian/libubuntu-application-api-doc.install'
1448--- debian/libplatform-api1-doc.install 2013-07-05 13:50:50 +0000
1449+++ debian/libubuntu-application-api-doc.install 2014-08-26 16:06:15 +0000
1450@@ -1,1 +1,1 @@
1451-usr/share/doc/ubuntu-platform-api
1452\ No newline at end of file
1453+usr/share/doc/ubuntu-platform-api
1454
1455=== renamed file 'debian/libplatform-api-headers.install' => 'debian/libubuntu-application-api-headers.install'
1456--- debian/libplatform-api-headers.install 2014-01-09 18:47:45 +0000
1457+++ debian/libubuntu-application-api-headers.install 2014-08-26 16:06:15 +0000
1458@@ -2,6 +2,7 @@
1459 usr/include/ubuntu/unit.h
1460 usr/include/ubuntu/visibility.h
1461 usr/include/ubuntu/application
1462+usr/include/ubuntu/application/init.h
1463 usr/include/ubuntu/ui
1464 usr/include/ubuntu/application/location
1465 usr/include/ubuntu/application/url_dispatcher
1466
1467=== removed file 'debian/libubuntu-application-api-mirclient1.install'
1468--- debian/libubuntu-application-api-mirclient1.install 2013-08-08 17:41:19 +0000
1469+++ debian/libubuntu-application-api-mirclient1.install 1970-01-01 00:00:00 +0000
1470@@ -1,1 +0,0 @@
1471-usr/lib/*/libubuntu_application_api_mirclient.so.*
1472
1473=== removed file 'debian/libubuntu-application-api-mirclient1.symbols'
1474--- debian/libubuntu-application-api-mirclient1.symbols 2013-09-23 05:39:42 +0000
1475+++ debian/libubuntu-application-api-mirclient1.symbols 1970-01-01 00:00:00 +0000
1476@@ -1,126 +0,0 @@
1477-libubuntu_application_api_mirclient.so.1 libubuntu-application-api-mirclient1 #MINVER#
1478- u_application_description_destroy@Base 0.18.3+13.10.20130813
1479- u_application_description_get_application_id@Base 0.18.3+13.10.20130813
1480- u_application_description_get_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
1481- u_application_description_new@Base 0.18.3+13.10.20130813
1482- u_application_description_set_application_id@Base 0.18.3+13.10.20130813
1483- u_application_description_set_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
1484- u_application_id_compare@Base 0.18.3+13.10.20130813
1485- u_application_id_destroy@Base 0.18.3+13.10.20130813
1486- u_application_id_new_from_stringn@Base 0.18.3+13.10.20130813
1487- u_application_instance_destroy@Base 0.18.3+13.10.20130813
1488- u_application_instance_new_from_description_with_options@Base 0.18.3+13.10.20130813
1489- u_application_instance_ref@Base 0.18.3+13.10.20130813
1490- u_application_instance_run@Base 0.18.3+13.10.20130813
1491- u_application_instance_unref@Base 0.18.3+13.10.20130813
1492- u_application_lifecycle_delegate_destroy@Base 0.18.3+13.10.20130813
1493- u_application_lifecycle_delegate_get_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
1494- u_application_lifecycle_delegate_get_application_resumed_cb@Base 0.18.3+13.10.20130813
1495- u_application_lifecycle_delegate_get_context@Base 0.18.3+13.10.20130813
1496- u_application_lifecycle_delegate_new@Base 0.18.3+13.10.20130813
1497- u_application_lifecycle_delegate_ref@Base 0.18.3+13.10.20130813
1498- u_application_lifecycle_delegate_set_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
1499- u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.3+13.10.20130813
1500- u_application_lifecycle_delegate_set_context@Base 0.18.3+13.10.20130813
1501- u_application_lifecycle_delegate_unref@Base 0.18.3+13.10.20130813
1502- u_application_options_destroy@Base 0.18.3+13.10.20130813
1503- u_application_options_get_form_factor@Base 0.18.3+13.10.20130813
1504- u_application_options_get_operation_mode@Base 0.18.3+13.10.20130813
1505- u_application_options_get_stage@Base 0.18.3+13.10.20130813
1506- u_application_options_new_from_cmd_line@Base 0.18.3+13.10.20130813
1507- ua_sensors_accelerometer_disable@Base 0.18.3+13.10.20130813
1508- ua_sensors_accelerometer_enable@Base 0.18.3+13.10.20130813
1509- ua_sensors_accelerometer_get_max_value@Base 0.18.3+13.10.20130813
1510- ua_sensors_accelerometer_get_min_delay@Base 0.18.3+13.10.20130813
1511- ua_sensors_accelerometer_get_min_value@Base 0.18.3+13.10.20130813
1512- ua_sensors_accelerometer_get_resolution@Base 0.18.3+13.10.20130813
1513- ua_sensors_accelerometer_new@Base 0.18.3+13.10.20130813
1514- ua_sensors_accelerometer_set_reading_cb@Base 0.18.3+13.10.20130813
1515- ua_sensors_light_disable@Base 0.18.3+13.10.20130813
1516- ua_sensors_light_enable@Base 0.18.3+13.10.20130813
1517- ua_sensors_light_get_max_value@Base 0.18.3+13.10.20130813
1518- ua_sensors_light_get_min_delay@Base 0.18.3+13.10.20130813
1519- ua_sensors_light_get_min_value@Base 0.18.3+13.10.20130813
1520- ua_sensors_light_get_resolution@Base 0.18.3+13.10.20130813
1521- ua_sensors_light_new@Base 0.18.3+13.10.20130813
1522- ua_sensors_light_set_reading_cb@Base 0.18.3+13.10.20130813
1523- ua_sensors_proximity_disable@Base 0.18.3+13.10.20130813
1524- ua_sensors_proximity_enable@Base 0.18.3+13.10.20130813
1525- ua_sensors_proximity_get_max_value@Base 0.18.3+13.10.20130813
1526- ua_sensors_proximity_get_min_delay@Base 0.18.3+13.10.20130813
1527- ua_sensors_proximity_get_min_value@Base 0.18.3+13.10.20130813
1528- ua_sensors_proximity_get_resolution@Base 0.18.3+13.10.20130813
1529- ua_sensors_proximity_new@Base 0.18.3+13.10.20130813
1530- ua_sensors_proximity_set_reading_cb@Base 0.18.3+13.10.20130813
1531- ua_ui_display_destroy@Base 0.18.3+13.10.20130813
1532- ua_ui_display_get_native_type@Base 0.18.3+13.10.20130813
1533- ua_ui_display_new_with_index@Base 0.18.3+13.10.20130813
1534- ua_ui_display_query_horizontal_res@Base 0.18.3+13.10.20130813
1535- ua_ui_display_query_vertical_res@Base 0.18.3+13.10.20130813
1536- ua_ui_get_clipboard_content@Base 0.18.3+13.10.20130813
1537- ua_ui_session_new_with_properties@Base 0.18.3+13.10.20130813
1538- ua_ui_session_properties_new@Base 0.18.3+13.10.20130813
1539- ua_ui_session_properties_set_remote_pid@Base 0.18.3+13.10.20130813
1540- ua_ui_session_properties_set_type@Base 0.18.3+13.10.20130813
1541- ua_ui_set_clipboard_content@Base 0.18.3+13.10.20130813
1542- ua_ui_window_destroy@Base 0.18.3+13.10.20130813
1543- ua_ui_window_get_native_type@Base 0.18.3+13.10.20130813
1544- ua_ui_window_hide@Base 0.18.3+13.10.20130813
1545- ua_ui_window_move@Base 0.18.3+13.10.20130813
1546- ua_ui_window_new_for_application_with_properties@Base 0.18.3+13.10.20130813
1547- ua_ui_window_properties_destroy@Base 0.18.3+13.10.20130813
1548- ua_ui_window_properties_get_title@Base 0.18.3+13.10.20130813
1549- ua_ui_window_properties_new_for_normal_window@Base 0.18.3+13.10.20130813
1550- ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.3+13.10.20130813
1551- ua_ui_window_properties_set_role@Base 0.18.3+13.10.20130813
1552- ua_ui_window_properties_set_titlen@Base 0.18.3+13.10.20130813
1553- ua_ui_window_request_fullscreen@Base 0.18.3+13.10.20130813
1554- ua_ui_window_resize@Base 0.18.3+13.10.20130813
1555- ua_ui_window_show@Base 0.18.3+13.10.20130813
1556- uas_accelerometer_event_get_acceleration_x@Base 0.18.3+13.10.20130813
1557- uas_accelerometer_event_get_acceleration_y@Base 0.18.3+13.10.20130813
1558- uas_accelerometer_event_get_acceleration_z@Base 0.18.3+13.10.20130813
1559- uas_accelerometer_event_get_timestamp@Base 0.18.3+13.10.20130813
1560- uas_light_event_get_light@Base 0.18.3+13.10.20130813
1561- uas_light_event_get_timestamp@Base 0.18.3+13.10.20130813
1562- uas_proximity_event_get_distance@Base 0.18.3+13.10.20130813
1563- uas_proximity_event_get_timestamp@Base 0.18.3+13.10.20130813
1564- ua_location_heading_update_get_heading_in_degree@Base 0.19+13.10.20130919.3
1565- ua_location_heading_update_get_timestamp@Base 0.19+13.10.20130919.3
1566- ua_location_heading_update_ref@Base 0.19+13.10.20130919.3
1567- ua_location_heading_update_unref@Base 0.19+13.10.20130919.3
1568- ua_location_position_update_get_altitude_in_meter@Base 0.19+13.10.20130919.3
1569- ua_location_position_update_get_latitude_in_degree@Base 0.19+13.10.20130919.3
1570- ua_location_position_update_get_longitude_in_degree@Base 0.19+13.10.20130919.3
1571- ua_location_position_update_get_timestamp@Base 0.19+13.10.20130919.3
1572- ua_location_position_update_has_altitude@Base 0.19+13.10.20130919.3
1573- ua_location_position_update_ref@Base 0.19+13.10.20130919.3
1574- ua_location_position_update_unref@Base 0.19+13.10.20130919.3
1575- ua_location_service_controller_disable_gps@Base 0.19+13.10.20130919.3
1576- ua_location_service_controller_disable_service@Base 0.19+13.10.20130919.3
1577- ua_location_service_controller_enable_gps@Base 0.19+13.10.20130919.3
1578- ua_location_service_controller_enable_service@Base 0.19+13.10.20130919.3
1579- ua_location_service_controller_query_status@Base 0.19+13.10.20130919.3
1580- ua_location_service_controller_ref@Base 0.19+13.10.20130919.3
1581- ua_location_service_controller_set_status_changed_handler@Base 0.19+13.10.20130919.3
1582- ua_location_service_controller_unref@Base 0.19+13.10.20130919.3
1583- ua_location_service_create_controller@Base 0.19+13.10.20130919.3
1584- ua_location_service_create_session_for_high_accuracy@Base 0.19+13.10.20130919.3
1585- ua_location_service_create_session_for_low_accuracy@Base 0.19+13.10.20130919.3
1586- ua_location_service_session_ref@Base 0.19+13.10.20130919.3
1587- ua_location_service_session_set_heading_updates_handler@Base 0.19+13.10.20130919.3
1588- ua_location_service_session_set_position_updates_handler@Base 0.19+13.10.20130919.3
1589- ua_location_service_session_set_velocity_updates_handler@Base 0.19+13.10.20130919.3
1590- ua_location_service_session_start_heading_updates@Base 0.19+13.10.20130919.3
1591- ua_location_service_session_start_position_updates@Base 0.19+13.10.20130919.3
1592- ua_location_service_session_start_velocity_updates@Base 0.19+13.10.20130919.3
1593- ua_location_service_session_stop_heading_updates@Base 0.19+13.10.20130919.3
1594- ua_location_service_session_stop_position_updates@Base 0.19+13.10.20130919.3
1595- ua_location_service_session_stop_velocity_updates@Base 0.19+13.10.20130919.3
1596- ua_location_service_session_unref@Base 0.19+13.10.20130919.3
1597- ua_location_velocity_update_get_timestamp@Base 0.19+13.10.20130919.3
1598- ua_location_velocity_update_get_velocity_in_meters_per_second@Base 0.19+13.10.20130919.3
1599- ua_location_velocity_update_ref@Base 0.19+13.10.20130919.3
1600- ua_location_velocity_update_unref@Base 0.19+13.10.20130919.3
1601- ua_url_dispatcher_session@Base 0.19+13.10.20130919.3
1602- ua_url_dispatcher_session_open@Base 0.19+13.10.20130919.3
1603\ No newline at end of file
1604
1605=== removed file 'debian/libubuntu-application-api-mirserver1.install'
1606--- debian/libubuntu-application-api-mirserver1.install 2013-08-08 17:41:19 +0000
1607+++ debian/libubuntu-application-api-mirserver1.install 1970-01-01 00:00:00 +0000
1608@@ -1,1 +0,0 @@
1609-usr/lib/*/libubuntu_application_api_mirserver.so.*
1610
1611=== removed file 'debian/libubuntu-application-api-mirserver1.symbols'
1612--- debian/libubuntu-application-api-mirserver1.symbols 2013-09-23 05:39:42 +0000
1613+++ debian/libubuntu-application-api-mirserver1.symbols 1970-01-01 00:00:00 +0000
1614@@ -1,128 +0,0 @@
1615-libubuntu_application_api_mirserver.so.1 libubuntu-application-api-mirserver1 #MINVER#
1616- u_application_description_destroy@Base 0.18.3+13.10.20130813
1617- u_application_description_get_application_id@Base 0.18.3+13.10.20130813
1618- u_application_description_get_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
1619- u_application_description_new@Base 0.18.3+13.10.20130813
1620- u_application_description_set_application_id@Base 0.18.3+13.10.20130813
1621- u_application_description_set_application_lifecycle_delegate@Base 0.18.3+13.10.20130813
1622- u_application_id_compare@Base 0.18.3+13.10.20130813
1623- u_application_id_destroy@Base 0.18.3+13.10.20130813
1624- u_application_id_new_from_stringn@Base 0.18.3+13.10.20130813
1625- u_application_instance_destroy@Base 0.18.3+13.10.20130813
1626- u_application_instance_new_from_description_with_options@Base 0.18.3+13.10.20130813
1627- u_application_instance_ref@Base 0.18.3+13.10.20130813
1628- u_application_instance_run@Base 0.18.3+13.10.20130813
1629- u_application_instance_unref@Base 0.18.3+13.10.20130813
1630- u_application_lifecycle_delegate_destroy@Base 0.18.3+13.10.20130813
1631- u_application_lifecycle_delegate_get_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
1632- u_application_lifecycle_delegate_get_application_resumed_cb@Base 0.18.3+13.10.20130813
1633- u_application_lifecycle_delegate_get_context@Base 0.18.3+13.10.20130813
1634- u_application_lifecycle_delegate_new@Base 0.18.3+13.10.20130813
1635- u_application_lifecycle_delegate_ref@Base 0.18.3+13.10.20130813
1636- u_application_lifecycle_delegate_set_application_about_to_stop_cb@Base 0.18.3+13.10.20130813
1637- u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.3+13.10.20130813
1638- u_application_lifecycle_delegate_set_context@Base 0.18.3+13.10.20130813
1639- u_application_lifecycle_delegate_unref@Base 0.18.3+13.10.20130813
1640- u_application_options_destroy@Base 0.18.3+13.10.20130813
1641- u_application_options_get_form_factor@Base 0.18.3+13.10.20130813
1642- u_application_options_get_operation_mode@Base 0.18.3+13.10.20130813
1643- u_application_options_get_stage@Base 0.18.3+13.10.20130813
1644- u_application_options_new_from_cmd_line@Base 0.18.3+13.10.20130813
1645- ua_sensors_accelerometer_disable@Base 0.18.3+13.10.20130813
1646- ua_sensors_accelerometer_enable@Base 0.18.3+13.10.20130813
1647- ua_sensors_accelerometer_get_max_value@Base 0.18.3+13.10.20130813
1648- ua_sensors_accelerometer_get_min_delay@Base 0.18.3+13.10.20130813
1649- ua_sensors_accelerometer_get_min_value@Base 0.18.3+13.10.20130813
1650- ua_sensors_accelerometer_get_resolution@Base 0.18.3+13.10.20130813
1651- ua_sensors_accelerometer_new@Base 0.18.3+13.10.20130813
1652- ua_sensors_accelerometer_set_reading_cb@Base 0.18.3+13.10.20130813
1653- ua_sensors_light_disable@Base 0.18.3+13.10.20130813
1654- ua_sensors_light_enable@Base 0.18.3+13.10.20130813
1655- ua_sensors_light_get_max_value@Base 0.18.3+13.10.20130813
1656- ua_sensors_light_get_min_delay@Base 0.18.3+13.10.20130813
1657- ua_sensors_light_get_min_value@Base 0.18.3+13.10.20130813
1658- ua_sensors_light_get_resolution@Base 0.18.3+13.10.20130813
1659- ua_sensors_light_new@Base 0.18.3+13.10.20130813
1660- ua_sensors_light_set_reading_cb@Base 0.18.3+13.10.20130813
1661- ua_sensors_proximity_disable@Base 0.18.3+13.10.20130813
1662- ua_sensors_proximity_enable@Base 0.18.3+13.10.20130813
1663- ua_sensors_proximity_get_max_value@Base 0.18.3+13.10.20130813
1664- ua_sensors_proximity_get_min_delay@Base 0.18.3+13.10.20130813
1665- ua_sensors_proximity_get_min_value@Base 0.18.3+13.10.20130813
1666- ua_sensors_proximity_get_resolution@Base 0.18.3+13.10.20130813
1667- ua_sensors_proximity_new@Base 0.18.3+13.10.20130813
1668- ua_sensors_proximity_set_reading_cb@Base 0.18.3+13.10.20130813
1669- ua_ui_display_destroy@Base 0.18.3+13.10.20130813
1670- ua_ui_display_get_native_type@Base 0.18.3+13.10.20130813
1671- ua_ui_display_new_with_index@Base 0.18.3+13.10.20130813
1672- ua_ui_display_query_horizontal_res@Base 0.18.3+13.10.20130813
1673- ua_ui_display_query_vertical_res@Base 0.18.3+13.10.20130813
1674- ua_ui_get_clipboard_content@Base 0.18.3+13.10.20130813
1675- ua_ui_mirserver_finish@Base 0.18.3+13.10.20130823
1676- ua_ui_mirserver_init@Base 0.18.3+13.10.20130823
1677- ua_ui_session_new_with_properties@Base 0.18.3+13.10.20130813
1678- ua_ui_session_properties_new@Base 0.18.3+13.10.20130813
1679- ua_ui_session_properties_set_remote_pid@Base 0.18.3+13.10.20130813
1680- ua_ui_session_properties_set_type@Base 0.18.3+13.10.20130813
1681- ua_ui_set_clipboard_content@Base 0.18.3+13.10.20130813
1682- ua_ui_window_destroy@Base 0.18.3+13.10.20130813
1683- ua_ui_window_get_native_type@Base 0.18.3+13.10.20130813
1684- ua_ui_window_hide@Base 0.18.3+13.10.20130813
1685- ua_ui_window_move@Base 0.18.3+13.10.20130813
1686- ua_ui_window_new_for_application_with_properties@Base 0.18.3+13.10.20130813
1687- ua_ui_window_properties_destroy@Base 0.18.3+13.10.20130813
1688- ua_ui_window_properties_get_title@Base 0.18.3+13.10.20130813
1689- ua_ui_window_properties_new_for_normal_window@Base 0.18.3+13.10.20130813
1690- ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.3+13.10.20130813
1691- ua_ui_window_properties_set_role@Base 0.18.3+13.10.20130813
1692- ua_ui_window_properties_set_titlen@Base 0.18.3+13.10.20130813
1693- ua_ui_window_request_fullscreen@Base 0.18.3+13.10.20130813
1694- ua_ui_window_resize@Base 0.18.3+13.10.20130813
1695- ua_ui_window_show@Base 0.18.3+13.10.20130813
1696- uas_accelerometer_event_get_acceleration_x@Base 0.18.3+13.10.20130813
1697- uas_accelerometer_event_get_acceleration_y@Base 0.18.3+13.10.20130813
1698- uas_accelerometer_event_get_acceleration_z@Base 0.18.3+13.10.20130813
1699- uas_accelerometer_event_get_timestamp@Base 0.18.3+13.10.20130813
1700- uas_light_event_get_light@Base 0.18.3+13.10.20130813
1701- uas_light_event_get_timestamp@Base 0.18.3+13.10.20130813
1702- uas_proximity_event_get_distance@Base 0.18.3+13.10.20130813
1703- uas_proximity_event_get_timestamp@Base 0.18.3+13.10.20130813
1704- ua_location_heading_update_get_heading_in_degree@Base 0.19+13.10.20130919.3
1705- ua_location_heading_update_get_timestamp@Base 0.19+13.10.20130919.3
1706- ua_location_heading_update_ref@Base 0.19+13.10.20130919.3
1707- ua_location_heading_update_unref@Base 0.19+13.10.20130919.3
1708- ua_location_position_update_get_altitude_in_meter@Base 0.19+13.10.20130919.3
1709- ua_location_position_update_get_latitude_in_degree@Base 0.19+13.10.20130919.3
1710- ua_location_position_update_get_longitude_in_degree@Base 0.19+13.10.20130919.3
1711- ua_location_position_update_get_timestamp@Base 0.19+13.10.20130919.3
1712- ua_location_position_update_has_altitude@Base 0.19+13.10.20130919.3
1713- ua_location_position_update_ref@Base 0.19+13.10.20130919.3
1714- ua_location_position_update_unref@Base 0.19+13.10.20130919.3
1715- ua_location_service_controller_disable_gps@Base 0.19+13.10.20130919.3
1716- ua_location_service_controller_disable_service@Base 0.19+13.10.20130919.3
1717- ua_location_service_controller_enable_gps@Base 0.19+13.10.20130919.3
1718- ua_location_service_controller_enable_service@Base 0.19+13.10.20130919.3
1719- ua_location_service_controller_query_status@Base 0.19+13.10.20130919.3
1720- ua_location_service_controller_ref@Base 0.19+13.10.20130919.3
1721- ua_location_service_controller_set_status_changed_handler@Base 0.19+13.10.20130919.3
1722- ua_location_service_controller_unref@Base 0.19+13.10.20130919.3
1723- ua_location_service_create_controller@Base 0.19+13.10.20130919.3
1724- ua_location_service_create_session_for_high_accuracy@Base 0.19+13.10.20130919.3
1725- ua_location_service_create_session_for_low_accuracy@Base 0.19+13.10.20130919.3
1726- ua_location_service_session_ref@Base 0.19+13.10.20130919.3
1727- ua_location_service_session_set_heading_updates_handler@Base 0.19+13.10.20130919.3
1728- ua_location_service_session_set_position_updates_handler@Base 0.19+13.10.20130919.3
1729- ua_location_service_session_set_velocity_updates_handler@Base 0.19+13.10.20130919.3
1730- ua_location_service_session_start_heading_updates@Base 0.19+13.10.20130919.3
1731- ua_location_service_session_start_position_updates@Base 0.19+13.10.20130919.3
1732- ua_location_service_session_start_velocity_updates@Base 0.19+13.10.20130919.3
1733- ua_location_service_session_stop_heading_updates@Base 0.19+13.10.20130919.3
1734- ua_location_service_session_stop_position_updates@Base 0.19+13.10.20130919.3
1735- ua_location_service_session_stop_velocity_updates@Base 0.19+13.10.20130919.3
1736- ua_location_service_session_unref@Base 0.19+13.10.20130919.3
1737- ua_location_velocity_update_get_timestamp@Base 0.19+13.10.20130919.3
1738- ua_location_velocity_update_get_velocity_in_meters_per_second@Base 0.19+13.10.20130919.3
1739- ua_location_velocity_update_ref@Base 0.19+13.10.20130919.3
1740- ua_location_velocity_update_unref@Base 0.19+13.10.20130919.3
1741- ua_url_dispatcher_session@Base 0.19+13.10.20130919.3
1742- ua_url_dispatcher_session_open@Base 0.19+13.10.20130919.3
1743\ No newline at end of file
1744
1745=== renamed file 'debian/libubuntu-application-api1.install' => 'debian/libubuntu-application-api2.install'
1746=== renamed file 'debian/libubuntu-application-api1.symbols' => 'debian/libubuntu-application-api2.symbols'
1747--- debian/libubuntu-application-api1.symbols 2013-08-26 18:07:34 +0000
1748+++ debian/libubuntu-application-api2.symbols 2014-08-26 16:06:15 +0000
1749@@ -1,11 +1,13 @@
1750-libubuntu_application_api.so.1 libubuntu-application-api1 #MINVER#
1751+libubuntu_application_api.so.2 libubuntu-application-api2 #MINVER#
1752 u_application_description_destroy@Base 0.18.1daily13.06.21
1753 u_application_description_new@Base 0.18.1daily13.06.21
1754 u_application_description_set_application_id@Base 0.18.1daily13.06.21
1755 u_application_description_set_application_lifecycle_delegate@Base 0.18.1daily13.06.21
1756+ u_application_finish@Base 2.0.0+14.10.20140612
1757 u_application_id_compare@Base 0.18.1daily13.06.21
1758 u_application_id_destroy@Base 0.18.1daily13.06.21
1759 u_application_id_new_from_stringn@Base 0.18.1daily13.06.21
1760+ u_application_init@Base 2.0.0+14.10.20140612
1761 u_application_instance_new_from_description_with_options@Base 0.18.1daily13.06.21
1762 u_application_lifecycle_delegate_new@Base 0.18.1daily13.06.21
1763 u_application_lifecycle_delegate_ref@Base 0.18.1daily13.06.21
1764@@ -13,24 +15,37 @@
1765 u_application_lifecycle_delegate_set_application_resumed_cb@Base 0.18.1daily13.06.21
1766 u_application_lifecycle_delegate_set_context@Base 0.18.1daily13.06.21
1767 u_application_lifecycle_delegate_unref@Base 0.18.1daily13.06.21
1768+ u_application_module_version@Base 2.0.0+14.10.20140612
1769 u_application_options_destroy@Base 0.18.1daily13.06.21
1770 u_application_options_get_form_factor@Base 0.18.1daily13.06.21
1771 u_application_options_get_stage@Base 0.18.1daily13.06.21
1772 u_application_options_new_from_cmd_line@Base 0.18.1daily13.06.21
1773+ ua_location_heading_update_get_heading_in_degree@Base 0.18.3+13.10.20130815.1
1774 ua_location_heading_update_get_timestamp@Base 0.18.3+13.10.20130807
1775 ua_location_heading_update_ref@Base 0.18.3+13.10.20130807
1776 ua_location_heading_update_unref@Base 0.18.3+13.10.20130807
1777- ua_location_heading_update_get_heading_in_degree@Base 0.18.3+13.10.20130815.1
1778 ua_location_position_update_get_altitude_in_meter@Base 0.18.3+13.10.20130807
1779+ ua_location_position_update_get_horizontal_accuracy_in_meter@Base 2.1.0+14.10.20140630
1780 ua_location_position_update_get_latitude_in_degree@Base 0.18.3+13.10.20130807
1781 ua_location_position_update_get_longitude_in_degree@Base 0.18.3+13.10.20130807
1782 ua_location_position_update_get_timestamp@Base 0.18.3+13.10.20130807
1783+ ua_location_position_update_get_vertical_accuracy_in_meter@Base 2.1.0+14.10.20140630
1784 ua_location_position_update_has_altitude@Base 0.18.3+13.10.20130807
1785+ ua_location_position_update_has_horizontal_accuracy@Base 2.1.0+14.10.20140630
1786+ ua_location_position_update_has_vertical_accuracy@Base 2.1.0+14.10.20140630
1787 ua_location_position_update_ref@Base 0.18.3+13.10.20130807
1788 ua_location_position_update_unref@Base 0.18.3+13.10.20130807
1789+ ua_location_service_controller_disable_gps@Base 0.18.3+13.10.20130826
1790+ ua_location_service_controller_disable_service@Base 0.18.3+13.10.20130826
1791+ ua_location_service_controller_enable_gps@Base 0.18.3+13.10.20130826
1792+ ua_location_service_controller_enable_service@Base 0.18.3+13.10.20130826
1793+ ua_location_service_controller_query_status@Base 0.18.3+13.10.20130826
1794+ ua_location_service_controller_ref@Base 0.18.3+13.10.20130826
1795+ ua_location_service_controller_set_status_changed_handler@Base 0.18.3+13.10.20130826
1796+ ua_location_service_controller_unref@Base 0.18.3+13.10.20130826
1797+ ua_location_service_create_controller@Base 0.18.3+13.10.20130826.3
1798 ua_location_service_create_session_for_high_accuracy@Base 0.18.3+13.10.20130807
1799 ua_location_service_create_session_for_low_accuracy@Base 0.18.3+13.10.20130807
1800- ua_location_service_create_controller@Base 0.18.3+13.10.20130826.3
1801 ua_location_service_session_ref@Base 0.18.3+13.10.20130807
1802 ua_location_service_session_set_heading_updates_handler@Base 0.18.3+13.10.20130807
1803 ua_location_service_session_set_position_updates_handler@Base 0.18.3+13.10.20130807
1804@@ -53,15 +68,31 @@
1805 ua_sensors_accelerometer_get_min_value@Base 0.18.1daily13.06.21
1806 ua_sensors_accelerometer_get_resolution@Base 0.18.1daily13.06.21
1807 ua_sensors_accelerometer_new@Base 0.18.1daily13.06.21
1808+ ua_sensors_accelerometer_set_event_rate@Base 2.1.0+14.10.20140623.1
1809 ua_sensors_accelerometer_set_reading_cb@Base 0.18.1daily13.06.21
1810+ ua_sensors_haptic_disable@Base 2.0.0+14.10.20140612
1811+ ua_sensors_haptic_enable@Base 2.0.0+14.10.20140612
1812+ ua_sensors_haptic_new@Base 2.0.0+14.10.20140612
1813+ ua_sensors_haptic_vibrate_once@Base 2.0.0+14.10.20140612
1814+ ua_sensors_haptic_vibrate_with_pattern@Base 2.0.0+14.10.20140612
1815+ ua_sensors_light_disable@Base 0.18.2+13.10.20130708
1816 ua_sensors_light_enable@Base 0.18.1daily13.06.21
1817- ua_sensors_light_disable@Base 0.18.2+13.10.20130708
1818 ua_sensors_light_get_max_value@Base 0.18.1daily13.06.21
1819 ua_sensors_light_get_min_delay@Base 0.18.1daily13.06.21
1820 ua_sensors_light_get_min_value@Base 0.18.1daily13.06.21
1821 ua_sensors_light_get_resolution@Base 0.18.1daily13.06.21
1822 ua_sensors_light_new@Base 0.18.1daily13.06.21
1823+ ua_sensors_light_set_event_rate@Base 2.1.0+14.10.20140623.1
1824 ua_sensors_light_set_reading_cb@Base 0.18.1daily13.06.21
1825+ ua_sensors_orientation_disable@Base 2.1.0+14.10.20140623.1
1826+ ua_sensors_orientation_enable@Base 2.1.0+14.10.20140623.1
1827+ ua_sensors_orientation_get_max_value@Base 2.1.0+14.10.20140623.1
1828+ ua_sensors_orientation_get_min_delay@Base 2.1.0+14.10.20140623.1
1829+ ua_sensors_orientation_get_min_value@Base 2.1.0+14.10.20140623.1
1830+ ua_sensors_orientation_get_resolution@Base 2.1.0+14.10.20140623.1
1831+ ua_sensors_orientation_new@Base 2.1.0+14.10.20140623.1
1832+ ua_sensors_orientation_set_event_rate@Base 2.1.0+14.10.20140623.1
1833+ ua_sensors_orientation_set_reading_cb@Base 2.1.0+14.10.20140623.1
1834 ua_sensors_proximity_disable@Base 0.18.1daily13.06.21
1835 ua_sensors_proximity_enable@Base 0.18.1daily13.06.21
1836 ua_sensors_proximity_get_max_value@Base 0.18.1daily13.06.21
1837@@ -69,6 +100,7 @@
1838 ua_sensors_proximity_get_min_value@Base 0.18.1daily13.06.21
1839 ua_sensors_proximity_get_resolution@Base 0.18.1daily13.06.21
1840 ua_sensors_proximity_new@Base 0.18.1daily13.06.21
1841+ ua_sensors_proximity_set_event_rate@Base 2.1.0+14.10.20140623.1
1842 ua_sensors_proximity_set_reading_cb@Base 0.18.1daily13.06.21
1843 ua_ui_display_destroy@Base 0.18.1daily13.06.21
1844 ua_ui_display_get_native_type@Base 0.18.1daily13.06.21
1845@@ -83,13 +115,18 @@
1846 ua_ui_set_clipboard_content@Base 0.18.1daily13.06.21
1847 ua_ui_window_destroy@Base 0.18.1daily13.06.21
1848 ua_ui_window_get_native_type@Base 0.18.1daily13.06.21
1849+ ua_ui_window_get_orientation@Base 2.2.1+14.10.20140812
1850+ ua_ui_window_get_size@Base 2.0.0+14.10.20140612
1851 ua_ui_window_hide@Base 0.18.1daily13.06.21
1852+ ua_ui_window_is_focused@Base 2.2.0+14.10.20140728
1853 ua_ui_window_move@Base 0.18.1daily13.06.21
1854 ua_ui_window_new_for_application_with_properties@Base 0.18.1daily13.06.21
1855 ua_ui_window_properties_destroy@Base 0.18.1daily13.06.21
1856 ua_ui_window_properties_get_title@Base 0.18.1daily13.06.21
1857 ua_ui_window_properties_new_for_normal_window@Base 0.18.1daily13.06.21
1858+ ua_ui_window_properties_set_dimensions@Base 2.0.0+14.10.20140612
1859 ua_ui_window_properties_set_input_cb_and_ctx@Base 0.18.1daily13.06.21
1860+ ua_ui_window_properties_set_event_cb_and_ctx@Base 2.2.0+14.10.20140728
1861 ua_ui_window_properties_set_role@Base 0.18.1daily13.06.21
1862 ua_ui_window_properties_set_titlen@Base 0.18.1daily13.06.21
1863 ua_ui_window_request_fullscreen@Base 0.18.1daily13.06.21
1864@@ -103,28 +140,9 @@
1865 uas_accelerometer_event_get_timestamp@Base 0.18.1daily13.06.21
1866 uas_light_event_get_light@Base 0.18.1daily13.06.21
1867 uas_light_event_get_timestamp@Base 0.18.1daily13.06.21
1868+ uas_orientation_event_get_azimuth@Base 2.1.0+14.10.20140623.1
1869+ uas_orientation_event_get_pitch@Base 2.1.0+14.10.20140623.1
1870+ uas_orientation_event_get_roll@Base 2.1.0+14.10.20140623.1
1871+ uas_orientation_event_get_timestamp@Base 2.1.0+14.10.20140623.1
1872 uas_proximity_event_get_distance@Base 0.18.1daily13.06.21
1873 uas_proximity_event_get_timestamp@Base 0.18.1daily13.06.21
1874- ubuntu_ui_install_task_controller@Base 0.18.1daily13.06.21
1875- ubuntu_ui_report_notification_invisible@Base 0.18.1daily13.06.21
1876- ubuntu_ui_report_notification_visible@Base 0.18.1daily13.06.21
1877- ubuntu_ui_report_osk_invisible@Base 0.18.1daily13.06.21
1878- ubuntu_ui_report_osk_visible@Base 0.18.1daily13.06.21
1879- ubuntu_ui_session_focus_running_session_with_id@Base 0.18.1daily13.06.21
1880- ubuntu_ui_session_install_session_lifecycle_observer@Base 0.18.1daily13.06.21
1881- ubuntu_ui_session_properties_get_application_instance_id@Base 0.18.1daily13.06.21
1882- ubuntu_ui_session_properties_get_application_stage_hint@Base 0.18.1daily13.06.21
1883- ubuntu_ui_session_properties_get_desktop_file_hint@Base 0.18.1daily13.06.21
1884- ubuntu_ui_session_snapshot_running_session_with_id@Base 0.18.1daily13.06.21
1885- ubuntu_ui_session_trigger_switch_to_well_known_application@Base 0.18.1daily13.06.21
1886- ubuntu_ui_session_unfocus_running_sessions@Base 0.18.1daily13.06.21
1887- ubuntu_ui_set_surface_trap@Base 0.18.1daily13.06.21
1888- ubuntu_ui_unset_surface_trap@Base 0.18.1daily13.06.21
1889- ua_location_service_controller_disable_gps@Base 0.18.3+13.10.20130826
1890- ua_location_service_controller_disable_service@Base 0.18.3+13.10.20130826
1891- ua_location_service_controller_enable_gps@Base 0.18.3+13.10.20130826
1892- ua_location_service_controller_enable_service@Base 0.18.3+13.10.20130826
1893- ua_location_service_controller_query_status@Base 0.18.3+13.10.20130826
1894- ua_location_service_controller_ref@Base 0.18.3+13.10.20130826
1895- ua_location_service_controller_set_status_changed_handler@Base 0.18.3+13.10.20130826
1896- ua_location_service_controller_unref@Base 0.18.3+13.10.20130826
1897
1898=== renamed file 'debian/libplatform-hardware-api1-dev.install' => 'debian/libubuntu-platform-hardware-api-dev.install'
1899--- debian/libplatform-hardware-api1-dev.install 2013-07-08 10:39:36 +0000
1900+++ debian/libubuntu-platform-hardware-api-dev.install 2014-08-26 16:06:15 +0000
1901@@ -1,2 +1,2 @@
1902 usr/lib/*/libubuntu_platform_hardware_api.so
1903-
1904+usr/lib/*/pkgconfig/ubuntu-platform-hardware-api.pc
1905
1906=== renamed file 'debian/libplatform-hardware-api-headers.install' => 'debian/libubuntu-platform-hardware-api-headers.install'
1907=== renamed file 'debian/libubuntu-platform-hardware-api1.install' => 'debian/libubuntu-platform-hardware-api2.install'
1908=== renamed file 'debian/libubuntu-platform-hardware-api1.symbols' => 'debian/libubuntu-platform-hardware-api2.symbols'
1909--- debian/libubuntu-platform-hardware-api1.symbols 2013-07-17 14:29:04 +0000
1910+++ debian/libubuntu-platform-hardware-api2.symbols 2014-08-26 16:06:15 +0000
1911@@ -1,4 +1,11 @@
1912-libubuntu_platform_hardware_api.so.1 libubuntu-platform-hardware-api1 #MINVER#
1913+libubuntu_platform_hardware_api.so.2 libubuntu-platform-hardware-api2 #MINVER#
1914+ u_hardware_alarm_create@Base 1.2.0+14.10.20140522.1
1915+ u_hardware_alarm_get_elapsed_real_time@Base 1.2.0+14.10.20140522.1
1916+ u_hardware_alarm_ref@Base 1.2.0+14.10.20140522.1
1917+ u_hardware_alarm_set_relative_to_with_behavior@Base 1.2.0+14.10.20140522.1
1918+ u_hardware_alarm_set_timezone@Base 1.2.0+14.10.20140522.1
1919+ u_hardware_alarm_unref@Base 1.2.0+14.10.20140522.1
1920+ u_hardware_alarm_wait_for_next_alarm@Base 1.2.0+14.10.20140522.1
1921 u_hardware_gps_delete@Base 0.18.2+13.10.20130709
1922 u_hardware_gps_delete_aiding_data@Base 0.18.2+13.10.20130709
1923 u_hardware_gps_inject_location@Base 0.18.2+13.10.20130709
1924@@ -8,3 +15,8 @@
1925 u_hardware_gps_set_position_mode@Base 0.18.2+13.10.20130709
1926 u_hardware_gps_start@Base 0.18.2+13.10.20130709
1927 u_hardware_gps_stop@Base 0.18.2+13.10.20130709
1928+ u_hardware_gps_agps_notify_connection_is_closed@Base 0.21+14.10.20140507
1929+ u_hardware_gps_agps_notify_connection_is_open@Base 0.21+14.10.20140507
1930+ u_hardware_gps_agps_notify_connection_not_available@Base 0.21+14.10.20140507
1931+ u_hardware_gps_agps_set_reference_location@Base 0.21+14.10.20140507
1932+ u_hardware_gps_agps_set_server_for_type@Base 0.21+14.10.20140507
1933
1934=== modified file 'debian/rules'
1935--- debian/rules 2014-02-13 14:12:28 +0000
1936+++ debian/rules 2014-08-26 16:06:15 +0000
1937@@ -2,11 +2,18 @@
1938
1939 DPKG_GENSYMBOLS_CHECK_LEVEL = 4
1940
1941+include /usr/share/dpkg/default.mk
1942+
1943+# Explicitly selecting a G{CC,++}-version here to avoid accidental
1944+# ABI breaks introduced by toolchain updates.
1945+export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9
1946+export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9
1947+
1948 %:
1949 dh $@
1950
1951 override_dh_auto_configure:
1952- dh_auto_configure -- -DENABLE_MIRCLIENT_IMPLEMENTATION=true -DENABLE_MIRSERVER_IMPLEMENTATION=true
1953+ dh_auto_configure -- -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CXX)
1954
1955 override_dh_install:
1956 dh_install --fail-missing
1957
1958=== added file 'debian/ubuntu-application-api2-desktop.install'
1959--- debian/ubuntu-application-api2-desktop.install 1970-01-01 00:00:00 +0000
1960+++ debian/ubuntu-application-api2-desktop.install 2014-08-26 16:06:15 +0000
1961@@ -0,0 +1,2 @@
1962+usr/lib/*/libubuntu_application_api_desktop_mirclient.so.*
1963+usr/lib/*/libubuntu_application_api_desktop_mirserver.so.*
1964
1965=== added file 'debian/ubuntu-application-api2-examples.install'
1966--- debian/ubuntu-application-api2-examples.install 1970-01-01 00:00:00 +0000
1967+++ debian/ubuntu-application-api2-examples.install 2014-08-26 16:06:15 +0000
1968@@ -0,0 +1,7 @@
1969+usr/bin/test_android_gps_api
1970+usr/bin/test_android_sensors_api
1971+usr/bin/test_android_ubuntu_app_api
1972+usr/bin/test_android_ubuntu_app_api_multiple_surfaces
1973+usr/bin/test_ubuntu_app_api_location_service
1974+usr/bin/test_hardware_alarms_api
1975+usr/bin/test_ubuntu_haptic_device
1976
1977=== renamed file 'debian/libubuntu-application-api-test1.docs' => 'debian/ubuntu-application-api2-test.docs'
1978--- debian/libubuntu-application-api-test1.docs 2014-01-08 15:17:41 +0000
1979+++ debian/ubuntu-application-api2-test.docs 2014-08-26 16:06:15 +0000
1980@@ -1,1 +1,1 @@
1981-src/ubuntu/testbackend/README.md
1982+src/ubuntu/application/testbackend/README.md
1983
1984=== renamed file 'debian/libubuntu-application-api-test1.install' => 'debian/ubuntu-application-api2-test.install'
1985=== added file 'debian/ubuntu-application-api2-touch.install'
1986--- debian/ubuntu-application-api2-touch.install 1970-01-01 00:00:00 +0000
1987+++ debian/ubuntu-application-api2-touch.install 2014-08-26 16:06:15 +0000
1988@@ -0,0 +1,2 @@
1989+usr/lib/*/libubuntu_application_api_touch_mirserver.so.*
1990+usr/lib/*/libubuntu_application_api_touch_mirclient.so.*
1991
1992=== added directory 'examples'
1993=== added file 'examples/CMakeLists.txt'
1994--- examples/CMakeLists.txt 1970-01-01 00:00:00 +0000
1995+++ examples/CMakeLists.txt 2014-08-26 16:06:15 +0000
1996@@ -0,0 +1,29 @@
1997+include_directories(
1998+ ${CMAKE_BINARY_DIR}/include
1999+)
2000+
2001+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC -Wl,--no-as-needed -pthread")
2002+
2003+add_executable(test_android_ubuntu_app_api test_c_api.cpp)
2004+target_link_libraries(test_android_ubuntu_app_api ubuntu_application_api EGL GLESv2)
2005+
2006+add_executable(test_android_ubuntu_app_api_multiple_surfaces test_multiple_surfaces_event_delivery.cpp)
2007+target_link_libraries(test_android_ubuntu_app_api_multiple_surfaces ubuntu_application_api EGL GLESv2)
2008+
2009+add_executable(test_android_sensors_api test_sensors_api.cpp)
2010+target_link_libraries(test_android_sensors_api ubuntu_application_api)
2011+
2012+add_executable(test_ubuntu_app_api_location_service test_location_api.cpp)
2013+target_link_libraries(test_ubuntu_app_api_location_service ubuntu_application_api)
2014+
2015+add_executable(test_ubuntu_haptic_device test_haptic_device.cpp)
2016+target_link_libraries(test_ubuntu_haptic_device ubuntu_application_api)
2017+
2018+install(TARGETS
2019+ test_android_ubuntu_app_api
2020+ test_android_ubuntu_app_api_multiple_surfaces
2021+ test_android_sensors_api
2022+ test_ubuntu_app_api_location_service
2023+ test_ubuntu_haptic_device
2024+ DESTINATION bin
2025+)
2026
2027=== renamed file 'src/ubuntu/hybris/tests/test_c_api.cpp' => 'examples/test_c_api.cpp'
2028--- src/ubuntu/hybris/tests/test_c_api.cpp 2013-05-21 22:14:40 +0000
2029+++ examples/test_c_api.cpp 2014-08-26 16:06:15 +0000
2030@@ -1,16 +1,16 @@
2031 /*
2032- * Copyright © 2012 Canonical Ltd.
2033+ * Copyright © 2014 Canonical Ltd.
2034 *
2035 * This program is free software: you can redistribute it and/or modify
2036- * it under the terms of the GNU General Public License version 3 as
2037+ * it under the terms of the GNU Lesser General Public License version 3 as
2038 * published by the Free Software Foundation.
2039 *
2040 * This program is distributed in the hope that it will be useful,
2041 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2042 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2043- * GNU General Public License for more details.
2044+ * GNU Lesser General Public License for more details.
2045 *
2046- * You should have received a copy of the GNU General Public License
2047+ * You should have received a copy of the GNU Lesser General Public License
2048 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2049 *
2050 * Authored by: Thomas Voß <thomas.voss@canonical.com>
2051@@ -83,7 +83,7 @@
2052 const GLfloat * color_data;
2053 };
2054
2055-void on_new_event(void* ctx, const Event* ev)
2056+void on_new_event(void* ctx, const WindowEvent* ev)
2057 {
2058 }
2059
2060@@ -110,7 +110,7 @@
2061 UAUiWindowProperties* wprops = ua_ui_window_properties_new_for_normal_window();
2062 ua_ui_window_properties_set_titlen(wprops, "Window 1", 8);
2063 ua_ui_window_properties_set_role(wprops, U_MAIN_ROLE);
2064- ua_ui_window_properties_set_input_cb_and_ctx(wprops, on_new_event, NULL);
2065+ ua_ui_window_properties_set_event_cb_and_ctx(wprops, on_new_event, NULL);
2066
2067 UAUiWindow* surface = ua_ui_window_new_for_application_with_properties(instance, wprops);
2068
2069
2070=== added file 'examples/test_haptic_device.cpp'
2071--- examples/test_haptic_device.cpp 1970-01-01 00:00:00 +0000
2072+++ examples/test_haptic_device.cpp 2014-08-26 16:06:15 +0000
2073@@ -0,0 +1,44 @@
2074+/*
2075+ * Copyright © 2014 Canonical Ltd.
2076+ *
2077+ * This program is free software: you can redistribute it and/or modify
2078+ * it under the terms of the GNU Lesser General Public License version 3 as
2079+ * published by the Free Software Foundation.
2080+ *
2081+ * This program is distributed in the hope that it will be useful,
2082+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2083+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2084+ * GNU Lesser General Public License for more details.
2085+ *
2086+ * You should have received a copy of the GNU Lesser General Public License
2087+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2088+ *
2089+ * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
2090+ */
2091+
2092+#include <stdio.h>
2093+#include <stdlib.h>
2094+#include <unistd.h>
2095+
2096+#include <ubuntu/application/sensors/haptic.h>
2097+
2098+int main(int argc, char *argv[])
2099+{
2100+ UASensorsHaptic *sensor = ua_sensors_haptic_new();
2101+
2102+ if (!sensor) {
2103+ printf("Haptic device unavailable\n");
2104+ return 1;
2105+ }
2106+
2107+ printf("Vibrating once for 1500ms\n");
2108+ ua_sensors_haptic_vibrate_once(sensor, 1500);
2109+
2110+ sleep(3);
2111+
2112+ printf("Vibrating with pattern 6*1500, repeat twice.\n");
2113+ uint32_t pattern[MAX_PATTERN_SIZE] = {1500, 1500, 1500, 1500, 1500, 1500};
2114+ ua_sensors_haptic_vibrate_with_pattern(sensor, pattern, 2);
2115+
2116+ return 0;
2117+}
2118
2119=== renamed file 'src/ubuntu/hybris/tests/test_location_api.cpp' => 'examples/test_location_api.cpp'
2120--- src/ubuntu/hybris/tests/test_location_api.cpp 2013-12-03 07:10:43 +0000
2121+++ examples/test_location_api.cpp 2014-08-26 16:06:15 +0000
2122@@ -1,19 +1,19 @@
2123 /*
2124- * Copyright © 2012 Canonical Ltd.
2125+ * Copyright © 2014 Canonical Ltd.
2126 *
2127 * This program is free software: you can redistribute it and/or modify
2128- * it under the terms of the GNU General Public License version 3 as
2129+ * it under the terms of the GNU Lesser General Public License version 3 as
2130 * published by the Free Software Foundation.
2131 *
2132 * This program is distributed in the hope that it will be useful,
2133 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2134 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2135- * GNU General Public License for more details.
2136+ * GNU Lesser General Public License for more details.
2137 *
2138- * You should have received a copy of the GNU General Public License
2139+ * You should have received a copy of the GNU Lesser General Public License
2140 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2141 *
2142- * Authored by: Thomas Voß <thomas.voss@canonical.com>
2143+ * Authored by: Thomas Voss <thomas.voss@canonical.com>
2144 */
2145
2146 #include <ubuntu/application/location/service.h>
2147
2148=== renamed file 'src/ubuntu/hybris/tests/test_multiple_surfaces_event_delivery.cpp' => 'examples/test_multiple_surfaces_event_delivery.cpp'
2149--- src/ubuntu/hybris/tests/test_multiple_surfaces_event_delivery.cpp 2013-05-21 22:14:40 +0000
2150+++ examples/test_multiple_surfaces_event_delivery.cpp 2014-08-26 16:06:15 +0000
2151@@ -1,19 +1,19 @@
2152 /*
2153- * Copyright © 2012 Canonical Ltd.
2154+ * Copyright © 2014 Canonical Ltd.
2155 *
2156 * This program is free software: you can redistribute it and/or modify
2157- * it under the terms of the GNU General Public License version 3 as
2158+ * it under the terms of the GNU Lesser General Public License version 3 as
2159 * published by the Free Software Foundation.
2160 *
2161 * This program is distributed in the hope that it will be useful,
2162 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2163 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2164- * GNU General Public License for more details.
2165+ * GNU Lesser General Public License for more details.
2166 *
2167- * You should have received a copy of the GNU General Public License
2168+ * You should have received a copy of the GNU Lesser General Public License
2169 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2170 *
2171- * Authored by: Thomas Voß <thomas.voss@canonical.com>
2172+ * Authored by: Thomas Voss <thomas.voss@canonical.com>
2173 */
2174
2175 #include <ubuntu/application/ui/window.h>
2176@@ -83,7 +83,7 @@
2177 const GLfloat * color_data;
2178 };
2179
2180-void on_new_event(void* ctx, const Event* ev)
2181+void on_new_event(void* ctx, const WindowEvent* ev)
2182 {
2183 int* surface = (int*) ctx;
2184
2185@@ -115,14 +115,14 @@
2186 UAUiWindowProperties* wprops1 = ua_ui_window_properties_new_for_normal_window();
2187 ua_ui_window_properties_set_titlen(wprops1, "Window 1", 8);
2188 ua_ui_window_properties_set_role(wprops1, U_MAIN_ROLE);
2189- ua_ui_window_properties_set_input_cb_and_ctx(wprops1, on_new_event, &i);
2190+ ua_ui_window_properties_set_event_cb_and_ctx(wprops1, on_new_event, &i);
2191
2192 UAUiWindow* surface1 = ua_ui_window_new_for_application_with_properties(instance, wprops1);
2193
2194 UAUiWindowProperties* wprops2 = ua_ui_window_properties_new_for_normal_window();
2195 ua_ui_window_properties_set_titlen(wprops2, "Window 2", 8);
2196 ua_ui_window_properties_set_role(wprops2, U_MAIN_ROLE);
2197- ua_ui_window_properties_set_input_cb_and_ctx(wprops2, on_new_event, &j);
2198+ ua_ui_window_properties_set_event_cb_and_ctx(wprops2, on_new_event, &j);
2199
2200 UAUiWindow* surface2 = ua_ui_window_new_for_application_with_properties(instance, wprops2);
2201
2202
2203=== renamed file 'src/ubuntu/hybris/tests/test_sensors_api.cpp' => 'examples/test_sensors_api.cpp'
2204--- src/ubuntu/hybris/tests/test_sensors_api.cpp 2014-02-13 13:12:41 +0000
2205+++ examples/test_sensors_api.cpp 2014-08-26 16:06:15 +0000
2206@@ -1,16 +1,16 @@
2207 /*
2208- * Copyright © 2012 Canonical Ltd.
2209+ * Copyright © 2014 Canonical Ltd.
2210 *
2211 * This program is free software: you can redistribute it and/or modify
2212- * it under the terms of the GNU General Public License version 3 as
2213+ * it under the terms of the GNU Lesser General Public License version 3 as
2214 * published by the Free Software Foundation.
2215 *
2216 * This program is distributed in the hope that it will be useful,
2217 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2218 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2219- * GNU General Public License for more details.
2220+ * GNU Lesser General Public License for more details.
2221 *
2222- * You should have received a copy of the GNU General Public License
2223+ * You should have received a copy of the GNU Lesser General Public License
2224 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2225 *
2226 * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
2227@@ -25,6 +25,7 @@
2228 #include <ubuntu/application/sensors/accelerometer.h>
2229 #include <ubuntu/application/sensors/proximity.h>
2230 #include <ubuntu/application/sensors/light.h>
2231+#include <ubuntu/application/sensors/orientation.h>
2232
2233 void on_new_accelerometer_event(UASAccelerometerEvent* event, void* context)
2234 {
2235@@ -68,11 +69,25 @@
2236 printf("\tlight: %f\n", light);
2237 }
2238
2239+void on_new_orientation_event(UASOrientationEvent* event, void* context)
2240+{
2241+ float x; uas_orientation_event_get_azimuth(event, &x);
2242+ float y; uas_orientation_event_get_pitch(event, &y);
2243+ float z; uas_orientation_event_get_roll(event, &z);
2244+
2245+ printf("%s \n", __PRETTY_FUNCTION__);
2246+ printf("\ttime: %" PRIu64 "\n", uas_orientation_event_get_timestamp(event));
2247+ printf("\tx: %f\n", x);
2248+ printf("\ty: %f\n", y);
2249+ printf("\tz: %f\n", z);
2250+}
2251+
2252 int main(int argc, char** argv)
2253 {
2254 UASensorsAccelerometer* accelerometer = ua_sensors_accelerometer_new();
2255 UASensorsProximity* proximity = ua_sensors_proximity_new();
2256 UASensorsLight* ambientlight = ua_sensors_light_new();
2257+ UASensorsOrientation* orientation = ua_sensors_orientation_new();
2258
2259 ua_sensors_accelerometer_set_reading_cb(accelerometer,
2260 on_new_accelerometer_event,
2261@@ -86,9 +101,14 @@
2262 on_new_light_event,
2263 NULL);
2264
2265+ ua_sensors_orientation_set_reading_cb(orientation,
2266+ on_new_orientation_event,
2267+ NULL);
2268+
2269 ua_sensors_accelerometer_enable(accelerometer);
2270 ua_sensors_proximity_enable(proximity);
2271 ua_sensors_light_enable(ambientlight);
2272+ ua_sensors_orientation_enable(orientation);
2273
2274 while(true)
2275 {
2276
2277=== renamed file 'src/ubuntu/hybris/tests/test_session_c_api.cpp' => 'examples/test_session_c_api.cpp'
2278--- src/ubuntu/hybris/tests/test_session_c_api.cpp 2013-02-13 23:09:01 +0000
2279+++ examples/test_session_c_api.cpp 2014-08-26 16:06:15 +0000
2280@@ -1,16 +1,16 @@
2281 /*
2282- * Copyright © 2012 Canonical Ltd.
2283+ * Copyright © 2014 Canonical Ltd.
2284 *
2285 * This program is free software: you can redistribute it and/or modify
2286- * it under the terms of the GNU General Public License version 3 as
2287+ * it under the terms of the GNU Lesser General Public License version 3 as
2288 * published by the Free Software Foundation.
2289 *
2290 * This program is distributed in the hope that it will be useful,
2291 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2292 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2293- * GNU General Public License for more details.
2294+ * GNU Lesser General Public License for more details.
2295 *
2296- * You should have received a copy of the GNU General Public License
2297+ * You should have received a copy of the GNU Lesser General Public License
2298 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2299 *
2300 * Authored by: Thomas Voß <thomas.voss@canonical.com>
2301
2302=== modified file 'include/ubuntu/application/CMakeLists.txt'
2303--- include/ubuntu/application/CMakeLists.txt 2013-08-22 10:54:28 +0000
2304+++ include/ubuntu/application/CMakeLists.txt 2014-08-26 16:06:15 +0000
2305@@ -7,6 +7,7 @@
2306 lifecycle_delegate.h
2307 operation_mode.h
2308 options.h
2309+ init.h
2310 )
2311
2312 install(
2313
2314=== added file 'include/ubuntu/application/init.h'
2315--- include/ubuntu/application/init.h 1970-01-01 00:00:00 +0000
2316+++ include/ubuntu/application/init.h 2014-08-26 16:06:15 +0000
2317@@ -0,0 +1,63 @@
2318+/*
2319+ * Copyright © 2013 Canonical Ltd.
2320+ *
2321+ * This program is free software: you can redistribute it and/or modify
2322+ * it under the terms of the GNU Lesser General Public License version 3 as
2323+ * published by the Free Software Foundation.
2324+ *
2325+ * This program is distributed in the hope that it will be useful,
2326+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2327+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2328+ * GNU Lesser General Public License for more details.
2329+ *
2330+ * You should have received a copy of the GNU Lesser General Public License
2331+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2332+ *
2333+ * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
2334+ */
2335+
2336+#ifndef UBUNTU_APPLICATION_INIT_H_
2337+#define UBUNTU_APPLICATION_INIT_H_
2338+
2339+#include <ubuntu/visibility.h>
2340+
2341+#include <stdint.h>
2342+
2343+#ifdef __cplusplus
2344+extern "C" {
2345+#endif
2346+
2347+ /**
2348+ * \brief Queries the Module Version that is currently loaded.
2349+ * \ingroup application_support
2350+ * \param[out] major Major version.
2351+ * \param[out] minor Minor version.
2352+ * \param[out] patch Patch version.
2353+ */
2354+ UBUNTU_DLL_PUBLIC void
2355+ u_application_module_version(
2356+ uint32_t *major,
2357+ uint32_t *minor,
2358+ uint32_t *patch);
2359+
2360+ /**
2361+ * \brief Initializes the Ubuntu Application API backend with args.
2362+ * \ingroup application_support
2363+ * \param[in] args Opaque initialization arguments.
2364+ */
2365+ UBUNTU_DLL_PUBLIC void
2366+ u_application_init(
2367+ void *args);
2368+
2369+ /**
2370+ * \brief Signal termination to the Application backend instance.
2371+ * \ingroup application_support
2372+ */
2373+ UBUNTU_DLL_PUBLIC void
2374+ u_application_finish();
2375+
2376+#ifdef __cplusplus
2377+}
2378+#endif
2379+
2380+#endif /* UBUNTU_APPLICATION_INIT_H_ */
2381
2382=== modified file 'include/ubuntu/application/location/position_update.h'
2383--- include/ubuntu/application/location/position_update.h 2013-08-22 07:03:49 +0000
2384+++ include/ubuntu/application/location/position_update.h 2014-08-26 16:06:15 +0000
2385@@ -103,6 +103,46 @@
2386 ua_location_position_update_get_altitude_in_meter(
2387 UALocationPositionUpdate *update);
2388
2389+ /**
2390+ * \brief Checks if the position update contains a horizontal accuracy estimate.
2391+ * \ingroup location_service
2392+ * \returns TRUE if the update contains a horizontal accuracy estimate, else FALSE.
2393+ * \param[in] update The position update instance to be queried.
2394+ */
2395+ UBUNTU_DLL_PUBLIC bool
2396+ ua_location_position_update_has_horizontal_accuracy(
2397+ UALocationPositionUpdate *update);
2398+
2399+ /**
2400+ * \brief Queries the horizontal accuracy contained in the position update.
2401+ * \ingroup location_service
2402+ * \returns The horizontal accuracy of the position update in [m].
2403+ * \param[in] update The position update instance to be queried.
2404+ */
2405+ UBUNTU_DLL_PUBLIC double
2406+ ua_location_position_update_get_horizontal_accuracy_in_meter(
2407+ UALocationPositionUpdate *update);
2408+
2409+ /**
2410+ * \brief Checks if the position update contains a vertical accuracy estimate.
2411+ * \ingroup location_service
2412+ * \returns TRUE if the update contains a vertical accuracy estimate, else FALSE.
2413+ * \param[in] update The position update instance to be queried.
2414+ */
2415+ UBUNTU_DLL_PUBLIC bool
2416+ ua_location_position_update_has_vertical_accuracy(
2417+ UALocationPositionUpdate *update);
2418+
2419+ /**
2420+ * \brief Queries the vertical accuracy contained in the position update.
2421+ * \ingroup location_service
2422+ * \returns The vertical accuracy of the position update in [m].
2423+ * \param[in] update The position update instance to be queried.
2424+ */
2425+ UBUNTU_DLL_PUBLIC double
2426+ ua_location_position_update_get_vertical_accuracy_in_meter(
2427+ UALocationPositionUpdate *update);
2428+
2429 #ifdef __cplusplus
2430 }
2431 #endif
2432
2433=== modified file 'include/ubuntu/application/sensors/CMakeLists.txt'
2434--- include/ubuntu/application/sensors/CMakeLists.txt 2013-07-18 09:08:17 +0000
2435+++ include/ubuntu/application/sensors/CMakeLists.txt 2014-08-26 16:06:15 +0000
2436@@ -3,7 +3,8 @@
2437 accelerometer.h
2438 light.h
2439 proximity.h
2440- ubuntu_application_sensors.h
2441+ haptic.h
2442+ orientation.h
2443 )
2444
2445 install(
2446@@ -11,4 +12,4 @@
2447 DESTINATION include/ubuntu/application/sensors
2448 )
2449
2450-add_subdirectory(event)
2451\ No newline at end of file
2452+add_subdirectory(event)
2453
2454=== modified file 'include/ubuntu/application/sensors/accelerometer.h'
2455--- include/ubuntu/application/sensors/accelerometer.h 2014-02-13 13:12:41 +0000
2456+++ include/ubuntu/application/sensors/accelerometer.h 2014-08-26 16:06:15 +0000
2457@@ -125,6 +125,18 @@
2458 on_accelerometer_event_cb cb,
2459 void *ctx);
2460
2461+ /**
2462+ * \brief Set the sensor event delivery rate in nanoseconds..
2463+ * \ingroup sensor_access
2464+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2465+ * \param[in] sensor The sensor instance to be modified.
2466+ * \param[in] rate The new event delivery rate.
2467+ */
2468+ UBUNTU_DLL_PUBLIC UStatus
2469+ ua_sensors_accelerometer_set_event_rate(
2470+ UASensorsAccelerometer* sensor,
2471+ uint32_t rate);
2472+
2473 #ifdef __cplusplus
2474 }
2475 #endif
2476
2477=== modified file 'include/ubuntu/application/sensors/event/CMakeLists.txt'
2478--- include/ubuntu/application/sensors/event/CMakeLists.txt 2013-07-18 09:08:17 +0000
2479+++ include/ubuntu/application/sensors/event/CMakeLists.txt 2014-08-26 16:06:15 +0000
2480@@ -3,9 +3,10 @@
2481 accelerometer.h
2482 light.h
2483 proximity.h
2484+ orientation.h
2485 )
2486
2487 install(
2488 FILES ${UBUNTU_APPLICATION_SENSORS_EVENT_HEADERS}
2489 DESTINATION include/ubuntu/application/sensors/event
2490-)
2491\ No newline at end of file
2492+)
2493
2494=== added file 'include/ubuntu/application/sensors/event/orientation.h'
2495--- include/ubuntu/application/sensors/event/orientation.h 1970-01-01 00:00:00 +0000
2496+++ include/ubuntu/application/sensors/event/orientation.h 2014-08-26 16:06:15 +0000
2497@@ -0,0 +1,83 @@
2498+/*
2499+ * Copyright © 2013 Canonical Ltd.
2500+ *
2501+ * This program is free software: you can redistribute it and/or modify
2502+ * it under the terms of the GNU Lesser General Public License version 3 as
2503+ * published by the Free Software Foundation.
2504+ *
2505+ * This program is distributed in the hope that it will be useful,
2506+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2507+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2508+ * GNU Lesser General Public License for more details.
2509+ *
2510+ * You should have received a copy of the GNU Lesser General Public License
2511+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2512+ *
2513+ * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
2514+ */
2515+
2516+#ifndef UBUNTU_APPLICATION_SENSORS_ORIENTATION_EVENT_H_
2517+#define UBUNTU_APPLICATION_SENSORS_ORIENTATION_EVENT_H_
2518+
2519+#include <ubuntu/visibility.h>
2520+
2521+#include <stdint.h>
2522+
2523+#ifdef __cplusplus
2524+extern "C" {
2525+#endif
2526+
2527+ /**
2528+ * \brief Opaque type describing an orientation reading.
2529+ * \ingroup sensor_access
2530+ */
2531+ typedef void UASOrientationEvent;
2532+
2533+ /**
2534+ * \brief Query the timestamp of the sensor reading.
2535+ * \ingroup sensor_access
2536+ * \returns The timestamp of the sensor reading in [µs], timebase: monotonic clock.
2537+ * \param[in] event The reading to be queried.
2538+ */
2539+ UBUNTU_DLL_PUBLIC uint64_t
2540+ uas_orientation_event_get_timestamp(
2541+ UASOrientationEvent* event);
2542+
2543+ /**
2544+ * \brief Query the azimuth (rotation around Z-axis).
2545+ * \ingroup sensor_access
2546+ * \returns U_STATUS_SUCCESS if the updates were successfully started on the service side, else U_STATUS_ERROR.
2547+ * \param[out] value The reading to be queried.
2548+ */
2549+ UBUNTU_DLL_PUBLIC UStatus
2550+ uas_orientation_event_get_azimuth(
2551+ UASOrientationEvent* event,
2552+ float* value);
2553+
2554+ /**
2555+ * \brief Query the pitch (rotation around X-axis).
2556+ * \ingroup sensor_access
2557+ * \returns U_STATUS_SUCCESS if the updates were successfully started on the service side, else U_STATUS_ERROR.
2558+ * \param[out] value The reading to be queried.
2559+ */
2560+ UBUNTU_DLL_PUBLIC UStatus
2561+ uas_orientation_event_get_pitch(
2562+ UASOrientationEvent* event,
2563+ float* value);
2564+
2565+ /**
2566+ * \brief Query the roll (rotation around Y-axis).
2567+ * \ingroup sensor_access
2568+ * \returns U_STATUS_SUCCESS if the updates were successfully started on the service side, else U_STATUS_ERROR.
2569+ * \param[out] value The reading to be queried.
2570+ */
2571+ UBUNTU_DLL_PUBLIC UStatus
2572+ uas_orientation_event_get_roll(
2573+ UASOrientationEvent* event,
2574+ float* value);
2575+
2576+#ifdef __cplusplus
2577+}
2578+#endif
2579+
2580+#endif /* UBUNTU_APPLICATION_SENSORS_ORIENTATION_EVENT_H_ */
2581
2582=== added file 'include/ubuntu/application/sensors/haptic.h'
2583--- include/ubuntu/application/sensors/haptic.h 1970-01-01 00:00:00 +0000
2584+++ include/ubuntu/application/sensors/haptic.h 2014-08-26 16:06:15 +0000
2585@@ -0,0 +1,98 @@
2586+/*
2587+ * Copyright © 2014 Canonical Ltd.
2588+ *
2589+ * This program is free software: you can redistribute it and/or modify
2590+ * it under the terms of the GNU Lesser General Public License version 3 as
2591+ * published by the Free Software Foundation.
2592+ *
2593+ * This program is distributed in the hope that it will be useful,
2594+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2595+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2596+ * GNU Lesser General Public License for more details.
2597+ *
2598+ * You should have received a copy of the GNU Lesser General Public License
2599+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2600+ *
2601+ * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
2602+ */
2603+
2604+#ifndef UBUNTU_APPLICATION_SENSORS_HAPTIC_H_
2605+#define UBUNTU_APPLICATION_SENSORS_HAPTIC_H_
2606+
2607+#include <ubuntu/status.h>
2608+#include <ubuntu/visibility.h>
2609+
2610+#include <stdint.h>
2611+
2612+#ifdef __cplusplus
2613+extern "C" {
2614+#endif
2615+
2616+ /**
2617+ * \brief Opaque type that models the haptics device.
2618+ * \ingroup sensor_access
2619+ */
2620+ typedef void UASensorsHaptic;
2621+
2622+ /**
2623+ * \brief Create a new object for accessing the haptics device.
2624+ * \ingroup sensor_access
2625+ * \returns A new instance or NULL in case of errors.
2626+ */
2627+ UBUNTU_DLL_PUBLIC UASensorsHaptic*
2628+ ua_sensors_haptic_new();
2629+
2630+ /**
2631+ * \brief Enables the supplied haptics device.
2632+ * \ingroup sensor_access
2633+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2634+ * \param[in] sensor The sensor instance to be enabled.
2635+ */
2636+ UBUNTU_DLL_PUBLIC UStatus
2637+ ua_sensors_haptic_enable(
2638+ UASensorsHaptic* sensor);
2639+
2640+ /**
2641+ * \brief Disables the supplied haptics device.
2642+ * \ingroup sensor_access
2643+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2644+ * \param[in] sensor The sensor instance to be disabled.
2645+ */
2646+ UBUNTU_DLL_PUBLIC UStatus
2647+ ua_sensors_haptic_disable(
2648+ UASensorsHaptic* sensor);
2649+
2650+ /**
2651+ * \brief Run the vibrator for a fixed duration.
2652+ * \ingroup sensor_access
2653+ * \returns U_STATUS_SUCCESS if pushed correctly, U_STATUS_ERROR if the pattern limit is invalid or the actuator cannot be activated.
2654+ * \param[in] sensor Haptic device to activate.
2655+ * \param[in] duration How long should the vibrator stay on.
2656+ */
2657+ UBUNTU_DLL_PUBLIC UStatus
2658+ ua_sensors_haptic_vibrate_once(
2659+ UASensorsHaptic* sensor,
2660+ uint32_t duration);
2661+
2662+ #define MAX_PATTERN_SIZE 6
2663+
2664+ /**
2665+ * \brief Run the vibrator with a pattern and repeat a precise number of times.
2666+ * \ingroup sensor_access
2667+ * \returns U_STATUS_SUCCESS if pushed correctly, U_STATUS_ERROR if the pattern limit is invalid or the actuator cannot be activated.
2668+ * \param[in] sensor Haptic device to activate.
2669+ * \param[in] pattern An array of uint32_t durations for which to keep the vibrator on or off. The first value indicates how long to keep the vibrator on for, the second value how long to keep it off for, and so on until the end of the array.
2670+ * \param[in] repeat How many times to repeat the whole pattern for.
2671+ */
2672+
2673+ UBUNTU_DLL_PUBLIC UStatus
2674+ ua_sensors_haptic_vibrate_with_pattern(
2675+ UASensorsHaptic* sensor,
2676+ uint32_t pattern[MAX_PATTERN_SIZE],
2677+ uint32_t repeat);
2678+
2679+#ifdef __cplusplus
2680+}
2681+#endif
2682+
2683+#endif /* UBUNTU_APPLICATION_SENSORS_HAPTIC_H_ */
2684
2685=== modified file 'include/ubuntu/application/sensors/light.h'
2686--- include/ubuntu/application/sensors/light.h 2014-02-13 13:12:41 +0000
2687+++ include/ubuntu/application/sensors/light.h 2014-08-26 16:06:15 +0000
2688@@ -125,6 +125,18 @@
2689 on_light_event_cb cb,
2690 void *ctx);
2691
2692+ /**
2693+ * \brief Set the sensor event delivery rate in nanoseconds..
2694+ * \ingroup sensor_access
2695+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2696+ * \param[in] sensor The sensor instance to be modified.
2697+ * \param[in] rate The new event delivery rate.
2698+ */
2699+ UBUNTU_DLL_PUBLIC UStatus
2700+ ua_sensors_light_set_event_rate(
2701+ UASensorsLight* sensor,
2702+ uint32_t rate);
2703+
2704 #ifdef __cplusplus
2705 }
2706 #endif
2707
2708=== added file 'include/ubuntu/application/sensors/orientation.h'
2709--- include/ubuntu/application/sensors/orientation.h 1970-01-01 00:00:00 +0000
2710+++ include/ubuntu/application/sensors/orientation.h 2014-08-26 16:06:15 +0000
2711@@ -0,0 +1,144 @@
2712+/*
2713+ * Copyright © 2014 Canonical Ltd.
2714+ *
2715+ * This program is free software: you can redistribute it and/or modify
2716+ * it under the terms of the GNU Lesser General Public License version 3 as
2717+ * published by the Free Software Foundation.
2718+ *
2719+ * This program is distributed in the hope that it will be useful,
2720+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2721+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2722+ * GNU Lesser General Public License for more details.
2723+ *
2724+ * You should have received a copy of the GNU Lesser General Public License
2725+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2726+ *
2727+ * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
2728+ */
2729+
2730+#ifndef UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_
2731+#define UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_
2732+
2733+#include <ubuntu/status.h>
2734+#include <ubuntu/visibility.h>
2735+
2736+#include <ubuntu/application/sensors/event/orientation.h>
2737+
2738+#ifdef __cplusplus
2739+extern "C" {
2740+#endif
2741+
2742+ /**
2743+ * \brief Opaque type that models the orientation.
2744+ * \ingroup sensor_access
2745+ */
2746+ typedef void UASensorsOrientation;
2747+
2748+ /**
2749+ * \brief Callback type used by applications to subscribe to orientation events.
2750+ * \ingroup sensor_access
2751+ */
2752+ typedef void (*on_orientation_event_cb)(UASOrientationEvent* event,
2753+ void* context);
2754+
2755+ /**
2756+ * \brief Create a new object for accessing the orientation sensor.
2757+ * \ingroup sensor_access
2758+ * \returns A new instance or NULL in case of errors.
2759+ */
2760+ UBUNTU_DLL_PUBLIC UASensorsOrientation*
2761+ ua_sensors_orientation_new();
2762+
2763+ /**
2764+ * \brief Enables the supplied orientation sensor.
2765+ * \ingroup sensor_access
2766+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2767+ * \param[in] sensor The sensor instance to be enabled.
2768+ */
2769+ UBUNTU_DLL_PUBLIC UStatus
2770+ ua_sensors_orientation_enable(
2771+ UASensorsOrientation* sensor);
2772+
2773+ /**
2774+ * \brief Disables the supplied orientation sensor.
2775+ * \ingroup sensor_access
2776+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2777+ * \param[in] sensor The sensor instance to be disabled.
2778+ */
2779+ UBUNTU_DLL_PUBLIC UStatus
2780+ ua_sensors_orientation_disable(
2781+ UASensorsOrientation* sensor);
2782+
2783+ /**
2784+ * \brief Queries the minimum delay between two readings for the supplied sensor.
2785+ * \ingroup sensor_access
2786+ * \returns The minimum delay between two readings in [ms].
2787+ * \param[in] sensor The sensor instance to be queried.
2788+ */
2789+ UBUNTU_DLL_PUBLIC uint32_t
2790+ ua_sensors_orientation_get_min_delay(
2791+ UASensorsOrientation* sensor);
2792+
2793+ /**
2794+ * \brief Queries the minimum value that can be reported by the sensor.
2795+ * \ingroup sensor_access
2796+ * \returns The minimum value that can be reported by the sensor.
2797+ * \param[in] sensor The sensor instance to be queried.
2798+ */
2799+ UBUNTU_DLL_PUBLIC UStatus
2800+ ua_sensors_orientation_get_min_value(
2801+ UASensorsOrientation* sensor,
2802+ float* value);
2803+
2804+ /**
2805+ * \brief Queries the maximum value that can be reported by the sensor.
2806+ * \ingroup sensor_access
2807+ * \returns The maximum value that can be reported by the sensor.
2808+ * \param[in] sensor The sensor instance to be queried.
2809+ */
2810+ UBUNTU_DLL_PUBLIC UStatus
2811+ ua_sensors_orientation_get_max_value(
2812+ UASensorsOrientation* sensor,
2813+ float* value);
2814+
2815+ /**
2816+ * \brief Queries the numeric resolution supported by the sensor
2817+ * \ingroup sensor_access
2818+ * \returns The numeric resolution supported by the sensor.
2819+ * \param[in] sensor The sensor instance to be queried.
2820+ */
2821+ UBUNTU_DLL_PUBLIC UStatus
2822+ ua_sensors_orientation_get_resolution(
2823+ UASensorsOrientation* sensor,
2824+ float* value);
2825+
2826+ /**
2827+ * \brief Set the callback to be invoked whenever a new sensor reading is available.
2828+ * \ingroup sensor_access
2829+ * \param[in] sensor The sensor instance to associate the callback with.
2830+ * \param[in] cb The callback to be invoked.
2831+ * \param[in] ctx The context supplied to the callback invocation.
2832+ */
2833+ UBUNTU_DLL_PUBLIC void
2834+ ua_sensors_orientation_set_reading_cb(
2835+ UASensorsOrientation* sensor,
2836+ on_orientation_event_cb cb,
2837+ void *ctx);
2838+
2839+ /**
2840+ * \brief Set the sensor event delivery rate in nanoseconds..
2841+ * \ingroup sensor_access
2842+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2843+ * \param[in] sensor The sensor instance to be modified.
2844+ * \param[in] rate The new event delivery rate.
2845+ */
2846+ UBUNTU_DLL_PUBLIC UStatus
2847+ ua_sensors_orientation_set_event_rate(
2848+ UASensorsOrientation* sensor,
2849+ uint32_t rate);
2850+
2851+#ifdef __cplusplus
2852+}
2853+#endif
2854+
2855+#endif /* UBUNTU_APPLICATION_SENSORS_ORIENTATION_H_ */
2856
2857=== modified file 'include/ubuntu/application/sensors/proximity.h'
2858--- include/ubuntu/application/sensors/proximity.h 2014-02-13 13:12:41 +0000
2859+++ include/ubuntu/application/sensors/proximity.h 2014-08-26 16:06:15 +0000
2860@@ -125,6 +125,18 @@
2861 on_proximity_event_cb cb,
2862 void *ctx);
2863
2864+ /**
2865+ * \brief Set the sensor event delivery rate in nanoseconds..
2866+ * \ingroup sensor_access
2867+ * \returns U_STATUS_SUCCESS if successful or U_STATUS_ERROR if an error occured.
2868+ * \param[in] sensor The sensor instance to be modified.
2869+ * \param[in] rate The new event delivery rate.
2870+ */
2871+ UBUNTU_DLL_PUBLIC UStatus
2872+ ua_sensors_proximity_set_event_rate(
2873+ UASensorsProximity* sensor,
2874+ uint32_t rate);
2875+
2876 #ifdef __cplusplus
2877 }
2878 #endif
2879
2880=== removed file 'include/ubuntu/application/sensors/ubuntu_application_sensors.h'
2881--- include/ubuntu/application/sensors/ubuntu_application_sensors.h 2014-02-13 13:12:41 +0000
2882+++ include/ubuntu/application/sensors/ubuntu_application_sensors.h 1970-01-01 00:00:00 +0000
2883@@ -1,160 +0,0 @@
2884-/*
2885- * Copyright © 2012 Canonical Ltd.
2886- *
2887- * This program is free software: you can redistribute it and/or modify
2888- * it under the terms of the GNU Lesser General Public License version 3 as
2889- * published by the Free Software Foundation.
2890- *
2891- * This program is distributed in the hope that it will be useful,
2892- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2893- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2894- * GNU Lesser General Public License for more details.
2895- *
2896- * You should have received a copy of the GNU Lesser General Public License
2897- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2898- *
2899- * Authored by: Thomas Voß <thomas.voss@canonical.com>
2900- */
2901-#ifndef UBUNTU_APPLICATION_SENSORS_C_API_H_
2902-#define UBUNTU_APPLICATION_SENSORS_C_API_H_
2903-
2904-#include <ubuntu/status.h>
2905-#include <ubuntu/visibility.h>
2906-
2907-#include <stdint.h>
2908-
2909-#ifdef __cplusplus
2910-extern "C" {
2911-#endif
2912-
2913- /** \defgroup sensor_access Functions and types to access sensor devices. */
2914-
2915- /** A timestamped accelerometer reading
2916- * \ingroup sensor_access
2917- */
2918- typedef struct
2919- {
2920- int64_t timestamp;
2921-
2922- float acceleration_x;
2923- float acceleration_y;
2924- float acceleration_z;
2925- } ubuntu_sensor_accelerometer_reading;
2926-
2927- /** A timestamped proximity sensor reading
2928- * \ingroup sensor_access
2929- */
2930- typedef struct
2931- {
2932- int64_t timestamp;
2933-
2934- float distance;
2935- } ubuntu_sensor_proximity_reading;
2936-
2937- /** A timestamped ambient light sensor reading
2938- * \ingroup sensor_access
2939- */
2940- typedef struct
2941- {
2942- int64_t timestamp;
2943-
2944- float light;
2945- } ubuntu_sensor_ambient_light_reading;
2946-
2947- /** Describes the sensor types known to the system
2948- * \ingroup sensor_access
2949- */
2950- enum ubuntu_sensor_type
2951- {
2952- first_defined_sensor_type = 0,
2953- ubuntu_sensor_type_accelerometer = first_defined_sensor_type,
2954- ubuntu_sensor_type_magnetic_field,
2955- ubuntu_sensor_type_gyroscope,
2956- ubuntu_sensor_type_light,
2957- ubuntu_sensor_type_proximity,
2958- ubuntu_sensor_type_orientation,
2959- ubuntu_sensor_type_linear_acceleration,
2960- ubuntu_sensor_type_rotation_vector,
2961- undefined_sensor_type
2962- };
2963-
2964- /** Callback that is invoked for new accelerometer readings.
2965- * \ingroup sensor_access
2966- * \param reading [in] The new reading.
2967- * \param context [in] The callback context.
2968- */
2969- typedef void (*on_new_accelerometer_reading)(ubuntu_sensor_accelerometer_reading* reading, void* context);
2970-
2971- /** Callback that is invoked for new proximity sensor readings.
2972- * \ingroup sensor_access
2973- * \param reading [in] The new reading.
2974- * \param context [in] The callback context.
2975- */
2976- typedef void (*on_new_proximity_reading)(ubuntu_sensor_proximity_reading* reading, void* context);
2977-
2978- /** Callback that is invoked for new ambient light sensor readings.
2979- * \ingroup sensor_access
2980- * \param reading [in] The new reading.
2981- * \param context [in] The callback context.
2982- */
2983- typedef void (*on_new_ambient_light_reading)(ubuntu_sensor_ambient_light_reading* reading, void* context);
2984-
2985- /** Models a sensor observer.
2986- * \ingroup sensor_access
2987- */
2988- typedef struct
2989- {
2990- /** Invoked for new readings from an accelerometer. */
2991- on_new_accelerometer_reading on_new_accelerometer_reading_cb;
2992- /** Invoked for new readings from a proximity sensor. */
2993- on_new_proximity_reading on_new_proximity_reading_cb;
2994- /** Invoked for new readings from an ambient light sensor. */
2995- on_new_ambient_light_reading on_new_ambient_light_reading_cb;
2996-
2997- /** Callback context. */
2998- void* context;
2999- } ubuntu_sensor_observer;
3000-
3001- UBUNTU_DLL_PUBLIC void ubuntu_sensor_initialize_observer(ubuntu_sensor_observer* observer);
3002- /** Installs the supplied observer.
3003- * \ingroup sensor_access
3004- */
3005- UBUNTU_DLL_PUBLIC void ubuntu_sensor_install_observer(ubuntu_sensor_observer* observer);
3006- /** Uninstalls the supplied observer.
3007- * \ingroup sensor_access
3008- */
3009- UBUNTU_DLL_PUBLIC void ubuntu_sensor_uninstall_observer(ubuntu_sensor_observer* observer);
3010-
3011- /** Enables the specified sensor type and starts data acquisition.
3012- * \ingroup sensor_access
3013- */
3014- UBUNTU_DLL_PUBLIC void ubuntu_sensor_enable_sensor(ubuntu_sensor_type sensor_type);
3015- /** Disables the specified sensor type and starts data acquisition.
3016- * \ingroup sensor_access
3017- */
3018- UBUNTU_DLL_PUBLIC void ubuntu_sensor_disable_sensor(ubuntu_sensor_type sensor_type);
3019- /** Returns the minimum sensor sampling delay in Hz.
3020- * \ingroup sensor_access
3021- */
3022- UBUNTU_DLL_PUBLIC int32_t ubuntu_sensor_get_sensor_min_delay(ubuntu_sensor_type sensor_type);
3023- /** Returns the minimum valid value for the sensor_type.
3024- * \ingroup sensor_access
3025- */
3026- UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_min_value(ubuntu_sensor_type sensor_type, float* value);
3027-
3028- /** Returns the maximum valid value for the sensor_type.
3029- * \ingroup sensor_access
3030- */
3031- UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_max_value(ubuntu_sensor_type sensor_type, float* value);
3032-
3033- /** Returns the resolution of valid values for the sensor_type.
3034- * \ingroup sensor_access
3035- */
3036- UBUNTU_DLL_PUBLIC UStatus ubuntu_sensor_get_sensor_resolution(ubuntu_sensor_type sensor_type, float* value);
3037-
3038- /** \example test_sensors_api.cpp */
3039-#ifdef __cplusplus
3040-}
3041-#endif
3042-
3043-#endif // UBUNTU_APPLICATION_SENSORS_C_API_H_
3044
3045=== modified file 'include/ubuntu/application/ui/CMakeLists.txt'
3046--- include/ubuntu/application/ui/CMakeLists.txt 2013-08-18 20:33:22 +0000
3047+++ include/ubuntu/application/ui/CMakeLists.txt 2014-08-26 16:06:15 +0000
3048@@ -12,6 +12,7 @@
3049 session.h
3050 stage.h
3051 window.h
3052+ window_orientation.h
3053 window_parent.h
3054 window_properties.h
3055 window_state.h
3056
3057=== modified file 'include/ubuntu/application/ui/input/CMakeLists.txt'
3058--- include/ubuntu/application/ui/input/CMakeLists.txt 2013-07-18 09:08:17 +0000
3059+++ include/ubuntu/application/ui/input/CMakeLists.txt 2014-08-26 16:06:15 +0000
3060@@ -1,9 +1,5 @@
3061-set(
3062- UBUNTU_APPLICATION_UI_INPUT_HEADERS
3063- event.h
3064+install(
3065+ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
3066+ DESTINATION include/ubuntu/application/ui
3067+ FILES_MATCHING PATTERN "*.h"
3068 )
3069-
3070-install(
3071- FILES ${UBUNTU_APPLICATION_UI_INPUT_HEADERS}
3072- DESTINATION include/ubuntu/application/ui/input
3073-)
3074\ No newline at end of file
3075
3076=== modified file 'include/ubuntu/application/ui/input/event.h'
3077--- include/ubuntu/application/ui/input/event.h 2013-08-22 06:32:14 +0000
3078+++ include/ubuntu/application/ui/input/event.h 2014-08-26 16:06:15 +0000
3079@@ -1,5 +1,5 @@
3080 /*
3081- * Copyright © 2012 Canonical Ltd.
3082+ * Copyright © 2012-2014 Canonical Ltd.
3083 *
3084 * This program is free software: you can redistribute it and/or modify
3085 * it under the terms of the GNU Lesser General Public License version 3 as
3086@@ -14,11 +14,13 @@
3087 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3088 *
3089 * Authored by: Thomas Voß <thomas.voss@canonical.com>
3090+ * Daniel d'Andrada <daniel.dandrada@canonical.com>
3091 */
3092 #ifndef UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
3093 #define UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
3094
3095 #include <ubuntu/visibility.h>
3096+#include <ubuntu/application/ui/window_orientation.h>
3097
3098 #include <stddef.h>
3099 #include <stdint.h>
3100@@ -102,82 +104,123 @@
3101 } UMotionButtonMask;
3102
3103
3104- /** Maximum number of pointers reported within one input event. */
3105+ /** Maximum number of pointers reported within one event. */
3106 #define UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT (16)
3107
3108- /** Reference timebase, nanoseconds as measured by CLOCK_MONOTONIC. */
3109- typedef int64_t nsecs_t;
3110-
3111- /** Describes the different event types. */
3112- typedef enum
3113- {
3114- KEY_EVENT_TYPE, ///< Event originates from a keyboard.
3115- MOTION_EVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
3116- HW_SWITCH_EVENT_TYPE ///< Event originates from an additional button attached to the device's HW, e.g., power button.
3117- } EventType;
3118-
3119- /** Models an input event. */
3120- typedef struct
3121- {
3122- EventType type; ///< Type of the event.
3123- int32_t device_id; ///< Device that this event originated from.
3124- int32_t source_id; ///< Source that this event originated from.
3125- int32_t action; ///< Action signalled by this event.
3126- int32_t flags; ///< Flags associated with this event.
3127- int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
3128- /** Information specific to key/motion event types. */
3129- union
3130- {
3131- /** Information describing an event originating from a HW switch. */
3132- struct HardwareSwitchEvent
3133- {
3134- nsecs_t event_time; ///< Timestamp when the event happened.
3135- uint32_t policy_flags; ///< Policy flags.
3136- int32_t switch_code; ///< The scan code of the switch.
3137- int32_t switch_value; ///< The value reported by the switch.
3138- } hw_switch;
3139- /** Information describing an event originating from a keyboard key. */
3140- struct KeyEvent
3141- {
3142- int32_t key_code;
3143- int32_t scan_code;
3144- int32_t repeat_count;
3145- nsecs_t down_time;
3146- nsecs_t event_time;
3147- int is_system_key; ///< \deprecated Do not use.
3148- } key;
3149- /** Information describing an event originating from a
3150- * "moving" device, e.g., a mouse, a mouse-wheel, a finger
3151- * on a touchpad.
3152- */
3153- struct MotionEvent
3154- {
3155- int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
3156- int32_t button_state; ///< State of buttons of the device
3157- float x_offset; ///< Movement in x direction since down event
3158- float y_offset; ///< Movement in y direction since down event
3159- float x_precision; ///< Sampling precision in x direction
3160- float y_precision; ///< Sampling precision in y direction
3161- nsecs_t down_time; ///< Timestamp that marks the down event
3162- nsecs_t event_time; ///< Timestamp that marks when this event happened
3163- size_t pointer_count; ///< Number of pointers reported in this event
3164- struct PointerCoordinate
3165- {
3166- int id; ///< Unique id of the pointer
3167- float x, raw_x; ///< Processed and raw x coordinates
3168- float y, raw_y; ///< Processed and raw y coordinates
3169- float touch_major; ///< Touch major coordinate
3170- float touch_minor; ///< Touch minor coordinate
3171- float size; ///< Size of the pointer/touch
3172- float pressure; ///< Pressure of the touch
3173- float orientation; ///< Orientation
3174- } pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
3175- } motion;
3176- } details;
3177- } Event;
3178+/** Reference timebase, nanoseconds as measured by CLOCK_MONOTONIC. */
3179+typedef int64_t nsecs_t;
3180+
3181+typedef enum
3182+{
3183+ SURFACE_ATTRIBUTE_FOCUS
3184+} SurfaceAttributeType;
3185+
3186+/** Describes the different event types. */
3187+typedef enum
3188+{
3189+ KEY_WEVENT_TYPE, ///< Event originates from a keyboard.
3190+ MOTION_WEVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
3191+ RESIZE_WEVENT_TYPE, ///< Surface has been resized
3192+ SURFACE_WEVENT_TYPE, ///< A surface attribute has changed its value
3193+ ORIENTATION_WEVENT_TYPE, ///< The device orientation changed
3194+} WindowEventType;
3195+
3196+/** Information describing an event originating from a keyboard key. */
3197+typedef struct
3198+{
3199+ WindowEventType type;
3200+
3201+ int32_t device_id; ///< Device that this event originated from.
3202+ int32_t source_id; ///< Source that this event originated from.
3203+ int32_t action; ///< Action signalled by this event.
3204+ int32_t flags; ///< Flags associated with this event.
3205+ int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
3206+
3207+ int32_t key_code;
3208+ int32_t scan_code;
3209+ int32_t repeat_count;
3210+ nsecs_t down_time;
3211+ nsecs_t event_time;
3212+ int is_system_key; ///< \deprecated Do not use.
3213+} KeyEvent;
3214+
3215+struct PointerCoordinate
3216+{
3217+ int id; ///< Unique id of the pointer
3218+ float x, raw_x; ///< Processed and raw x coordinates
3219+ float y, raw_y; ///< Processed and raw y coordinates
3220+ float touch_major; ///< Touch major coordinate
3221+ float touch_minor; ///< Touch minor coordinate
3222+ float size; ///< Size of the pointer/touch
3223+ float pressure; ///< Pressure of the touch
3224+ float orientation; ///< Orientation
3225+};
3226+
3227+/** Information describing an event originating from a
3228+ * "moving" device, e.g., a mouse, a mouse-wheel, a finger
3229+ * on a touchpad.
3230+ */
3231+typedef struct
3232+{
3233+ WindowEventType type;
3234+
3235+ int32_t device_id; ///< Device that this event originated from.
3236+ int32_t source_id; ///< Source that this event originated from.
3237+ int32_t action; ///< Action signalled by this event.
3238+ int32_t flags; ///< Flags associated with this event.
3239+ int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
3240+
3241+ int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
3242+ int32_t button_state; ///< State of buttons of the device
3243+ float x_offset; ///< Movement in x direction since down event
3244+ float y_offset; ///< Movement in y direction since down event
3245+ float x_precision; ///< Sampling precision in x direction
3246+ float y_precision; ///< Sampling precision in y direction
3247+ nsecs_t down_time; ///< Timestamp that marks the down event
3248+ nsecs_t event_time; ///< Timestamp that marks when this event happened
3249+ size_t pointer_count; ///< Number of pointers reported in this event
3250+ struct PointerCoordinate pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
3251+} MotionEvent;
3252+
3253+typedef struct
3254+{
3255+ WindowEventType type;
3256+
3257+ SurfaceAttributeType attribute; ///< The surface attribute that has changed
3258+ int32_t value; ///< The new value of that surface attribute.
3259+} SurfaceEvent;
3260+
3261+/** Information describing a surface resize event. */
3262+typedef struct
3263+{
3264+ WindowEventType type;
3265+
3266+ int32_t width; ///< The new surface width
3267+ int32_t height; ///< The new surface height.
3268+} ResizeEvent;
3269+
3270+/** Information describing a surface orientation change event. */
3271+typedef struct
3272+{
3273+ WindowEventType type;
3274+
3275+ UApplicationUiWindowOrientation direction; ///< The new surface orientation
3276+} OrientationEvent;
3277+
3278+typedef union
3279+{
3280+ WindowEventType type;
3281+ KeyEvent key;
3282+ MotionEvent motion;
3283+ SurfaceEvent surface;
3284+ ResizeEvent resize;
3285+ OrientationEvent orientation;
3286+} WindowEvent;
3287
3288 #ifdef __cplusplus
3289 }
3290 #endif
3291
3292+#include "event_deprecated.h"
3293+
3294 #endif // UBUNTU_APPLICATION_UI_INPUT_EVENT_H_
3295
3296=== added file 'include/ubuntu/application/ui/input/event_deprecated.h'
3297--- include/ubuntu/application/ui/input/event_deprecated.h 1970-01-01 00:00:00 +0000
3298+++ include/ubuntu/application/ui/input/event_deprecated.h 2014-08-26 16:06:15 +0000
3299@@ -0,0 +1,88 @@
3300+/*
3301+ * Copyright © 2014 Canonical Ltd.
3302+ *
3303+ * This program is free software: you can redistribute it and/or modify
3304+ * it under the terms of the GNU Lesser General Public License version 3 as
3305+ * published by the Free Software Foundation.
3306+ *
3307+ * This program is distributed in the hope that it will be useful,
3308+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3309+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3310+ * GNU Lesser General Public License for more details.
3311+ *
3312+ * You should have received a copy of the GNU Lesser General Public License
3313+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3314+ *
3315+ * Authored by: Thomas Voß <thomas.voss@canonical.com>
3316+ */
3317+
3318+#ifndef UBUNTU_APPLICATION_UI__EVENT_DEPRECATED_H_
3319+#define UBUNTU_APPLICATION_UI__EVENT_DEPRECATED_H_
3320+
3321+#ifdef __cplusplus
3322+extern "C" {
3323+#endif
3324+
3325+ /** Describes the different event types. */
3326+ typedef enum
3327+ {
3328+ KEY_EVENT_TYPE, ///< Event originates from a keyboard.
3329+ MOTION_EVENT_TYPE, ///< Event originates from something moving, e.g., a wheel, a mouse, a finger on a touchpad.
3330+ HW_SWITCH_EVENT_TYPE ///< Event originates from an additional button attached to the device's HW, e.g., power button.
3331+ } EventType;
3332+
3333+ /** Models an input event. */
3334+ typedef struct
3335+ {
3336+ EventType type; ///< Type of the event.
3337+ int32_t device_id; ///< Device that this event originated from.
3338+ int32_t source_id; ///< Source that this event originated from.
3339+ int32_t action; ///< Action signalled by this event.
3340+ int32_t flags; ///< Flags associated with this event.
3341+ int32_t meta_state; ///< State of the meta modifiers (ALT, CTRL, SHIFT).
3342+ /** Information specific to key/motion event types. */
3343+ union
3344+ {
3345+ /** Information describing an event originating from a HW switch. */
3346+ struct HardwareSwitchEvent
3347+ {
3348+ nsecs_t event_time; ///< Timestamp when the event happened.
3349+ uint32_t policy_flags; ///< Policy flags.
3350+ int32_t switch_code; ///< The scan code of the switch.
3351+ int32_t switch_value; ///< The value reported by the switch.
3352+ } hw_switch;
3353+ /** Information describing an event originating from a keyboard key. */
3354+ struct KeyEvent
3355+ {
3356+ int32_t key_code;
3357+ int32_t scan_code;
3358+ int32_t repeat_count;
3359+ nsecs_t down_time;
3360+ nsecs_t event_time;
3361+ int is_system_key; ///< \deprecated Do not use.
3362+ } key;
3363+ /** Information describing an event originating from a
3364+ * "moving" device, e.g., a mouse, a mouse-wheel, a finger
3365+ * on a touchpad.
3366+ */
3367+ struct MotionEvent
3368+ {
3369+ int32_t edge_flags; ///< Set for touches intersecting a touchscreen's edges, requires HW support.
3370+ int32_t button_state; ///< State of buttons of the device
3371+ float x_offset; ///< Movement in x direction since down event
3372+ float y_offset; ///< Movement in y direction since down event
3373+ float x_precision; ///< Sampling precision in x direction
3374+ float y_precision; ///< Sampling precision in y direction
3375+ nsecs_t down_time; ///< Timestamp that marks the down event
3376+ nsecs_t event_time; ///< Timestamp that marks when this event happened
3377+ size_t pointer_count; ///< Number of pointers reported in this event
3378+ struct PointerCoordinate pointer_coordinates[UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT]; ///< Pointer information, valid from [0,pointer_count).
3379+ } motion;
3380+ } details;
3381+ } Event;
3382+
3383+#ifdef __cplusplus
3384+}
3385+#endif
3386+
3387+#endif // UBUNTU_APPLICATION_UI__EVENT_DEPRECATED_H_
3388
3389=== modified file 'include/ubuntu/application/ui/window.h'
3390--- include/ubuntu/application/ui/window.h 2014-05-07 12:21:22 +0000
3391+++ include/ubuntu/application/ui/window.h 2014-08-26 16:06:15 +0000
3392@@ -25,6 +25,7 @@
3393 #include <ubuntu/status.h>
3394 #include <ubuntu/application/instance.h>
3395 #include <ubuntu/application/ui/window_properties.h>
3396+#include <ubuntu/application/ui/window_orientation.h>
3397
3398 #include <EGL/egl.h>
3399
3400@@ -34,7 +35,10 @@
3401
3402 typedef void UAUiWindow;
3403 typedef int32_t UAUiWindowId;
3404-
3405+
3406+ /*
3407+ Ownership of properties is given to the returned UAUiWindow
3408+ */
3409 UBUNTU_DLL_PUBLIC UAUiWindow*
3410 ua_ui_window_new_for_application_with_properties(
3411 UApplicationInstance *instance,
3412@@ -82,6 +86,14 @@
3413 ua_ui_window_get_native_type(
3414 UAUiWindow *window);
3415
3416+ UBUNTU_DLL_PUBLIC int
3417+ ua_ui_window_is_focused(
3418+ UAUiWindow *window);
3419+
3420+ UBUNTU_DLL_PUBLIC UApplicationUiWindowOrientation
3421+ ua_ui_window_get_orientation(
3422+ UAUiWindow *window);
3423+
3424 #ifdef __cplusplus
3425 }
3426 #endif
3427
3428=== added file 'include/ubuntu/application/ui/window_orientation.h'
3429--- include/ubuntu/application/ui/window_orientation.h 1970-01-01 00:00:00 +0000
3430+++ include/ubuntu/application/ui/window_orientation.h 2014-08-26 16:06:15 +0000
3431@@ -0,0 +1,27 @@
3432+/*
3433+ * Copyright © 2014 Canonical Ltd.
3434+ *
3435+ * This program is free software: you can redistribute it and/or modify
3436+ * it under the terms of the GNU Lesser General Public License version 3 as
3437+ * published by the Free Software Foundation.
3438+ *
3439+ * This program is distributed in the hope that it will be useful,
3440+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3441+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3442+ * GNU Lesser General Public License for more details.
3443+ *
3444+ * You should have received a copy of the GNU Lesser General Public License
3445+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3446+ */
3447+
3448+#ifndef UBUNTU_APPLICATION_UI_WINDOW_ORIENTATION_H
3449+#define UBUNTU_APPLICATION_UI_WINDOW_ORIENTATION_H
3450+
3451+typedef enum {
3452+ U_ORIENTATION_NORMAL = 1,
3453+ U_ORIENTATION_LEFT,
3454+ U_ORIENTATION_RIGHT,
3455+ U_ORIENTATION_INVERTED,
3456+} UApplicationUiWindowOrientation;
3457+
3458+#endif // UBUNTU_APPLICATION_UI_WINDOW_ORIENTATION_H
3459
3460=== modified file 'include/ubuntu/application/ui/window_properties.h'
3461--- include/ubuntu/application/ui/window_properties.h 2013-12-11 04:56:15 +0000
3462+++ include/ubuntu/application/ui/window_properties.h 2014-08-26 16:06:15 +0000
3463@@ -39,10 +39,13 @@
3464 U_SHUTDOWN_DIALOG_ROLE,
3465 } UAUiWindowRole;
3466
3467-
3468+ // Deprecated! Use UAUiWindowEventCb instead
3469 typedef void (*input_event_cb)(void* ctx, const Event* ev);
3470 typedef input_event_cb UAUiWindowInputEventCb;
3471
3472+ typedef void (*event_cb)(void* ctx, const WindowEvent* ev);
3473+ typedef event_cb UAUiWindowEventCb;
3474+
3475 typedef void UAUiWindowProperties;
3476
3477 UBUNTU_DLL_PUBLIC UAUiWindowProperties*
3478@@ -70,7 +73,8 @@
3479 UBUNTU_DLL_PUBLIC UAUiWindowRole
3480 ua_ui_window_properties_get_role(
3481 UAUiWindowProperties *properties);
3482-
3483+
3484+ // Deprecated! Use ua_ui_window_properties_set_event_cb_and_ctx instead.
3485 UBUNTU_DLL_PUBLIC void
3486 ua_ui_window_properties_set_input_cb_and_ctx(
3487 UAUiWindowProperties *properties,
3488@@ -78,6 +82,12 @@
3489 void *ctx);
3490
3491 UBUNTU_DLL_PUBLIC void
3492+ ua_ui_window_properties_set_event_cb_and_ctx(
3493+ UAUiWindowProperties *properties,
3494+ UAUiWindowEventCb cb,
3495+ void *ctx);
3496+
3497+ UBUNTU_DLL_PUBLIC void
3498 ua_ui_window_properties_set_dimensions(
3499 UAUiWindowProperties *properties,
3500 uint32_t width,
3501
3502=== modified file 'include/ubuntu/hardware/CMakeLists.txt'
3503--- include/ubuntu/hardware/CMakeLists.txt 2013-07-18 09:08:17 +0000
3504+++ include/ubuntu/hardware/CMakeLists.txt 2014-08-26 16:06:15 +0000
3505@@ -1,9 +1,10 @@
3506 set(
3507 UBUNTU_HARDWARE_HEADERS
3508+ alarm.h
3509 gps.h
3510 )
3511
3512 install(
3513 FILES ${UBUNTU_HARDWARE_HEADERS}
3514 DESTINATION include/ubuntu/hardware
3515-)
3516\ No newline at end of file
3517+)
3518
3519=== added file 'include/ubuntu/hardware/alarm.h'
3520--- include/ubuntu/hardware/alarm.h 1970-01-01 00:00:00 +0000
3521+++ include/ubuntu/hardware/alarm.h 2014-08-26 16:06:15 +0000
3522@@ -0,0 +1,104 @@
3523+/*
3524+ * Copyright © 2014 Canonical Ltd.
3525+ *
3526+ * This program is free software: you can redistribute it and/or modify
3527+ * it under the terms of the GNU Lesser General Public License version 3 as
3528+ * published by the Free Software Foundation.
3529+ *
3530+ * This program is distributed in the hope that it will be useful,
3531+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3532+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3533+ * GNU Lesser General Public License for more details.
3534+ *
3535+ * You should have received a copy of the GNU Lesser General Public License
3536+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3537+ *
3538+ * Authored by: Thomas Voß <thomas.voss@canonical.com>
3539+ */
3540+#ifndef UBUNTU_HARDWARE_ALARM_H_
3541+#define UBUNTU_HARDWARE_ALARM_H_
3542+
3543+#include <ubuntu/status.h>
3544+#include <ubuntu/visibility.h>
3545+
3546+#ifdef __cplusplus
3547+extern "C" {
3548+#endif
3549+
3550+/** The time reference that alarms are setup to. */
3551+typedef enum
3552+{
3553+ U_HARDWARE_ALARM_TIME_REFERENCE_BOOT, /**< Relative to the device's boot time, including sleep. */
3554+ U_HARDWARE_ALARM_TIME_REFERENCE_RTC /**< Wall clock time in UTC. */
3555+} UbuntuHardwareAlarmTimeReference;
3556+
3557+typedef UbuntuHardwareAlarmTimeReference UHardwareAlarmTimeReference;
3558+
3559+/** Describes if an alarm is able to wakup the device from sleep. */
3560+typedef enum
3561+{
3562+ /** Alarm will wakeup the device from sleep. */
3563+ U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE,
3564+ /** Alarm will not wakeup the device and will be delivered on the next wakeup of the device */
3565+ U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP
3566+} UbuntuHardwareAlarmSleepBehavior;
3567+
3568+typedef UbuntuHardwareAlarmSleepBehavior UHardwareAlarmSleepBehavior;
3569+
3570+/** Bundles the time reference and sleep/wakeup behavior when waiting for an alarm to happen. */
3571+typedef struct
3572+{
3573+ UHardwareAlarmTimeReference reference;
3574+ UHardwareAlarmSleepBehavior sleep_behavior;
3575+} UbuntuHardwareAlarmWaitResult;
3576+
3577+typedef UbuntuHardwareAlarmWaitResult UHardwareAlarmWaitResult;
3578+
3579+/** Opaque type modelling access to the kernel/hw-level alarm capabilities. */
3580+typedef struct UbuntuHardwareAlarm* UHardwareAlarm;
3581+
3582+/** Creates an instance and/or increments its refcount. */
3583+UBUNTU_DLL_PUBLIC UHardwareAlarm
3584+u_hardware_alarm_create();
3585+
3586+/** Increments the instance's ref count. */
3587+UBUNTU_DLL_PUBLIC void
3588+u_hardware_alarm_ref(
3589+ UHardwareAlarm alarm);
3590+
3591+/** Decrements the instance's ref count. */
3592+UBUNTU_DLL_PUBLIC void
3593+u_hardware_alarm_unref(
3594+ UHardwareAlarm alarm);
3595+
3596+/** Query the time that elapsed since boot, including deep sleeps. */
3597+UBUNTU_DLL_PUBLIC UStatus
3598+u_hardware_alarm_get_elapsed_real_time(
3599+ UHardwareAlarm alarm,
3600+ struct timespec *tz);
3601+
3602+/** Reports a timezone change to kernel and HW. */
3603+UBUNTU_DLL_PUBLIC UStatus
3604+u_hardware_alarm_set_timezone(
3605+ UHardwareAlarm alarm,
3606+ const struct timezone *tz);
3607+
3608+/** Sets and arms a timer. */
3609+UBUNTU_DLL_PUBLIC UStatus
3610+u_hardware_alarm_set_relative_to_with_behavior(
3611+ UHardwareAlarm alarm,
3612+ UHardwareAlarmTimeReference time_reference,
3613+ UHardwareAlarmSleepBehavior behavior,
3614+ const struct timespec *ts);
3615+
3616+/** Blocks until the next alarm occurs. */
3617+UBUNTU_DLL_PUBLIC UStatus
3618+u_hardware_alarm_wait_for_next_alarm(
3619+ UHardwareAlarm alarm,
3620+ UHardwareAlarmWaitResult *result);
3621+
3622+#ifdef __cplusplus
3623+}
3624+#endif
3625+
3626+#endif
3627
3628=== modified file 'include/ubuntu/hardware/gps.h'
3629--- include/ubuntu/hardware/gps.h 2013-08-22 07:17:47 +0000
3630+++ include/ubuntu/hardware/gps.h 2014-08-26 16:06:15 +0000
3631@@ -180,6 +180,37 @@
3632 U_HARDWARE_GPS_AGPS_DATA_CONN_FAILED = 5
3633 };
3634
3635+/** Flags used to specify which aiding data to delete
3636+ when calling delete_aiding_data(). */
3637+typedef uint16_t UHardwareGpsAidingData;
3638+
3639+#define U_HARDWARE_GPS_DELETE_EPHEMERIS 0x0001
3640+#define U_HARDWARE_GPS_DELETE_ALMANAC 0x0002
3641+#define U_HARDWARE_GPS_DELETE_POSITION 0x0004
3642+#define U_HARDWARE_GPS_DELETE_TIME 0x0008
3643+#define U_HARDWARE_GPS_DELETE_IONO 0x0010
3644+#define U_HARDWARE_GPS_DELETE_UTC 0x0020
3645+#define U_HARDWARE_GPS_DELETE_HEALTH 0x0040
3646+#define U_HARDWARE_GPS_DELETE_SVDIR 0x0080
3647+#define U_HARDWARE_GPS_DELETE_SVSTEER 0x0100
3648+#define U_HARDWARE_GPS_DELETE_SADATA 0x0200
3649+#define U_HARDWARE_GPS_DELETE_RTI 0x0400
3650+#define U_HARDWARE_GPS_DELETE_CELLDB_INFO 0x8000
3651+#define U_HARDWARE_GPS_DELETE_ALL 0xFFFF
3652+
3653+/** AGPS type */
3654+typedef uint16_t UHardwareGpsAGpsType;
3655+#define U_HARDWARE_GPS_AGPS_TYPE_SUPL 1
3656+#define U_HARDWARE_GPS_AGPS_TYPE_C2K 2
3657+
3658+/** Known types for AGps reference locations. */
3659+/** A GSM cell ID. */
3660+#define U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_GSM_CELLID 1
3661+/** A UMTS cell ID. */
3662+#define U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_UMTS_CELLID 2
3663+/** The BSSID of a visible access point. */
3664+#define U_HARDWARE_GPS_AGPS_REG_LOCATION_TYPE_MAC 3
3665+
3666 /** UHardwareGpsLocation has valid latitude and longitude. */
3667 #define U_HARDWARE_GPS_LOCATION_HAS_LAT_LONG 0x0001
3668 /** UHardwareGpsLocation has valid altitude. */
3669@@ -207,8 +238,7 @@
3670 double latitude;
3671 /** Represents longitude in degrees. */
3672 double longitude;
3673- /** Represents altitude in meters above the WGS 84 reference
3674- * ellipsoid. */
3675+ /** Represents altitude in meters above the WGS 84 reference ellipsoid. */
3676 double altitude;
3677 /** Represents speed in meters per second. */
3678 float speed;
3679@@ -281,6 +311,46 @@
3680 uint32_t ipaddr;
3681 } UHardwareGpsAGpsStatus;
3682
3683+/** \brief Describes a cell ID as understood by the GPS chipset. */
3684+typedef struct
3685+{
3686+ /** One of:
3687+ * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_GSM_CELLID
3688+ * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_UMTS_CELLID
3689+ */
3690+ uint16_t type;
3691+ /** Mobile country code. */
3692+ uint16_t mcc;
3693+ /** Mobile network code. */
3694+ uint16_t mnc;
3695+ /** Location area code. */
3696+ uint16_t lac;
3697+ /** The actual cell id. */
3698+ uint32_t cid;
3699+} UHardwareGpsAGpsRefLocationCellID;
3700+
3701+/** \brief Describes a wifi ID as understood by the GPS chipset. */
3702+typedef struct
3703+{
3704+ /** The MAC address/BSSID of an AP. */
3705+ uint8_t mac[6];
3706+} UHardwareGpsAGpsRefLocationMac;
3707+
3708+/** @brief Describes a reference location, either a radio cell or a wifi. */
3709+typedef struct
3710+{
3711+ /** One of:
3712+ * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_GSM_CELLID
3713+ * U_HARDWARE_GPS_AGPS_REF_LOCATION_TYPE_UMTS_CELLID
3714+ * U_HARDWARE_GPS_AGPS_REG_LOCATION_TYPE_MAC
3715+ */
3716+ uint16_t type;
3717+ union {
3718+ UHardwareGpsAGpsRefLocationCellID cellID;
3719+ UHardwareGpsAGpsRefLocationMac mac;
3720+ } u;
3721+} UHardwareGpsAGpsRefLocation;
3722+
3723 /**
3724 * Represents an NI request
3725 * \ingroup gps_access
3726@@ -353,23 +423,18 @@
3727 typedef void (*UHardwareGpsSetCapabilities)(uint32_t capabilities, void *context);
3728 typedef void (*UHardwareGpsRequestUtcTime)(void *context);
3729
3730-/** Callback to request the client to download XTRA data.
3731- * The client should download XTRA data and inject it by calling inject_xtra_data().
3732- */
3733+/** Callback to request the client to download XTRA data. The client should download XTRA data and inject it by calling inject_xtra_data(). */
3734 typedef void (*UHardwareGpsXtraDownloadRequest)(void *context);
3735
3736-/** Callback with AGPS status information.
3737- */
3738+/** Callback with AGPS status information. */
3739 typedef void (*UHardwareGpsAGpsStatusCallback)(UHardwareGpsAGpsStatus *status, void *context);
3740
3741-/** Callback with NI notification.
3742- */
3743+/** Callback with NI notification. */
3744 typedef void (*UHardwareGpsNiNotifyCallback)(UHardwareGpsNiNotification *notification, void *context);
3745
3746-/*
3747- Callback for AGPS RIL (Radio Interface Library) set id
3748-*/
3749+/** Callback invoked by the driver to set the set id. */
3750 typedef void (*UHardwareGpsAGpsRilRequestSetId)(uint32_t flags, void *context);
3751+/** Callback invoked by the driver to request a reference location (typically cell ID). */
3752 typedef void (*UHardwareGpsAGpsRilRequestRefLoc)(uint32_t flags, void *context);
3753
3754 typedef struct
3755@@ -409,10 +474,10 @@
3756 UBUNTU_DLL_PUBLIC bool
3757 u_hardware_gps_stop(UHardwareGps self);
3758
3759-/*
3760- \param time NTP time, in milliseconds since Jan 1st 1970.
3761- \param time_reference time from the internal clock at the moment that NTP time was taken.
3762- \param uncertainty possible deviation in the time supplied (uncertainty) in milliseconds.
3763+/** \brief Injects a new reference time into the GPS chipset.
3764+ * \param time NTP time, in milliseconds since Jan 1st 1970.
3765+ * \param time_reference time from the internal clock at the moment that NTP time was taken.
3766+ * \param uncertainty possible deviation in the time supplied (uncertainty) in milliseconds.
3767 */
3768 UBUNTU_DLL_PUBLIC void
3769 u_hardware_gps_inject_time(
3770@@ -421,24 +486,88 @@
3771 int64_t time_reference,
3772 int uncertainty);
3773
3774+/**
3775+ * \brief Injects a new reference location into the GPS chipset.
3776+ * \param self The instance to apply the change to.
3777+ * \param location New location to me injected. The structure must have the following details, any others are ignored:
3778+ * - location: New coordinate, in [°].
3779+ * - longitude: New coordinate, [°].
3780+ * - accuracy: Accuracy estimate of the location, in [m].
3781+ */
3782 UBUNTU_DLL_PUBLIC void
3783 u_hardware_gps_inject_location(
3784 UHardwareGps self,
3785- double latitude,
3786- double longitude,
3787- float accuracy);
3788-
3789+ UHardwareGpsLocation location);
3790+
3791+/**
3792+ * \brief Informs the GPS chipset about wifi ap's or radio cells to be used in AGPS calls.
3793+ * \param self The instance to inform.
3794+ * \param location The reference location, that is a wifi ap or a radio cell.
3795+ * \param size_of_struct The size of the reference location struct.
3796+ */
3797+UBUNTU_DLL_PUBLIC void
3798+u_hardware_gps_agps_set_reference_location(
3799+ UHardwareGps self,
3800+ UHardwareGpsAGpsRefLocation *location,
3801+ size_t size_of_struct);
3802+
3803+/**
3804+ * \brief Notifies the chipset that a data connection is availble.
3805+ * \param self The instance to be notified.
3806+ * \param apn Name of the apn to be used for SUPL.
3807+ */
3808+UBUNTU_DLL_PUBLIC void
3809+u_hardware_gps_agps_notify_connection_is_open(
3810+ UHardwareGps self,
3811+ const char *apn);
3812+
3813+/**
3814+ * \brief Notifies the chipset that an AGPS data connection has been closed.
3815+ * \param self The instance to be notified.
3816+ */
3817+UBUNTU_DLL_PUBLIC void
3818+u_hardware_gps_agps_notify_connection_is_closed(
3819+ UHardwareGps self);
3820+
3821+/**
3822+ * \brief Notifies the chipset that an AGPS data connection is not available.
3823+ * \param self The instance to be notified.
3824+ */
3825+UBUNTU_DLL_PUBLIC void
3826+u_hardware_gps_agps_notify_connection_not_available(
3827+ UHardwareGps self);
3828+
3829+/**
3830+ * \brief Sets the hostname and port for the AGPS server.
3831+ * \param self The instance to be altered.
3832+ * \param type Type of the server, one of U_HARDWARE_GPS_AGPS_TYPE_SUPL or U_HARDWARE_GPS_AGPS_TYPE_C2K.
3833+ * \param hostname The hostname of the AGPS server.
3834+ * \param port The post of the AGPS server.
3835+ */
3836+UBUNTU_DLL_PUBLIC void
3837+u_hardware_gps_agps_set_server_for_type(
3838+ UHardwareGps self,
3839+ UHardwareGpsAGpsType type,
3840+ const char* hostname,
3841+ uint16_t port);
3842+
3843+/**
3844+ * \brief Requests the chipset to delete the aiding data specified in flags.
3845+ * \param self The instance to apply the change to.
3846+ * \param flags Specifies the aiding data that should be deleted.
3847+ */
3848 UBUNTU_DLL_PUBLIC void
3849 u_hardware_gps_delete_aiding_data(
3850 UHardwareGps self,
3851- uint16_t flags);
3852+ UHardwareGpsAidingData flags);
3853
3854-/*
3855- \param mode One of the U_HARDWARE_GPS_POSITION_MODE_* values
3856- \param recurrence One of the U_HARDWARE_GPS_POSITION_RECURRENCE_* values
3857- \param min_interval represents the time between fixes in milliseconds.
3858- \param preferred_accuracy The requested fix accuracy in meters. Can be zero.
3859- \param preferred_time The requested time to first fix in milliseconds. Can be zero.
3860+/**
3861+ * \brief Sets the positioning mode of the chipset.
3862+ * \param mode One of the U_HARDWARE_GPS_POSITION_MODE_* values
3863+ * \param recurrence One of the U_HARDWARE_GPS_POSITION_RECURRENCE_* values
3864+ * \param min_interval represents the time between fixes in milliseconds.
3865+ * \param preferred_accuracy The requested fix accuracy in meters. Can be zero.
3866+ * \param preferred_time The requested time to first fix in milliseconds. Can be zero.
3867 */
3868 UBUNTU_DLL_PUBLIC bool
3869 u_hardware_gps_set_position_mode(
3870
3871=== modified file 'include/ubuntu/visibility.h'
3872--- include/ubuntu/visibility.h 2013-08-22 06:32:14 +0000
3873+++ include/ubuntu/visibility.h 2014-08-26 16:06:15 +0000
3874@@ -21,8 +21,10 @@
3875
3876 #if __GNUC__ >= 4
3877 #define UBUNTU_DLL_PUBLIC __attribute__ ((visibility ("default")))
3878+#define UBUNTU_DLL_LOCAL __attribute__ ((visibility ("hidden")))
3879 #else
3880 #define UBUNTU_DLL_PUBLIC
3881+#define UBUNTU_DLL_LOCAL
3882 #endif
3883
3884 #endif /* UBUNTU_VISIBILITY_H_ */
3885
3886=== added directory 'src/bridge'
3887=== added file 'src/bridge/bridge.h'
3888--- src/bridge/bridge.h 1970-01-01 00:00:00 +0000
3889+++ src/bridge/bridge.h 2014-08-26 16:06:15 +0000
3890@@ -0,0 +1,63 @@
3891+/*
3892+ * Copyright (C) 2012 Canonical Ltd
3893+ *
3894+ * This program is free software: you can redistribute it and/or modify
3895+ * it under the terms of the GNU Lesser General Public License version 3 as
3896+ * published by the Free Software Foundation.
3897+ *
3898+ * This program is distributed in the hope that it will be useful,
3899+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3900+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3901+ * GNU Lesser General Public License for more details.
3902+ *
3903+ * You should have received a copy of the GNU Lesser General Public License
3904+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3905+ *
3906+ * Authored by: Thomas Voss <thomas.voss@canonical.com>
3907+ * Ricardo Mendoza <ricardo.mendoza@canonical.com>
3908+ */
3909+#ifndef BASE_BRIDGE_H_
3910+#define BASE_BRIDGE_H_
3911+
3912+#include <assert.h>
3913+#include <dlfcn.h>
3914+#include <stddef.h>
3915+#include <stdlib.h>
3916+#include <stdio.h>
3917+#include <string.h>
3918+
3919+#define MAX_MODULE_NAME 32
3920+
3921+#define HIDDEN_SYMBOL __attribute__ ((visibility ("hidden")))
3922+
3923+namespace internal
3924+{
3925+template<typename Scope>
3926+class HIDDEN_SYMBOL Bridge
3927+{
3928+ public:
3929+ static Bridge<Scope>& instance()
3930+ {
3931+ static Bridge<Scope> bridge;
3932+ return bridge;
3933+ }
3934+
3935+ void* resolve_symbol(const char* symbol) const
3936+ {
3937+ return Scope::dlsym_fn(lib_handle, symbol);
3938+ }
3939+
3940+ protected:
3941+ Bridge() : lib_handle(Scope::dlopen_fn(Scope::path(), RTLD_LAZY))
3942+ {
3943+ }
3944+
3945+ ~Bridge()
3946+ {
3947+ }
3948+
3949+ void* lib_handle;
3950+};
3951+}
3952+
3953+#endif // BRIDGE_H_
3954
3955=== added file 'src/bridge/bridge_defs.h'
3956--- src/bridge/bridge_defs.h 1970-01-01 00:00:00 +0000
3957+++ src/bridge/bridge_defs.h 2014-08-26 16:06:15 +0000
3958@@ -0,0 +1,136 @@
3959+/*
3960+ * Copyright (C) 2012 Canonical Ltd
3961+ *
3962+ * This program is free software: you can redistribute it and/or modify
3963+ * it under the terms of the GNU Lesser General Public License version 3 as
3964+ * published by the Free Software Foundation.
3965+ *
3966+ * This program is distributed in the hope that it will be useful,
3967+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3968+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3969+ * GNU Lesser General Public License for more details.
3970+ *
3971+ * You should have received a copy of the GNU Lesser General Public License
3972+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3973+ *
3974+ * Authored by: Thomas Voss <thomas.voss@canonical.com>
3975+ * Ricardo Mendoza <ricardo.mendoza@canonical.com>
3976+ */
3977+#ifndef BRIDGE_DEFS_H_
3978+#define BRIDGE_DEFS_H_
3979+
3980+// Must be included afterthe Bridge class is defined
3981+
3982+#ifdef __cplusplus
3983+extern "C" {
3984+#endif
3985+
3986+/**********************************************************/
3987+/*********** Implementation starts here *******************/
3988+/**********************************************************/
3989+
3990+// this allows DLSYM to return NULL (happens if the backend is not available),
3991+// and returns NULL in that case; return_type must be a pointer!
3992+#define IMPLEMENT_CTOR0(return_type, symbol) \
3993+ return_type symbol() \
3994+ { \
3995+ static return_type (*f)() = NULL; \
3996+ DLSYM(&f, #symbol); \
3997+ return f ? f() : NULL;}
3998+
3999+#define IMPLEMENT_FUNCTION0(return_type, symbol) \
4000+ return_type symbol() \
4001+ { \
4002+ static return_type (*f)() = NULL; \
4003+ DLSYM(&f, #symbol); \
4004+ return f();}
4005+
4006+#define IMPLEMENT_VOID_FUNCTION0(symbol) \
4007+ void symbol() \
4008+ { \
4009+ static void (*f)() = NULL; \
4010+ DLSYM(&f, #symbol); \
4011+ f();}
4012+
4013+#define IMPLEMENT_FUNCTION1(return_type, symbol, arg1) \
4014+ return_type symbol(arg1 _1) \
4015+ { \
4016+ static return_type (*f)(arg1) = NULL; \
4017+ DLSYM(&f, #symbol); \
4018+ return f(_1); }
4019+
4020+#define IMPLEMENT_VOID_FUNCTION1(symbol, arg1) \
4021+ void symbol(arg1 _1) \
4022+ { \
4023+ static void (*f)(arg1) = NULL; \
4024+ DLSYM(&f, #symbol); \
4025+ f(_1); }
4026+
4027+#define IMPLEMENT_FUNCTION2(return_type, symbol, arg1, arg2) \
4028+ return_type symbol(arg1 _1, arg2 _2) \
4029+ { \
4030+ static return_type (*f)(arg1, arg2) = NULL; \
4031+ DLSYM(&f, #symbol); \
4032+ return f(_1, _2); }
4033+
4034+#define IMPLEMENT_VOID_FUNCTION2(symbol, arg1, arg2) \
4035+ void symbol(arg1 _1, arg2 _2) \
4036+ { \
4037+ static void (*f)(arg1, arg2) = NULL; \
4038+ DLSYM(&f, #symbol); \
4039+ f(_1, _2); }
4040+
4041+#define IMPLEMENT_FUNCTION3(return_type, symbol, arg1, arg2, arg3) \
4042+ return_type symbol(arg1 _1, arg2 _2, arg3 _3) \
4043+ { \
4044+ static return_type (*f)(arg1, arg2, arg3) = NULL; \
4045+ DLSYM(&f, #symbol); \
4046+ return f(_1, _2, _3); }
4047+
4048+#define IMPLEMENT_VOID_FUNCTION3(symbol, arg1, arg2, arg3) \
4049+ void symbol(arg1 _1, arg2 _2, arg3 _3) \
4050+ { \
4051+ static void (*f)(arg1, arg2, arg3) = NULL; \
4052+ DLSYM(&f, #symbol); \
4053+ f(_1, _2, _3); }
4054+
4055+#define IMPLEMENT_VOID_FUNCTION4(symbol, arg1, arg2, arg3, arg4) \
4056+ void symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4) \
4057+ { \
4058+ static void (*f)(arg1, arg2, arg3, arg4) = NULL; \
4059+ DLSYM(&f, #symbol); \
4060+ f(_1, _2, _3, _4); }
4061+
4062+#define IMPLEMENT_FUNCTION4(return_type, symbol, arg1, arg2, arg3, arg4) \
4063+ return_type symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4) \
4064+ { \
4065+ static return_type (*f)(arg1, arg2, arg3, arg4) = NULL; \
4066+ DLSYM(&f, #symbol); \
4067+ return f(_1, _2, _3, _4); }
4068+
4069+#define IMPLEMENT_FUNCTION6(return_type, symbol, arg1, arg2, arg3, arg4, arg5, arg6) \
4070+ return_type symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4, arg5 _5, arg6 _6) \
4071+ { \
4072+ static return_type (*f)(arg1, arg2, arg3, arg4, arg5, arg6) = NULL; \
4073+ DLSYM(&f, #symbol); \
4074+ return f(_1, _2, _3, _4, _5, _6); }
4075+
4076+#define IMPLEMENT_VOID_FUNCTION7(symbol, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
4077+ void symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4, arg5 _5, arg6 _6, arg7 _7) \
4078+ { \
4079+ static void (*f)(arg1, arg2, arg3, arg4, arg5, arg6, arg7) = NULL; \
4080+ DLSYM(&f, #symbol); \
4081+ f(_1, _2, _3, _4, _5, _6, _7); }
4082+
4083+#define IMPLEMENT_VOID_FUNCTION8(symbol, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
4084+ void symbol(arg1 _1, arg2 _2, arg3 _3, arg4 _4, arg5 _5, arg6 _6, arg7 _7, arg8 _8) \
4085+ { \
4086+ static void (*f)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) = NULL; \
4087+ DLSYM(&f, #symbol); \
4088+ f(_1, _2, _3, _4, _5, _6, _7, _8); }
4089+
4090+#ifdef __cplusplus
4091+}
4092+#endif
4093+
4094+#endif // BRIDGE_DEFS_H_
4095
4096=== added file 'src/ubuntu/CMakeLists.txt'
4097--- src/ubuntu/CMakeLists.txt 1970-01-01 00:00:00 +0000
4098+++ src/ubuntu/CMakeLists.txt 2014-08-26 16:06:15 +0000
4099@@ -0,0 +1,2 @@
4100+add_subdirectory(application)
4101+add_subdirectory(hardware)
4102
4103=== added directory 'src/ubuntu/application'
4104=== renamed file 'src/ubuntu/CMakeLists.txt' => 'src/ubuntu/application/CMakeLists.txt'
4105--- src/ubuntu/CMakeLists.txt 2013-12-02 17:03:45 +0000
4106+++ src/ubuntu/application/CMakeLists.txt 2014-08-26 16:06:15 +0000
4107@@ -1,29 +1,44 @@
4108-include_directories(
4109- ${CMAKE_CURRENT_SOURCE_DIR}
4110-)
4111-
4112-add_subdirectory(application)
4113-add_subdirectory(testbackend)
4114-
4115 set(
4116 UBUNTU_APPLICATION_API_LINK_LIBRARIES
4117-
4118+
4119+ ubuntu_application_sensors_haptic
4120 ubuntu_application_location
4121 ubuntu_application_url_dispatcher
4122 )
4123
4124-if(ENABLE_HYBRIS_IMPLEMENTATION)
4125- add_subdirectory(hybris/)
4126-endif()
4127-
4128-if(ENABLE_MIRSERVER_IMPLEMENTATION OR ENABLE_MIRCLIENT_IMPLEMENTATION)
4129- add_subdirectory(mircommon/)
4130-endif()
4131-
4132-if(ENABLE_MIRSERVER_IMPLEMENTATION)
4133- add_subdirectory(mirserver/)
4134-endif()
4135-
4136-if(ENABLE_MIRCLIENT_IMPLEMENTATION)
4137- add_subdirectory(mirclient/)
4138-endif()
4139+include_directories(
4140+ ${CMAKE_BINARY_DIR}/include
4141+)
4142+
4143+include_directories(../../bridge)
4144+
4145+add_subdirectory(common)
4146+add_subdirectory(desktop)
4147+add_subdirectory(touch)
4148+add_subdirectory(testbackend)
4149+
4150+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -fPIC")
4151+
4152+add_library(
4153+ ubuntu_application_api SHARED
4154+
4155+ ubuntu_application_api.cpp
4156+)
4157+
4158+target_link_libraries(
4159+ ubuntu_application_api
4160+
4161+ dl
4162+)
4163+
4164+set_target_properties(
4165+ ubuntu_application_api
4166+ PROPERTIES
4167+ VERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}.${UBUNTU_PLATFORM_API_VERSION_MINOR}.${UBUNTU_PLATFORM_API_VERSION_PATCH}
4168+ SOVERSION ${UBUNTU_PLATFORM_API_VERSION_MAJOR}
4169+)
4170+
4171+install(
4172+ TARGETS ubuntu_application_api
4173+ ${INSTALL_TARGETS_DEFAULT_ARGS}
4174+)
4175
4176=== added file 'src/ubuntu/application/base_module.h'
4177--- src/ubuntu/application/base_module.h 1970-01-01 00:00:00 +0000
4178+++ src/ubuntu/application/base_module.h 2014-08-26 16:06:15 +0000
4179@@ -0,0 +1,107 @@
4180+/*
4181+ * Copyright (C) 2012 Canonical Ltd
4182+ *
4183+ * This program is free software: you can redistribute it and/or modify
4184+ * it under the terms of the GNU Lesser General Public License version 3 as
4185+ * published by the Free Software Foundation.
4186+ *
4187+ * This program is distributed in the hope that it will be useful,
4188+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4189+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4190+ * GNU Lesser General Public License for more details.
4191+ *
4192+ * You should have received a copy of the GNU Lesser General Public License
4193+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4194+ *
4195+ * Authored by: Thomas Voss <thomas.voss@canonical.com>
4196+ * Ricardo Mendoza <ricardo.mendoza@canonical.com>
4197+ */
4198+#ifndef BASE_MODULE_H_
4199+#define BASE_MODULE_H_
4200+
4201+#include <bridge.h>
4202+#include <stdio.h>
4203+#include <unistd.h>
4204+
4205+/*
4206+ * This is the base backend loader for the Platform API
4207+ */
4208+
4209+#define API_VERSION_MAJOR "2"
4210+#define API_VERSION_MINOR "2"
4211+#define API_VERSION_PATCH "0"
4212+#define SO_SUFFIX ".so." API_VERSION_MAJOR "." API_VERSION_MINOR "." API_VERSION_PATCH
4213+
4214+namespace internal
4215+{
4216+/* Programs can select a backend with $UBUNTU_PLATFORM_API_BACKEND,
4217+ * which either needs to be a full path or just the file name (then it will be
4218+ * looked up in the usual library search path, see dlopen(3)).
4219+ */
4220+struct HIDDEN_SYMBOL ToBackend
4221+{
4222+ static const char* path()
4223+ {
4224+ static char* cache = NULL;
4225+ static char path[64];
4226+ char module_name[32];
4227+
4228+ if (cache == NULL) {
4229+ cache = secure_getenv("UBUNTU_PLATFORM_API_BACKEND");
4230+ if (cache == NULL) {
4231+ FILE *conf;
4232+ conf = fopen("/etc/ubuntu-platform-api/application.conf", "r");
4233+ if (conf == NULL) {
4234+ exit_module("Unable to find module configuration file");
4235+ } else {
4236+ if (fgets(module_name, 32, conf))
4237+ cache = module_name;
4238+ else
4239+ exit_module("Error reading module name from file");
4240+ }
4241+ // Null terminate module blob
4242+ cache[strlen(cache)-1] = '\0';
4243+ fclose(conf);
4244+ }
4245+ if (cache == NULL)
4246+ exit_module("Unable to determine backend");
4247+
4248+ strcpy(path, "libubuntu_application_api_");
4249+
4250+ if (strlen(cache) > MAX_MODULE_NAME)
4251+ exit_module("Selected module is invalid");
4252+
4253+ strcat(path, cache);
4254+ strcat(path, SO_SUFFIX);
4255+ }
4256+
4257+ return path;
4258+ }
4259+
4260+ static void exit_module(const char* msg)
4261+ {
4262+ printf("Ubuntu Platform API: %s -- Aborting\n", msg);
4263+ abort();
4264+ }
4265+
4266+ static void* dlopen_fn(const char* path, int flags)
4267+ {
4268+ void *handle = dlopen(path, flags);
4269+ if (handle == NULL)
4270+ exit_module("Unable to load selected module.");
4271+
4272+ return handle;
4273+ }
4274+
4275+ static void* dlsym_fn(void* handle, const char* symbol)
4276+ {
4277+ return dlsym(handle, symbol);
4278+ }
4279+};
4280+}
4281+
4282+#define DLSYM(fptr, sym) if (*(fptr) == NULL) { *((void**)fptr) = (void *) internal::Bridge<internal::ToBackend>::instance().resolve_symbol(sym); }
4283+
4284+#include <bridge_defs.h>
4285+
4286+#endif // BASE_MODULE_H_
4287
4288=== added directory 'src/ubuntu/application/common'
4289=== added file 'src/ubuntu/application/common/CMakeLists.txt'
4290--- src/ubuntu/application/common/CMakeLists.txt 1970-01-01 00:00:00 +0000
4291+++ src/ubuntu/application/common/CMakeLists.txt 2014-08-26 16:06:15 +0000
4292@@ -0,0 +1,8 @@
4293+include_directories(
4294+ ${CMAKE_CURRENT_SOURCE_DIR}
4295+)
4296+
4297+add_subdirectory(application)
4298+add_subdirectory(mircommon)
4299+add_subdirectory(mirclient)
4300+add_subdirectory(mirserver)
4301
4302=== renamed directory 'src/ubuntu/application' => 'src/ubuntu/application/common/application'
4303=== modified file 'src/ubuntu/application/common/application/CMakeLists.txt'
4304--- src/ubuntu/application/CMakeLists.txt 2013-08-22 10:54:28 +0000
4305+++ src/ubuntu/application/common/application/CMakeLists.txt 2014-08-26 16:06:15 +0000
4306@@ -1,2 +1,3 @@
4307+add_subdirectory(sensors)
4308 add_subdirectory(location)
4309 add_subdirectory(url_dispatcher)
4310
4311=== modified file 'src/ubuntu/application/common/application/location/controller.cpp'
4312--- src/ubuntu/application/location/controller.cpp 2013-08-23 10:55:16 +0000
4313+++ src/ubuntu/application/common/application/location/controller.cpp 2014-08-26 16:06:15 +0000
4314@@ -19,6 +19,7 @@
4315 #include "ubuntu/application/location/controller.h"
4316
4317 #include "controller_p.h"
4318+#include "instance.h"
4319
4320 void
4321 ua_location_service_controller_ref(
4322@@ -41,8 +42,17 @@
4323 void *context)
4324 {
4325 (void) controller;
4326- (void) handler;
4327- (void) context;
4328+
4329+ try
4330+ {
4331+ Instance::instance().set_changed_handler_with_context(handler, context);
4332+ } catch(const std::exception& e)
4333+ {
4334+ std::cerr << "ua_location_service_controller_set_status_changed_handler: error accessing instance: " << e.what() << std::endl;
4335+ } catch(...)
4336+ {
4337+ std::cerr << "ua_location_service_controller_set_status_changed_handler: error accessing instance." << std::endl;
4338+ }
4339 }
4340
4341 UStatus
4342@@ -51,9 +61,33 @@
4343 UALocationServiceStatusFlags *out_flags)
4344 {
4345 (void) controller;
4346- (void) out_flags;
4347-
4348- return U_STATUS_SUCCESS;
4349+
4350+ *out_flags = 0;
4351+
4352+ try
4353+ {
4354+ auto service = Instance::instance().get_service();
4355+
4356+ if (service->is_online().get())
4357+ *out_flags |= UA_LOCATION_SERVICE_ENABLED;
4358+ else
4359+ *out_flags |= UA_LOCATION_SERVICE_DISABLED;
4360+
4361+ if (service->does_satellite_based_positioning().get())
4362+ *out_flags |= UA_LOCATION_SERVICE_GPS_ENABLED;
4363+ else
4364+ *out_flags |= UA_LOCATION_SERVICE_GPS_DISABLED;
4365+
4366+ return U_STATUS_SUCCESS;
4367+ } catch(const std::exception& e)
4368+ {
4369+ std::cerr << "ua_location_service_controller_query_status: error accessing instance: " << e.what() << std::endl;
4370+ } catch(...)
4371+ {
4372+ std::cerr << "ua_location_service_controller_query_status: error accessing instance." << std::endl;
4373+ }
4374+
4375+ return U_STATUS_ERROR;
4376 }
4377
4378 UStatus
4379@@ -62,7 +96,21 @@
4380 {
4381 (void) controller;
4382
4383- return U_STATUS_SUCCESS;
4384+ try
4385+ {
4386+ auto service = Instance::instance().get_service();
4387+ service->is_online().set(true);
4388+
4389+ return U_STATUS_SUCCESS;
4390+ } catch(const std::exception& e)
4391+ {
4392+ std::cerr << "ua_location_service_controller_enable_service: error accessing instance: " << e.what() << std::endl;
4393+ } catch(...)
4394+ {
4395+ std::cerr << "ua_location_service_controller_enable_service: error accessing instance." << std::endl;
4396+ }
4397+
4398+ return U_STATUS_ERROR;
4399 }
4400
4401 UStatus
4402@@ -70,8 +118,22 @@
4403 UALocationServiceController *controller)
4404 {
4405 (void) controller;
4406-
4407- return U_STATUS_SUCCESS;
4408+
4409+ try
4410+ {
4411+ auto service = Instance::instance().get_service();
4412+ service->is_online().set(false);
4413+
4414+ return U_STATUS_SUCCESS;
4415+ } catch(const std::exception& e)
4416+ {
4417+ std::cerr << "ua_location_service_controller_disable_service: error accessing instance: " << e.what() << std::endl;
4418+ } catch(...)
4419+ {
4420+ std::cerr << "ua_location_service_controller_disable_service: error accessing instance." << std::endl;
4421+ }
4422+
4423+ return U_STATUS_ERROR;
4424 }
4425
4426 UStatus
4427@@ -80,7 +142,21 @@
4428 {
4429 (void) controller;
4430
4431- return U_STATUS_SUCCESS;
4432+ try
4433+ {
4434+ auto service = Instance::instance().get_service();
4435+ service->does_satellite_based_positioning().set(true);
4436+
4437+ return U_STATUS_SUCCESS;
4438+ } catch(const std::exception& e)
4439+ {
4440+ std::cerr << "ua_location_service_controller_enable_gps: error accessing instance: " << e.what() << std::endl;
4441+ } catch(...)
4442+ {
4443+ std::cerr << "ua_location_service_controller_enable_gps: error accessing instance." << std::endl;
4444+ }
4445+
4446+ return U_STATUS_ERROR;
4447 }
4448
4449 UStatus
4450@@ -89,5 +165,19 @@
4451 {
4452 (void) controller;
4453
4454- return U_STATUS_SUCCESS;
4455+ try
4456+ {
4457+ auto service = Instance::instance().get_service();
4458+ service->does_satellite_based_positioning().set(false);
4459+
4460+ return U_STATUS_SUCCESS;
4461+ } catch(const std::exception& e)
4462+ {
4463+ std::cerr << "ua_location_service_controller_disable_gps: error accessing instance: " << e.what() << std::endl;
4464+ } catch(...)
4465+ {
4466+ std::cerr << "ua_location_service_controller_disable_gps: error accessing instance." << std::endl;
4467+ }
4468+
4469+ return U_STATUS_ERROR;
4470 }
4471
4472=== modified file 'src/ubuntu/application/common/application/location/controller_p.h'
4473--- src/ubuntu/application/location/controller_p.h 2013-08-21 14:59:45 +0000
4474+++ src/ubuntu/application/common/application/location/controller_p.h 2014-08-26 16:06:15 +0000
4475@@ -25,6 +25,7 @@
4476
4477 struct UbuntuApplicationLocationServiceController : public detail::RefCounted
4478 {
4479+
4480 };
4481
4482 #endif // CONTROLLER_PRIVATE_H_
4483
4484=== modified file 'src/ubuntu/application/common/application/location/heading_update.cpp'
4485--- src/ubuntu/application/location/heading_update.cpp 2013-08-19 06:46:47 +0000
4486+++ src/ubuntu/application/common/application/location/heading_update.cpp 2014-08-26 16:06:15 +0000
4487@@ -51,5 +51,5 @@
4488 ua_location_heading_update_get_heading_in_degree(
4489 UALocationHeadingUpdate *update)
4490 {
4491- return update->update.value.value.value();
4492+ return update->update.value.value();
4493 }
4494
4495=== added file 'src/ubuntu/application/common/application/location/instance.h'
4496--- src/ubuntu/application/common/application/location/instance.h 1970-01-01 00:00:00 +0000
4497+++ src/ubuntu/application/common/application/location/instance.h 2014-08-26 16:06:15 +0000
4498@@ -0,0 +1,143 @@
4499+/*
4500+ * Copyright © 2013 Canonical Ltd.
4501+ *
4502+ * This program is free software: you can redistribute it and/or modify
4503+ * it under the terms of the GNU Lesser General Public License version 3 as
4504+ * published by the Free Software Foundation.
4505+ *
4506+ * This program is distributed in the hope that it will be useful,
4507+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4508+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4509+ * GNU Lesser General Public License for more details.
4510+ *
4511+ * You should have received a copy of the GNU Lesser General Public License
4512+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4513+ *
4514+ * Authored by: Thomas Voß <thomas.voss@canonical.com>
4515+ */
4516+
4517+#ifndef INSTANCE_H_
4518+#define INSTANCE_H_
4519+
4520+#include "ubuntu/visibility.h"
4521+
4522+#include "ubuntu/application/location/controller.h"
4523+
4524+#include <com/ubuntu/location/service/stub.h>
4525+
4526+#include <core/dbus/resolver.h>
4527+#include <core/dbus/asio/executor.h>
4528+
4529+#include <thread>
4530+
4531+class UBUNTU_DLL_LOCAL Instance
4532+{
4533+ public:
4534+ static Instance& instance()
4535+ {
4536+ static Instance inst;
4537+ return inst;
4538+ }
4539+
4540+ const com::ubuntu::location::service::Interface::Ptr& get_service() const
4541+ {
4542+ return service;
4543+ }
4544+
4545+ void set_changed_handler_with_context(
4546+ UALocationServiceStatusChangedHandler handler,
4547+ void* context)
4548+ {
4549+ changed_handler = handler;
4550+ changed_handler_context = context;
4551+ }
4552+
4553+ private:
4554+ Instance()
4555+ : bus(std::make_shared<core::dbus::Bus>(core::dbus::WellKnownBus::system)),
4556+ executor(core::dbus::asio::make_executor(bus)),
4557+ service(core::dbus::resolve_service_on_bus<
4558+ com::ubuntu::location::service::Interface,
4559+ com::ubuntu::location::service::Stub
4560+ >(bus)),
4561+ connections
4562+ {
4563+ service->does_satellite_based_positioning().changed().connect([this](bool value)
4564+ {
4565+ // Update our cached value.
4566+ if (value)
4567+ {
4568+ cached_state_flags |= UA_LOCATION_SERVICE_GPS_ENABLED;
4569+ cached_state_flags &= ~UA_LOCATION_SERVICE_GPS_DISABLED;
4570+ }
4571+ else
4572+ {
4573+ cached_state_flags |= UA_LOCATION_SERVICE_GPS_DISABLED;
4574+ cached_state_flags &= ~UA_LOCATION_SERVICE_GPS_ENABLED;
4575+ }
4576+
4577+ // And notify change handler if one is set.
4578+ if (changed_handler)
4579+ changed_handler(cached_state_flags, changed_handler_context);
4580+ }),
4581+ service->is_online().changed().connect([this](bool value)
4582+ {
4583+ // Update our cached value.
4584+ if (value)
4585+ {
4586+ cached_state_flags |= UA_LOCATION_SERVICE_ENABLED;
4587+ cached_state_flags &= ~UA_LOCATION_SERVICE_DISABLED;
4588+ }
4589+ else
4590+ {
4591+ cached_state_flags |= UA_LOCATION_SERVICE_DISABLED;
4592+ cached_state_flags &= ~UA_LOCATION_SERVICE_ENABLED;
4593+ }
4594+
4595+ // And notify change handler if one is set.
4596+ if (changed_handler)
4597+ changed_handler(cached_state_flags, changed_handler_context);
4598+ })
4599+ },
4600+ cached_state_flags{0},
4601+ changed_handler{nullptr},
4602+ changed_handler_context{nullptr}
4603+ {
4604+ bus->install_executor(executor);
4605+ worker = std::move(std::thread([&]() { bus->run(); }));
4606+ }
4607+
4608+ ~Instance() noexcept
4609+ {
4610+ try
4611+ {
4612+ bus->stop();
4613+
4614+ if (worker.joinable())
4615+ worker.join();
4616+ } catch(...)
4617+ {
4618+ // We silently ignore errors to fulfill our noexcept guarantee.
4619+ }
4620+ }
4621+
4622+ core::dbus::Bus::Ptr bus;
4623+ core::dbus::Executor::Ptr executor;
4624+ std::thread worker;
4625+
4626+ com::ubuntu::location::service::Interface::Ptr service;
4627+
4628+ // All event connections go here.
4629+ struct
4630+ {
4631+ core::ScopedConnection on_does_satellite_based_positioning_changed;
4632+ core::ScopedConnection on_is_online_changed;
4633+ } connections;
4634+
4635+ // All change-handler specifics go here.
4636+ UALocationServiceStatusFlags cached_state_flags;
4637+ UALocationServiceStatusChangedHandler changed_handler;
4638+ void* changed_handler_context;
4639+};
4640+
4641+#endif // INSTANCE_H_
4642
4643=== modified file 'src/ubuntu/application/common/application/location/position_update.cpp'
4644--- src/ubuntu/application/location/position_update.cpp 2013-08-19 06:46:47 +0000
4645+++ src/ubuntu/application/common/application/location/position_update.cpp 2014-08-26 16:06:15 +0000
4646@@ -51,26 +51,54 @@
4647 ua_location_position_update_get_latitude_in_degree(
4648 UALocationPositionUpdate *update)
4649 {
4650- return update->update.value.latitude().value.value();
4651+ return update->update.value.latitude.value.value();
4652 }
4653
4654 double
4655 ua_location_position_update_get_longitude_in_degree(
4656 UALocationPositionUpdate *update)
4657 {
4658- return update->update.value.longitude().value.value();
4659+ return update->update.value.longitude.value.value();
4660 }
4661
4662 bool
4663 ua_location_position_update_has_altitude(
4664 UALocationPositionUpdate *update)
4665 {
4666- return update->update.value.has_altitude();
4667+ return update->update.value.altitude;
4668 }
4669
4670 double
4671 ua_location_position_update_get_altitude_in_meter(
4672 UALocationPositionUpdate *update)
4673 {
4674- return update->update.value.altitude().value.value();
4675+ return update->update.value.altitude->value.value();
4676+}
4677+
4678+bool
4679+ua_location_position_update_has_horizontal_accuracy(
4680+ UALocationPositionUpdate *update)
4681+{
4682+ return update->update.value.accuracy.horizontal;
4683+}
4684+
4685+double
4686+ua_location_position_update_get_horizontal_accuracy_in_meter(
4687+ UALocationPositionUpdate *update)
4688+{
4689+ return update->update.value.accuracy.horizontal->value();
4690+}
4691+
4692+bool
4693+ua_location_position_update_has_vertical_accuracy(
4694+ UALocationPositionUpdate *update)
4695+{
4696+ return update->update.value.accuracy.vertical;
4697+}
4698+
4699+double
4700+ua_location_position_update_get_vertical_accuracy_in_meter(
4701+ UALocationPositionUpdate *update)
4702+{
4703+ return update->update.value.accuracy.vertical->value();
4704 }
4705
4706=== modified file 'src/ubuntu/application/common/application/location/ref_counted.h'
4707--- src/ubuntu/application/location/ref_counted.h 2013-08-19 06:47:19 +0000
4708+++ src/ubuntu/application/common/application/location/ref_counted.h 2014-08-26 16:06:15 +0000
4709@@ -32,7 +32,7 @@
4710 bool operator==(const RefCounted&) const = delete;
4711
4712 void ref() { counter.fetch_add(1); }
4713- void unref() { if (0 == counter.fetch_sub(1)) { delete this; } }
4714+ void unref() { if (1 == counter.fetch_sub(1)) { delete this; } }
4715
4716 protected:
4717 RefCounted() : counter(1)
4718
4719=== modified file 'src/ubuntu/application/common/application/location/service.cpp'
4720--- src/ubuntu/application/location/service.cpp 2014-01-31 13:35:28 +0000
4721+++ src/ubuntu/application/common/application/location/service.cpp 2014-08-26 16:06:15 +0000
4722@@ -19,6 +19,7 @@
4723 #include "ubuntu/application/location/service.h"
4724
4725 #include "controller_p.h"
4726+#include "instance.h"
4727 #include "session_p.h"
4728
4729 #include <com/ubuntu/location/service/stub.h>
4730@@ -30,59 +31,58 @@
4731 namespace cul = com::ubuntu::location;
4732 namespace culs = com::ubuntu::location::service;
4733
4734-namespace
4735-{
4736-class Instance
4737-{
4738- public:
4739- static Instance& instance()
4740- {
4741- static Instance inst;
4742- return inst;
4743- }
4744-
4745- const culs::Interface::Ptr& get_service() const
4746- {
4747- return service;
4748- }
4749-
4750- private:
4751- Instance() : bus(std::make_shared<dbus::Bus>(dbus::WellKnownBus::system)),
4752- executor(dbus::asio::make_executor(bus)),
4753- service(dbus::resolve_service_on_bus<culs::Interface, culs::Stub>(bus))
4754- {
4755- bus->install_executor(executor);
4756- worker = std::move(std::thread([&]() { bus->run(); }));
4757- }
4758-
4759- ~Instance() noexcept
4760- {
4761- if (worker.joinable())
4762- worker.join();
4763- }
4764-
4765- dbus::Bus::Ptr bus;
4766- dbus::Executor::Ptr executor;
4767- culs::Interface::Ptr service;
4768- std::thread worker;
4769-};
4770-
4771-}
4772-
4773 UALocationServiceSession*
4774 ua_location_service_create_session_for_low_accuracy(
4775 UALocationServiceRequirementsFlags /*flags*/)
4776 {
4777- return new UbuntuApplicationLocationServiceSession{
4778- Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})};
4779+ // Creating the instance might fail for a number of reason and
4780+ // we cannot allow exceptions to propagate to prevent applications
4781+ // from aborting. For that, we catch all exceptions, provide some error
4782+ // information to std::cerr and return a nullptr in case of errors.
4783+ try
4784+ {
4785+ return new UbuntuApplicationLocationServiceSession
4786+ {
4787+ // Creating the instance might fail for a number of reasons.
4788+
4789+ Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})
4790+ };
4791+ } catch(const std::exception& e)
4792+ {
4793+ std::cerr << "ua_location_service_create_session_for_low_accuracy: Error creating instance: " << e.what() << std::endl;
4794+ } catch(...)
4795+ {
4796+ std::cerr << "ua_location_service_create_session_for_low_accuracy: Error creating instance." << std::endl;
4797+ }
4798+
4799+ return nullptr;
4800 }
4801
4802 UALocationServiceSession*
4803 ua_location_service_create_session_for_high_accuracy(
4804 UALocationServiceRequirementsFlags /*flags*/)
4805 {
4806- return new UbuntuApplicationLocationServiceSession{
4807- Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})};
4808+ // Creating the instance might fail for a number of reason and
4809+ // we cannot allow exceptions to propagate to prevent applications
4810+ // from aborting. For that, we catch all exceptions, provide some error
4811+ // information to std::cerr and return a nullptr in case of errors.
4812+ try
4813+ {
4814+ return new UbuntuApplicationLocationServiceSession
4815+ {
4816+ // Creating the instance might fail for a number of reasons.
4817+
4818+ Instance::instance().get_service()->create_session_for_criteria(cul::Criteria{})
4819+ };
4820+ } catch(const std::exception& e)
4821+ {
4822+ std::cerr << "ua_location_service_create_session_for_high_accuracy: Error creating instance: " << e.what() << std::endl;
4823+ } catch(...)
4824+ {
4825+ std::cerr << "ua_location_service_create_session_for_high_accuracy: Error creating instance." << std::endl;
4826+ }
4827+
4828+ return nullptr;
4829 }
4830
4831 UALocationServiceController*
4832
4833=== modified file 'src/ubuntu/application/common/application/location/session.cpp'
4834--- src/ubuntu/application/location/session.cpp 2013-08-19 06:46:47 +0000
4835+++ src/ubuntu/application/common/application/location/session.cpp 2014-08-26 16:06:15 +0000
4836@@ -24,10 +24,15 @@
4837 #include "position_update_p.h"
4838 #include "velocity_update_p.h"
4839
4840+namespace location = com::ubuntu::location;
4841+
4842 void
4843 ua_location_service_session_ref(
4844 UALocationServiceSession *session)
4845 {
4846+ if (not session)
4847+ return;
4848+
4849 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4850 s->ref();
4851 }
4852@@ -36,6 +41,9 @@
4853 ua_location_service_session_unref(
4854 UALocationServiceSession *session)
4855 {
4856+ if (not session)
4857+ return;
4858+
4859 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4860 s->unref();
4861 }
4862@@ -46,13 +54,23 @@
4863 UALocationServiceSessionPositionUpdatesHandler handler,
4864 void *context)
4865 {
4866+ if (not session)
4867+ return;
4868+
4869 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4870- s->session->install_position_updates_handler(
4871- [handler, context](const com::ubuntu::location::Update<com::ubuntu::location::Position>& new_position)
4872- {
4873- UbuntuApplicationLocationPositionUpdate pu{new_position};
4874- handler(std::addressof(pu), context);
4875- });
4876+
4877+ try
4878+ {
4879+ std::lock_guard<std::mutex> lg(s->position_updates.guard);
4880+ s->position_updates.handler = handler;
4881+ s->position_updates.context = context;
4882+ } catch(const std::exception& e)
4883+ {
4884+ fprintf(stderr, "Error setting up position updates handler: %s \n", e.what());
4885+ } catch(...)
4886+ {
4887+ fprintf(stderr, "Error setting up position updates handler.\n");
4888+ }
4889 }
4890
4891 void
4892@@ -61,13 +79,23 @@
4893 UALocationServiceSessionHeadingUpdatesHandler handler,
4894 void *context)
4895 {
4896+ if (not session)
4897+ return;
4898+
4899 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4900- s->session->install_heading_updates_handler(
4901- [handler, context](const com::ubuntu::location::Update<com::ubuntu::location::Heading>& new_heading)
4902- {
4903- UbuntuApplicationLocationHeadingUpdate hu{new_heading};
4904- handler(std::addressof(hu), context);
4905- });
4906+
4907+ try
4908+ {
4909+ std::lock_guard<std::mutex> lg(s->heading_updates.guard);
4910+ s->heading_updates.handler = handler;
4911+ s->heading_updates.context = context;
4912+ } catch(const std::exception& e)
4913+ {
4914+ fprintf(stderr, "Error setting up heading updates handler: %s \n", e.what());
4915+ } catch(...)
4916+ {
4917+ fprintf(stderr, "Error setting up heading updates handler. \n");
4918+ }
4919 }
4920
4921 void
4922@@ -76,26 +104,38 @@
4923 UALocationServiceSessionVelocityUpdatesHandler handler,
4924 void *context)
4925 {
4926+ if (not session)
4927+ return;
4928+
4929 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4930- s->session->install_velocity_updates_handler(
4931- [handler, context](const com::ubuntu::location::Update<com::ubuntu::location::Velocity>& new_velocity)
4932- {
4933- UbuntuApplicationLocationVelocityUpdate vu{new_velocity};
4934- handler(std::addressof(vu), context);
4935- });
4936+
4937+ try
4938+ {
4939+ std::lock_guard<std::mutex> lg(s->velocity_updates.guard);
4940+ s->velocity_updates.handler = handler;
4941+ s->velocity_updates.context = context;
4942+ } catch(const std::exception& e)
4943+ {
4944+ fprintf(stderr, "Error setting up velocity updates handler: %s \n", e.what());
4945+ } catch(...)
4946+ {
4947+ fprintf(stderr, "Error setting up velocity updates handler.");
4948+ }
4949 }
4950
4951 UStatus
4952 ua_location_service_session_start_position_updates(
4953 UALocationServiceSession *session)
4954 {
4955+ if (not session)
4956+ return U_STATUS_ERROR;
4957+
4958 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4959- if (!s)
4960- return U_STATUS_ERROR;
4961
4962 try
4963 {
4964- s->session->start_position_updates();
4965+ s->session->updates().position_status.set(
4966+ location::service::session::Interface::Updates::Status::enabled);
4967 } catch(...)
4968 {
4969 return U_STATUS_ERROR;
4970@@ -108,13 +148,15 @@
4971 ua_location_service_session_stop_position_updates(
4972 UALocationServiceSession *session)
4973 {
4974+ if (not session)
4975+ return;
4976+
4977 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4978- if (!s)
4979- return;
4980
4981 try
4982 {
4983- s->session->stop_position_updates();
4984+ s->session->updates().position_status.set(
4985+ location::service::session::Interface::Updates::Status::disabled);
4986 } catch(...)
4987 {
4988 }
4989@@ -124,13 +166,15 @@
4990 ua_location_service_session_start_heading_updates(
4991 UALocationServiceSession *session)
4992 {
4993+ if (not session)
4994+ return U_STATUS_ERROR;
4995+
4996 auto s = static_cast<UbuntuApplicationLocationServiceSession*>(session);
4997- if (!s)
4998- return U_STATUS_ERROR;
4999
5000 try
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: