This patch adds th state machine for supporting the Gonk sensors
daemon in Gecko. The daemon gets started when the first sensor is
enabled. Sensors can be enabled and disabled at will. The daemon
will send events about detected sensors and sensor events. Gecko's
state machine receives themand forwards them as DOM events.
The old support for device sensors is still present for devices without
sensorsd. A future patch will remove this code.
This patch adds the interface for the Gonk sensors daemon. There
are only two major interfaces: connect and disconnect. The sensors
daemon is started before connecting and stopped after a disconnect.
Connections are race-free: we first set up a listen socket and let
Gecko listen for connections. Then the daemon gets started with the
socket's address as parameter. When the daemon connects to the
socket, Gecko will continue the startup and signal success to the
caller.
The sensor daemon's poll service reads events from the device's
sensors. This patch adds Gecko support for this service. Gecko
receives information about existing sensors and can subscribe to
sensor events. Events will be delivered for each enabled sensor.
A system daemon can contain several services. One of them is the registry
service that manages all other services. This patch adds support for this
service in the Gonk sensors daemon.
This patch adds helpers for using the Gonk sensors daemon. The types
and functions allow for packing and unpacking messages of the daemon's
IPC protocol.
This patch adds th state machine for supporting the Gonk sensors
daemon in Gecko. The daemon gets started when the first sensor is
enabled. Sensors can be enabled and disabled at will. The daemon
will send events about detected sensors and sensor events. Gecko's
state machine receives themand forwards them as DOM events.
The old support for device sensors is still present for devices without
sensorsd. A future patch will remove this code.
This patch adds the interface for the Gonk sensors daemon. There
are only two major interfaces: connect and disconnect. The sensors
daemon is started before connecting and stopped after a disconnect.
Connections are race-free: we first set up a listen socket and let
Gecko listen for connections. Then the daemon gets started with the
socket's address as parameter. When the daemon connects to the
socket, Gecko will continue the startup and signal success to the
caller.
The sensor daemon's poll service reads events from the device's
sensors. This patch adds Gecko support for this service. Gecko
receives information about existing sensors and can subscribe to
sensor events. Events will be delivered for each enabled sensor.
A system daemon can contain several services. One of them is the registry
service that manages all other services. This patch adds support for this
service in the Gonk sensors daemon.
This patch adds helpers for using the Gonk sensors daemon. The types
and functions allow for packing and unpacking messages of the daemon's
IPC protocol.
The new HAL interface allows for starting, stopping, and querying
the status of system services. How these operations are performed
depends on the underlying system.
The current implementation for Gonk already contains a workaround
from Bluetooth, where quickly restarted system services require a
cool-down time between retrys.