From b6da06e9dfb916da4b88e09e8a83e22ddae445b5 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Thu, 14 Oct 2010 18:03:25 -0400 Subject: MTP: Partial implementation of the GetObjectPropList command In this initial implementation we only support fetching one property at a time. Support depth = 0 (single object) or depth = 1 (all objects in a directory) Reimplemented GetObjectPropValue on top of GetObjectPropList, since the former is a special case of the latter. Change-Id: Ia76ee61741d6ee3902b5c5d9fc094cf86dfaf650 Signed-off-by: Mike Lockwood --- media/mtp/MtpDebug.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'media/mtp/MtpDebug.cpp') diff --git a/media/mtp/MtpDebug.cpp b/media/mtp/MtpDebug.cpp index 3416807..1668ecf 100644 --- a/media/mtp/MtpDebug.cpp +++ b/media/mtp/MtpDebug.cpp @@ -56,6 +56,10 @@ static const CodeEntry sOperationCodes[] = { { "MTP_OPERATION_GET_OBJECT_PROP_DESC", 0x9802 }, { "MTP_OPERATION_GET_OBJECT_PROP_VALUE", 0x9803 }, { "MTP_OPERATION_SET_OBJECT_PROP_VALUE", 0x9804 }, + { "MTP_OPERATION_GET_OBJECT_PROP_LIST", 0x9805 }, + { "MTP_OPERATION_SET_OBJECT_PROP_LIST", 0x9806 }, + { "MTP_OPERATION_GET_INTERDEPENDENT_PROP_DESC", 0x9807 }, + { "MTP_OPERATION_SEND_OBJECT_PROP_LIST", 0x9808 }, { "MTP_OPERATION_GET_OBJECT_REFERENCES", 0x9810 }, { "MTP_OPERATION_SET_OBJECT_REFERENCES", 0x9811 }, { "MTP_OPERATION_SKIP", 0x9820 }, @@ -371,15 +375,21 @@ const char* MtpDebug::getOperationCodeName(MtpOperationCode code) { return getCodeName(code, sOperationCodes); } -const char* MtpDebug::getFormatCodeName(MtpOperationCode code) { +const char* MtpDebug::getFormatCodeName(MtpObjectFormat code) { + if (code == 0) + return "NONE"; return getCodeName(code, sFormatCodes); } const char* MtpDebug::getObjectPropCodeName(MtpPropertyCode code) { + if (code == 0) + return "NONE"; return getCodeName(code, sObjectPropCodes); } const char* MtpDebug::getDevicePropCodeName(MtpPropertyCode code) { + if (code == 0) + return "NONE"; return getCodeName(code, sDevicePropCodes); } -- cgit v1.1