summaryrefslogtreecommitdiffstats
path: root/mtp/MtpServer.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2018-12-19 00:39:53 +0100
committerEthan Yonker <dees_troy@teamw.in>2019-03-20 20:28:21 +0100
commitaf32bb9c4f4f06e92de3435ed2db3153c0701094 (patch)
tree622948fb3167dc17bb436c948d61df581d2e75f7 /mtp/MtpServer.cpp
parentAdding Edl button in reboot menu (diff)
downloadandroid_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.tar
android_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.tar.gz
android_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.tar.bz2
android_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.tar.lz
android_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.tar.xz
android_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.tar.zst
android_bootable_recovery-af32bb9c4f4f06e92de3435ed2db3153c0701094.zip
Diffstat (limited to '')
-rw-r--r--mtp/legacy/MtpServer.cpp (renamed from mtp/MtpServer.cpp)44
1 files changed, 22 insertions, 22 deletions
diff --git a/mtp/MtpServer.cpp b/mtp/legacy/MtpServer.cpp
index 11eca86bc..c4e1cd3ae 100644
--- a/mtp/MtpServer.cpp
+++ b/mtp/legacy/MtpServer.cpp
@@ -25,8 +25,8 @@
#include <errno.h>
#include <sys/stat.h>
#include <dirent.h>
-#include "../twcommon.h"
-#include "../set_metadata.h"
+#include "../../twcommon.h"
+#include "../../set_metadata.h"
#include <cutils/properties.h>
#include "MtpTypes.h"
@@ -383,7 +383,7 @@ bool MtpServer::handleRequest() {
MTPD("doGetStorageIDs()\n");
response = doGetStorageIDs();
break;
- case MTP_OPERATION_GET_STORAGE_INFO:
+ case MTP_OPERATION_GET_STORAGE_INFO:
MTPD("about to call doGetStorageInfo()\n");
response = doGetStorageInfo();
break;
@@ -527,7 +527,7 @@ MtpResponseCode MtpServer::doGetDeviceInfo() {
sizeof(kSupportedEventCodes) / sizeof(uint16_t)); // Events Supported
mData.putAUInt16(deviceProperties); // Device Properties Supported
mData.putAUInt16(captureFormats); // Capture Formats
- mData.putAUInt16(playbackFormats); // Playback Formats
+ mData.putAUInt16(playbackFormats); // Playback Formats
property_get("ro.product.manufacturer", prop_value, "unknown manufacturer");
MTPD("prop: %s\n", prop_value);
@@ -824,7 +824,7 @@ MtpResponseCode MtpServer::doGetObjectInfo() {
mData.putString(info.mName);
mData.putEmptyString(); // date created
formatDateTime(info.mDateModified, date, sizeof(date));
- mData.putString(date); // date modified
+ mData.putString(date); // date modified
mData.putEmptyString(); // keywords
}
return result;
@@ -846,7 +846,7 @@ MtpResponseCode MtpServer::doGetObject() {
const char* filePath = (const char *)pathBuf;
MTPD("filePath: %s\n", filePath);
- mtp_file_range mfr;
+ mtp_file_range mfr;
mfr.fd = open(filePath, O_RDONLY);
if (mfr.fd < 0) {
return MTP_RESPONSE_GENERAL_ERROR;
@@ -918,7 +918,7 @@ MtpResponseCode MtpServer::doGetPartialObject(MtpOperationCode operation) {
length = fileLength - offset;
const char* filePath = (const char *)pathBuf;
- mtp_file_range mfr;
+ mtp_file_range mfr;
mfr.fd = open(filePath, O_RDONLY);
if (mfr.fd < 0) {
return MTP_RESPONSE_GENERAL_ERROR;
@@ -971,21 +971,21 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
}
// read only the fields we need
- mData.getUInt32(); // storage ID
+ mData.getUInt32(); // storage ID
MtpObjectFormat format = mData.getUInt16();
- mData.getUInt16(); // protection status
+ mData.getUInt16(); // protection status
mSendObjectFileSize = mData.getUInt32();
- mData.getUInt16(); // thumb format
- mData.getUInt32(); // thumb compressed size
- mData.getUInt32(); // thumb pix width
- mData.getUInt32(); // thumb pix height
- mData.getUInt32(); // image pix width
- mData.getUInt32(); // image pix height
- mData.getUInt32(); // image bit depth
- mData.getUInt32(); // parent
+ mData.getUInt16(); // thumb format
+ mData.getUInt32(); // thumb compressed size
+ mData.getUInt32(); // thumb pix width
+ mData.getUInt32(); // thumb pix height
+ mData.getUInt32(); // image pix width
+ mData.getUInt32(); // image pix height
+ mData.getUInt32(); // image bit depth
+ mData.getUInt32(); // parent
uint16_t associationType = mData.getUInt16();
- uint32_t associationDesc = mData.getUInt32(); // association desc
- mData.getUInt32(); // sequence number
+ uint32_t associationDesc = mData.getUInt32(); // association desc
+ mData.getUInt32(); // sequence number
MtpStringBuffer name, created, modified;
mData.getString(name); // file name
mData.getString(created); // date created
@@ -1077,7 +1077,7 @@ MtpResponseCode MtpServer::doSendObject() {
}
initialData = ret - MTP_CONTAINER_HEADER_SIZE;
- mtp_file_range mfr;
+ mtp_file_range mfr;
mfr.fd = open(mSendObjectFilePath, O_RDWR | O_CREAT | O_TRUNC, 0640);
if (mfr.fd < 0) {
result = MTP_RESPONSE_GENERAL_ERROR;
@@ -1114,7 +1114,7 @@ MtpResponseCode MtpServer::doSendObject() {
if (errno == ECANCELED)
result = MTP_RESPONSE_TRANSACTION_CANCELLED;
else {
- MTPD("errno: %d\n", errno);
+ MTPD("errno: %d\n", errno);
result = MTP_RESPONSE_GENERAL_ERROR;
}
}
@@ -1292,7 +1292,7 @@ MtpResponseCode MtpServer::doSendPartialObject() {
}
if (length > 0) {
- mtp_file_range mfr;
+ mtp_file_range mfr;
mfr.fd = edit->mFD;
mfr.offset = offset;
mfr.length = length;