diff options
author | Hsin-Yu Chao <hychao@chromium.org> | 2014-08-20 11:58:09 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-12-16 20:29:58 +0000 |
commit | 0d17ce053a25f0c1bb7c15573a4253372d95c8e9 (patch) | |
tree | 0c7ff80b653953fdfb438f7d15d8d68df7b941ea /cras/src/server/cras_bt_device.h | |
parent | 5f8889ab0bc94adba368f593232b0355744956d8 (diff) | |
download | adhd-0d17ce053a25f0c1bb7c15573a4253372d95c8e9.tar.gz |
CRAS: bt_io - Add bt_io to cras_bt_device
Make cras_bt_device holds a list of iodev of different stream
direction and add functions to append or remove profile specific
iodev to/from a cras_bt_device. In later changes, a2dp and hfp/hsp
iodev will not add to iodev_list directly but instead append to the
corresponding cras_bt_device and operates behind the bt_io wrapper.
BUG=chromium:432434
TEST=unittest
Change-Id: Iefe20a689f394f9d40849e82ff5410c04ae39232
Reviewed-on: https://chromium-review.googlesource.com/231868
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Diffstat (limited to 'cras/src/server/cras_bt_device.h')
-rw-r--r-- | cras/src/server/cras_bt_device.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cras/src/server/cras_bt_device.h b/cras/src/server/cras_bt_device.h index 51534a44..85a94ed1 100644 --- a/cras/src/server/cras_bt_device.h +++ b/cras/src/server/cras_bt_device.h @@ -10,6 +10,7 @@ struct cras_bt_adapter; struct cras_bt_device; +struct cras_iodev; enum cras_bt_device_profile { CRAS_BT_DEVICE_PROFILE_A2DP_SOURCE = (1 << 0), @@ -53,4 +54,22 @@ void cras_bt_device_update_properties(struct cras_bt_device *device, */ int cras_bt_device_sco_connect(struct cras_bt_device *device); +/* Appends an iodev to bt device. + * Args: + * device - The device to append iodev to. + * iodev - The iodev to add. + * profile - The profile of the iodev about to add. + */ +void cras_bt_device_append_iodev(struct cras_bt_device *device, + struct cras_iodev *iodev, + enum cras_bt_device_profile profile); + +/* Removes an iodev from bt device. + * Args: + * device - The device to remove iodev from. + * iodev - The iodev to remove. + */ +void cras_bt_device_rm_iodev(struct cras_bt_device *device, + struct cras_iodev *iodev); + #endif /* CRAS_BT_DEVICE_H_ */ |