aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2011-08-01 11:42:14 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-08-03 13:59:58 +0300
commitbc4f1dcd77250a1566d7052dba624bd17ca28929 (patch)
tree28e05b1dfb73bdd9e68c2cdeff52282b21396800
parentf8abe43fbb2b79a318d2603eb689f29e1dfeb8e8 (diff)
downloadbluez-hcidump-bc4f1dcd77250a1566d7052dba624bd17ca28929.tar.gz
bluez-hcidump-bc4f1dcd77250a1566d7052dba624bd17ca28929.tar.xz
bluez-hcidump-bc4f1dcd77250a1566d7052dba624bd17ca28929.zip
Add parsing for AVRCP InformDisplayableCharacterSet PDU
-rw-r--r--parser/avrcp.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/parser/avrcp.c b/parser/avrcp.c
index c9a838d..53d8be2 100644
--- a/parser/avrcp.c
+++ b/parser/avrcp.c
@@ -817,6 +817,36 @@ response:
}
}
+static void avrcp_displayable_charset(int level, struct frame *frm,
+ uint8_t ctype, uint16_t len)
+{
+ uint8_t num;
+
+ if (ctype > AVC_CTYPE_GENERAL_INQUIRY)
+ return;
+
+ p_indent(level, frm);
+
+ if (len < 2) {
+ printf("PDU Malformed\n");
+ raw_dump(level, frm);
+ return;
+ }
+
+ num = get_u8(frm);
+ printf("CharsetCount: 0x%02x\n", num);
+
+ for (; num > 0; num--) {
+ uint16_t charset;
+
+ p_indent(level, frm);
+
+ charset = get_u16(frm);
+ printf("CharsetID: 0x%04x (%s)\n", charset,
+ charset2str(charset));
+ }
+}
+
static void avrcp_pdu_dump(int level, struct frame *frm, uint8_t ctype)
{
uint8_t pduid, pt;
@@ -866,6 +896,9 @@ static void avrcp_pdu_dump(int level, struct frame *frm, uint8_t ctype)
case AVRCP_GET_PLAYER_VALUE_TEXT:
avrcp_get_player_value_text_dump(level + 1, frm, ctype, len);
break;
+ case AVRCP_DISPLAYABLE_CHARSET:
+ avrcp_displayable_charset(level + 1, frm, ctype, len);
+ break;
default:
raw_dump(level, frm);
}