diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/mtp/MtpCursor.cpp | 6 | ||||
-rw-r--r-- | media/mtp/MtpCursor.h | 20 | ||||
-rw-r--r-- | media/mtp/MtpServer.cpp | 7 |
3 files changed, 20 insertions, 13 deletions
diff --git a/media/mtp/MtpCursor.cpp b/media/mtp/MtpCursor.cpp index 8c964b4..865a294 100644 --- a/media/mtp/MtpCursor.cpp +++ b/media/mtp/MtpCursor.cpp @@ -66,7 +66,8 @@ namespace android { #define OBJECT_THUMB 221 MtpCursor::MtpCursor(MtpClient* client, int queryType, int deviceID, - int storageID, int objectID, int columnCount, int* columns) + MtpStorageID storageID, MtpObjectHandle objectID, + int columnCount, int* columns) : mClient(client), mQueryType(queryType), mDeviceID(deviceID), @@ -427,7 +428,8 @@ bool MtpCursor::putString(CursorWindow* window, const char* text, int row, int c return true; } -bool MtpCursor::putThumbnail(CursorWindow* window, int objectID, int format, int row, int column) { +bool MtpCursor::putThumbnail(CursorWindow* window, MtpObjectHandle objectID, + MtpObjectFormat format, int row, int column) { MtpDevice* device = mClient->getDevice(mDeviceID); void* thumbnail; int size, offset; diff --git a/media/mtp/MtpCursor.h b/media/mtp/MtpCursor.h index 3f84753..9e9833f 100644 --- a/media/mtp/MtpCursor.h +++ b/media/mtp/MtpCursor.h @@ -36,17 +36,18 @@ private: OBJECT_CHILDREN = 8, }; - MtpClient* mClient; - int mQueryType; - int mDeviceID; - int mStorageID; - int mQbjectID; - int mColumnCount; - int* mColumns; + MtpClient* mClient; + int mQueryType; + int mDeviceID; + MtpStorageID mStorageID; + MtpObjectHandle mQbjectID; + int mColumnCount; + int* mColumns; public: MtpCursor(MtpClient* client, int queryType, int deviceID, - int storageID, int objectID, int columnCount, int* columns); + MtpStorageID storageID, MtpObjectHandle objectID, + int columnCount, int* columns); virtual ~MtpCursor(); int fillWindow(CursorWindow* window, int startPos); @@ -68,7 +69,8 @@ private: bool prepareRow(CursorWindow* window); bool putLong(CursorWindow* window, int value, int row, int column); bool putString(CursorWindow* window, const char* text, int row, int column); - bool putThumbnail(CursorWindow* window, int objectID, int format, int row, int column); + bool putThumbnail(CursorWindow* window, MtpObjectHandle objectID, + MtpObjectFormat format, int row, int column); }; }; // namespace android diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 6332b4e..84a3e2c 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -26,6 +26,8 @@ #include <cutils/properties.h> +#define LOG_TAG "MtpServer" + #include "MtpDebug.h" #include "MtpDatabase.h" #include "MtpProperty.h" @@ -68,8 +70,8 @@ static const MtpOperationCode kSupportedOperationCodes[] = { // MTP_OPERATION_INITIATE_OPEN_CAPTURE, MTP_OPERATION_GET_OBJECT_PROPS_SUPPORTED, MTP_OPERATION_GET_OBJECT_PROP_DESC, -// MTP_OPERATION_GET_OBJECT_PROP_VALUE, -// MTP_OPERATION_SET_OBJECT_PROP_VALUE, + MTP_OPERATION_GET_OBJECT_PROP_VALUE, + MTP_OPERATION_SET_OBJECT_PROP_VALUE, MTP_OPERATION_GET_OBJECT_REFERENCES, MTP_OPERATION_SET_OBJECT_REFERENCES, // MTP_OPERATION_SKIP, @@ -294,6 +296,7 @@ bool MtpServer::handleRequest() { response = doGetDevicePropDesc(); break; default: + LOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation)); response = MTP_RESPONSE_OPERATION_NOT_SUPPORTED; break; } |