diff options
author | Bharat Panda <bharat.panda@samsung.com> | 2015-04-16 18:46:38 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-04-17 16:56:21 +0300 |
commit | aff80675b155bdf572f744810400d9e5e6eb335a (patch) | |
tree | 9a527e075292cf09f08f9250eba4bad8baa6e01c /monitor/l2cap.h | |
parent | ddb01ec67362b71b302cd57d85972895ed294826 (diff) | |
download | bluez-aff80675b155bdf572f744810400d9e5e6eb335a.tar.gz |
monitor: Add MediaPlayerItem for GetFolderItems
Add support for decoding GetFolderItems(MediaPlayerItem) for avrcp
in bluetooth monitor.
Channel: 65 len 20 ctrl 0x0306 [PSM 27 mode 3] {chan 1}
I-frame: Unsegmented TxSeq 3 ReqSeq 3
AVCTP Browsing: Command: type 0x00 label 0 PID 0x110e
AVRCP: GetFolderItems: len 0x000a
Scope: 0x00 (Media Player List)
StartItem: 0x00000000 (0)
EndItem: 0x00000064 (100)
AttributeCount: 0x00 (0)
Diffstat (limited to 'monitor/l2cap.h')
-rw-r--r-- | monitor/l2cap.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/monitor/l2cap.h b/monitor/l2cap.h index 711bcb161..036445412 100644 --- a/monitor/l2cap.h +++ b/monitor/l2cap.h @@ -153,6 +153,22 @@ static inline bool l2cap_frame_get_le64(struct l2cap_frame *frame, return true; } +static inline bool l2cap_frame_get_be128(struct l2cap_frame *frame, + uint64_t *lvalue, uint64_t *rvalue) +{ + if (frame->size < (sizeof(*lvalue) + sizeof(*rvalue))) + return false; + + if (lvalue && rvalue) { + *lvalue = get_be64(frame->data); + *rvalue = get_be64(frame->data); + } + + l2cap_frame_pull(frame, frame, (sizeof(*lvalue) + sizeof(*rvalue))); + + return true; +} + void l2cap_packet(uint16_t index, bool in, uint16_t handle, uint8_t flags, const void *data, uint16_t size); |