+
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder();
+ b.append("ObjectInfo\n");
+ b.append("StorageId: ").append(String.format("0x%08x\n", storageId));
+ b.append("ObjectFormat: ").append(PtpConstants.objectFormatToString(objectFormat)).append('\n');
+ b.append("ProtectionStatus: ").append(protectionStatus).append('\n');
+ b.append("ObjectCompressedSize: ").append(objectCompressedSize).append('\n');
+ b.append("ThumbFormat: ").append(PtpConstants.objectFormatToString(thumbFormat)).append('\n');
+ b.append("ThumbCompressedSize: ").append(thumbCompressedSize).append('\n');
+ b.append("ThumbPixWdith: ").append(thumbPixWidth).append('\n');
+ b.append("ThumbPixHeight: ").append(thumbPixHeight).append('\n');
+ b.append("ImagePixWidth: ").append(imagePixWidth).append('\n');
+ b.append("ImagePixHeight: ").append(imagePixHeight).append('\n');
+ b.append("ImageBitDepth: ").append(imageBitDepth).append('\n');
+ b.append("ParentObject: ").append(String.format("0x%08x", parentObject)).append('\n');
+ b.append("AssociationType: ").append(associationType).append('\n');
+ b.append("AssociatonDesc: ").append(associationDesc).append('\n');
+ b.append("Filename: ").append(filename).append('\n');
+ b.append("CaptureDate: ").append(captureDate).append('\n');
+ b.append("ModificationDate: ").append(modificationDate).append('\n');
+ b.append("Keywords: ").append(keywords).append('\n');
+ return b.toString();
+ }
+}
@@ -0,0 +1,47 @@ |
||
| 1 |
+/** |
|
| 2 |
+ * Copyright 2013 Nils Assbeck, Guersel Ayaz and Michael Zoech |
|
| 3 |
+ * |
|
| 4 |
+ * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 |
+ * you may not use this file except in compliance with the License. |
|
| 6 |
+ * You may obtain a copy of the License at |
|
| 7 |
+ * |
|
| 8 |
+ * http://www.apache.org/licenses/LICENSE-2.0 |
|
| 9 |
+ * |
|
| 10 |
+ * Unless required by applicable law or agreed to in writing, software |
|
| 11 |
+ * distributed under the License is distributed on an "AS IS" BASIS, |
|
| 12 |
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 13 |
+ * See the License for the specific language governing permissions and |
|
| 14 |
+ * limitations under the License. |
|
| 15 |
+ */ |
|
| 16 |
+package com.remoteyourcam.usb.ptp.model; |
|
| 17 |
+ |
|
| 18 |
+import java.nio.ByteBuffer; |
|
| 19 |
+ |
|
| 20 |
+import com.remoteyourcam.usb.ptp.PacketUtil; |
|
| 21 |
+ |
|
| 22 |
+public class StorageInfo {
|
|
| 23 |
+ |
|
| 24 |
+ public int storageType; |
|
| 25 |
+ public int filesystemType; |
|
| 26 |
+ public int accessCapability; |
|
| 27 |
+ public long maxCapacity; |
|
| 28 |
+ public long freeSpaceInBytes; |
|
| 29 |
+ public int freeSpaceInImages; |
|
| 30 |
+ public String storageDescription; |
|
| 31 |
+ public String volumeLabel; |
|
| 32 |
+ |
|
| 33 |
+ public StorageInfo(ByteBuffer b, int length) {
|
|
| 34 |
+ decode(b, length); |
|
| 35 |
+ } |
|
| 36 |
+ |
|
| 37 |
+ private void decode(ByteBuffer b, int length) {
|
|
| 38 |
+ storageType = b.getShort() & 0xffff; |
|
| 39 |
+ filesystemType = b.getShort() & 0xffff; |
|
| 40 |
+ accessCapability = b.getShort() & 0xff; |
|
| 41 |
+ maxCapacity = b.getLong(); |
|
| 42 |
+ freeSpaceInBytes = b.getLong(); |
|
| 43 |
+ freeSpaceInImages = b.getInt(); |
|
| 44 |
+ storageDescription = PacketUtil.readString(b); |
|
| 45 |
+ volumeLabel = PacketUtil.readString(b); |
|
| 46 |
+ } |
|
| 47 |
+} |
@@ -0,0 +1,3 @@ |
||
| 1 |
+<resources> |
|
| 2 |
+ <string name="app_name">ryc</string> |
|
| 3 |
+</resources> |
@@ -1 +1 @@ |
||
| 1 |
-include ':app', ':common', ':views' |
|
| 1 |
+include ':app', ':common', ':views', ':ryc' |