summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-common.h
AgeCommit message (Collapse)AuthorFilesLines
2020-10-06Adding pairing request with authentication as "RequestPinCode"saman1-0/+4
Adding outgoing pairing request with another BT device when we call pair verb. "RequestPinCode" is handled as xml into bluetooth-agent.c to confirm a pincode and send it to BT device when we call pair request from AGL device to other device. Bug-AGL: SPEC-3610 Signed-off-by: saman <mahmoudi.saman1@gmail.com> Change-Id: I4fa8c9ab5d3bbf323cee7645f217bb1056d93b65
2020-07-13fix segfaults due to races & missing adapterRaquel Medina1-1/+2
During start up, there are races between the bluetooth, persistence, bluetooth-map and bluetooth-pbap bindings; on top of it, in the case there's no bluetooth controller in the system, various key parameters can exhibit a null value. The combination of these races and the lack of bluetooth controller can manifest in a number of segfaults in the bluetooth binding (it's very easy to reproduce on qemu). This commit brings in several changes to make the bluetooth binding resilient to the races and lack of bluetooth controller: * on startup, retrieve the default adapter from the persistence binding from the init thread * store the system default adapter in the service init data structure, and store the active adapter in the bluetooth state structure. * update get_default_adapter to return value obtained from persistence biding, without further processing; * add guards to make sure the userdata retrieved from the application framework is valid; * on verbs processing, ensure the caller provides an adapter to apply the verb to, or that at least there's a valid adapter associated to the bluetooth state structure; * initialize agent_data's device_path following free operation; * add guards for mediaplayer_path. Bug-AGL: SPEC-3301 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ia5a0dc9a61024ff43cd247216d0dff6918046f7e
2019-04-12binding: bluetooth: remove useless function prototypeMatt Ranostay1-4/+0
Remove function prototype from bluetooth-common.h for the deleted bluetooth-rfkill.c source file. Change-Id: I2bc9e789868a01a0b62643b6406970c436308567 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2019-02-25binding: bluetooth: add adapter_changes eventMatt Ranostay1-0/+1
adapter_changes event allows clients to know when an adapter's status changes as in addition or removal. Bug-AGL: SPEC-1763 Change-Id: I7a442ece7cf6b508d6290130a939fccc1bddebb9 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-12-07binding: bluetooth: add default_adapter verbMatt Ranostay1-0/+8
Allow setting of default adapter for use by other verbs within the binding. This allows to select an adapter on boards with more than one. Bug-AGL: SPEC-1630 Change-Id: Iec77b0abaa9f4c092dc5c827522efb1744953fce Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-11-14binding: bluetooth: add MediaPlayer1 interface media eventsguppy_6.99.2guppy_6.99.1guppy/6.99.2guppy/6.99.16.99.26.99.1Matt Ranostay1-0/+4
Report back MediaPlayer1 interface events for A2DP media playback Bug-AGL: SPEC-1630 Change-Id: I777f19af2de247fe676d5bede4bacbbad8ca9844 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-11-12binding: bluetooth: add initial discovery filter supportMatt Ranostay1-0/+2
Allow clients to request devices only with certain profile UUIDs to be displayed in an discovery scan. This allows to filter out things like location tokens, smart scales, and etc which can't possibly have a2dp or hfp profiles for instance. NOTE: This is a write only setting. In the future should be read/write to see current discovery filters. Bug-AGL: SPEC-1630 Change-Id: Ic8b18656f84ac8047b170d6e601fcc2e63786af0 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-11-12binding: bluetooth: add return_bluez_path functionMatt Ranostay1-0/+2
Concatenate adapter and device parameters to return a bluez path for usage within the binding's dbus calls. Bug-AGL: SPEC-1630 Change-Id: I4c96fa48baaf12b23aac98ba35f1ca82f7005bcb Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-11-12binding: bluetooth: return adapter/device versus bluez pathMatt Ranostay1-0/+2
To allow this binding API to be bluetooth stack agnostic remove pure bluez paths, and replace with generic fields. Bug-AGL: SPEC-1630 Change-Id: Iadba73782b6339df2ca5937e16a654e7ef3e477b Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
2018-11-12binding: bluetooth: initial commit of binding rewriteMatt Ranostay1-0/+196
Bug-AGL: SPEC-1630 Change-Id: I33cfec70283fa29f47b76f9e6be3e8e6cd6a2f54 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>