Add Strings for bluetooth errors

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Ruiz Dorantes 2009-07-01 20:31:02 +00:00
parent dd92605394
commit 880e57277e

View File

@ -549,67 +549,127 @@ const char* testingCommands[] = {
const char* bluetoothEvents[] = {
"Inquiry Complete",
"Inquiry Result",
"Conn Complete",
"Conn Request",
"Disconnection Complete",
"Auth Complete",
"Remote Name Request Complete",
"Encrypt Change",
"Change Conn Link Key Complete",
"Master Link Key Compl",
"Rmt Features",
"Rmt Version",
"Qos Setup Complete",
"Command Complete",
"Command Status",
"Hardware Error",
"Flush Occur",
"Role Change",
"Num Comp Pkts",
"Mode Change",
"Return Link Keys",
"Pin Code Req",
"Link Key Req",
"Link Key Notify",
"Loopback Command",
"Data Buffer Overflow",
"Max Slot Change",
"Read Clock Offset Compl",
"Con Pkt Type Changed",
"Qos Violation",
"Reserved",
"Page Scan Rep Mode Change",
"Flow Specification",
"Inquiry Result With Rssi",
"Remote Extended Features",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Synchronous Connection Completed",
"Synchronous Connection Changed",
"Reserved",
"Extended Inquiry Result",
"Encryption Key Refersh Complete",
"Io Capability Request",
"Io Capability Response",
"User Confirmation Request",
"User Passkey Request",
"Oob Data Request",
"Simple Pairing Complete",
"Reserved",
"Link Supervision Timeout Changed",
"Enhanced Flush Complete",
"Reserved",
"Reserved",
"Keypress Notification",
"Remote Host Supported Features Notification"
"Inquiry Complete",
"Inquiry Result",
"Conn Complete",
"Conn Request",
"Disconnection Complete",
"Auth Complete",
"Remote Name Request Complete",
"Encrypt Change",
"Change Conn Link Key Complete",
"Master Link Key Compl",
"Rmt Features",
"Rmt Version",
"Qos Setup Complete",
"Command Complete",
"Command Status",
"Hardware Error",
"Flush Occur",
"Role Change",
"Num Comp Pkts",
"Mode Change",
"Return Link Keys",
"Pin Code Req",
"Link Key Req",
"Link Key Notify",
"Loopback Command",
"Data Buffer Overflow",
"Max Slot Change",
"Read Clock Offset Compl",
"Con Pkt Type Changed",
"Qos Violation",
"Reserved",
"Page Scan Rep Mode Change",
"Flow Specification",
"Inquiry Result With Rssi",
"Remote Extended Features",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Reserved",
"Synchronous Connection Completed",
"Synchronous Connection Changed",
"Reserved",
"Extended Inquiry Result",
"Encryption Key Refersh Complete",
"Io Capability Request",
"Io Capability Response",
"User Confirmation Request",
"User Passkey Request",
"Oob Data Request",
"Simple Pairing Complete",
"Reserved",
"Link Supervision Timeout Changed",
"Enhanced Flush Complete",
"Reserved",
"Reserved",
"Keypress Notification",
"Remote Host Supported Features Notification"
};
const char* bluetoothErrors[] = {
"No Error",
"Unknown Command",
"No Connection",
"Hardware Failure",
"Page Timeout",
"Authentication Failure",
"Pin Or Key Missing",
"Memory Full",
"Connection Timeout",
"Max Number Of Connections",
"Max Number Of Sco Connections",
"Acl Connection Exists",
"Command Disallowed",
"Rejected Limited Resources",
"Rejected Security",
"Rejected Personal",
"Host Timeout",
"Unsupported Feature",
"Invalid Parameters",
"Remote User Ended Connection",
"Remote Low Resources",
"Remote Power Off",
"Connection Terminated",
"Repeated Attempts",
"Pairing Not Allowed",
"Unknown Lmp Pdu",
"Unsupported Remote Feature",
"Sco Offset Rejected",
"Sco Interval Rejected",
"Air Mode Rejected",
"Invalid Lmp Parameters",
"Unspecified Error",
"Unsupported Lmp Parameter Value",
"Role Change Not Allowed",
"Lmp Response Timeout",
"Lmp Error Transaction Collision",
"Lmp Pdu Not Allowed",
"Encryption Mode Not Accepted",
"Unit Link Key Used",
"Qos Not Supported",
"Instant Passed",
"Pairing With Unit Key Not Supported",
"Different Transaction Collision",
"Qos Unacceptable Parameter",
"Qos Rejected",
"Classification Not Supported",
"Insufficient Security",
"Parameter Out Of Range",
"Reserved",
"Role Switch Pending",
"Reserved",
"Slot Violation",
"Role Switch Failed",
"Extended Inquiry Response Too Large",
"Simple Pairing Not Supported By Host",
"Host Busy Pairing"
};
@ -695,3 +755,14 @@ GetManufacturer(uint16 manufacturer) {
return "not assigned";
}
}
const char*
GetError(uint8 error) {
if (error < sizeof(bluetoothErrors)/sizeof(const char*)) {
return bluetoothErrors[error];
} else {
return "not specified";
}
}