4 #include <proto/poseidon.h>
6 #define PsdBase nch->nch_Base
8 /* /// "Operation Codes" */
9 const struct PTPIDMap opcodemap
[] =
11 { 0x1000, "Undefined" },
12 { 0x1001, "GetDeviceInfo" },
13 { 0x1002, "OpenSession" },
14 { 0x1003, "CloseSession" },
15 { 0x1004, "GetStorageIDs" },
16 { 0x1005, "GetStorageInfo" },
17 { 0x1006, "GetNumObjects" },
18 { 0x1007, "GetObjectHandles" },
19 { 0x1008, "GetObjectInfo" },
20 { 0x1009, "GetObject" },
21 { 0x100A, "GetThumb" },
22 { 0x100B, "DeleteObject" },
23 { 0x100C, "SendObjectInfo" },
24 { 0x100D, "SendObject" },
25 { 0x100E, "InitiateCapture" },
26 { 0x100F, "FormatStore" },
27 { 0x1010, "ResetDevice" },
28 { 0x1011, "SelfTest" },
29 { 0x1012, "SetObjectProtection" },
30 { 0x1013, "PowerDown" },
31 { 0x1014, "GetDevicePropDesc" },
32 { 0x1015, "GetDevicePropValue" },
33 { 0x1016, "SetDevicePropValue" },
34 { 0x1017, "ResetDevicePropValue" },
35 { 0x1018, "TerminateOpenCapture" },
36 { 0x1019, "MoveObject" },
37 { 0x101A, "CopyObject" },
38 { 0x101B, "GetPartialObject" },
39 { 0x101C, "InitiateOpenCapture" },
44 /* /// "Response Codes" */
45 const struct PTPIDMap rescodemap
[] =
47 { 0x2000, "Undefined" },
49 { 0x2002, "General Error" },
50 { 0x2003, "Session Not Open" },
51 { 0x2004, "Invalid TransactionID" },
52 { 0x2005, "Operation Not Supported" },
53 { 0x2006, "Parameter Not Supported" },
54 { 0x2007, "Incomplete Transfer" },
55 { 0x2008, "Invalid StorageID" },
56 { 0x2009, "Invalid ObjectHandle" },
57 { 0x200A, "DeviceProp Not Supported" },
58 { 0x200B, "Invalid ObjectFormatCode" },
59 { 0x200C, "Store Full" },
60 { 0x200D, "Object WriteProtected" },
61 { 0x200E, "Store Read-Only" },
62 { 0x200F, "Access Denied" },
63 { 0x2010, "No Thumbnail Present" },
64 { 0x2011, "SelfTest Failed" },
65 { 0x2012, "Partial Deletion" },
66 { 0x2013, "Store Not Available" },
67 { 0x2014, "Specification By Format Unsupported" },
68 { 0x2015, "No Valid ObjectInfo" },
69 { 0x2016, "Invalid Code Format" },
70 { 0x2017, "Unknown Vendor Code" },
71 { 0x2018, "Capture Already Terminated" },
72 { 0x2019, "Device Busy" },
73 { 0x201A, "Invalid ParentObject" },
74 { 0x201B, "Invalid DeviceProp Format" },
75 { 0x201C, "Invalid DeviceProp Value" },
76 { 0x201D, "Invalid Parameter" },
77 { 0x201E, "Session Already Open" },
78 { 0x201F, "Transaction Cancelled" },
79 { 0x2020, "Specification of Destination Unsupported" },
85 /* /// "Object Format Codes" */
86 const struct PTPIDMap objectfmtcodemap
[] =
88 { 0x3000, "Undefined" },
89 { 0x3001, "Association" },
91 { 0x3003, "Executable" },
101 { 0x3800, "Undefined2" },
102 { 0x3801, "EXIF/JPEG" },
103 { 0x3802, "TIFF/EP" },
104 { 0x3803, "FlashPix" },
107 { 0x3806, "Undefined3" },
113 { 0x380C, "Undefined4" },
115 { 0x380E, "TIFF/IT" },
122 /* /// "Event Codes" */
123 const struct PTPIDMap eventcodemap
[] =
125 { 0x4000, "Undefined" },
126 { 0x4001, "CancelTransaction" },
127 { 0x4002, "ObjectAdded" },
128 { 0x4003, "ObjectRemoved" },
129 { 0x4004, "StoreAdded" },
130 { 0x4005, "StoreRemoved" },
131 { 0x4006, "DevicePropChanged" },
132 { 0x4007, "ObjectInfoChanged" },
133 { 0x4008, "DeviceInfoChanged" },
134 { 0x4009, "RequestObjectTransfer" },
135 { 0x400A, "StoreFull" },
136 { 0x400B, "DeviceReset" },
137 { 0x400C, "StorageInfoChanged" },
138 { 0x400D, "CaptureComplete" },
139 { 0x400E, "UnreportedStatus" },
144 /* /// "Device Property Codes" */
145 const struct PTPIDMap devicepropcodemap
[] =
147 { 0x5000, "Undefined" },
148 { 0x5001, "BatteryLevel" },
149 { 0x5002, "FunctionalMode" },
150 { 0x5003, "ImageSize" },
151 { 0x5004, "CompressionSetting" },
152 { 0x5005, "WhiteBalance" },
153 { 0x5006, "RGB Gain" },
154 { 0x5007, "F-Number" },
155 { 0x5008, "FocalLength" },
156 { 0x5009, "FocusDistance" },
157 { 0x500A, "FocusMode" },
158 { 0x500B, "ExposureMeteringMode" },
159 { 0x500C, "FlashMode" },
160 { 0x500D, "ExposureTime" },
161 { 0x500E, "ExposureProgramMode" },
162 { 0x500F, "ExposureIndex" },
163 { 0x5010, "ExposureBiasCompensation" },
164 { 0x5011, "DateTime" },
165 { 0x5012, "CaptureDelay" },
166 { 0x5013, "StillCaptureMode" },
167 { 0x5014, "Contrast" },
168 { 0x5015, "Sharpness" },
169 { 0x5016, "DigitalZoom" },
170 { 0x5017, "EffectMode" },
171 { 0x5018, "BurstNumber" },
172 { 0x5019, "BurstInterval" },
173 { 0x501A, "TimelapseNumber" },
174 { 0x501B, "TimelapseInterval" },
175 { 0x501C, "FocusMeteringMode" },
176 { 0x501D, "UploadURL" },
177 { 0x501E, "Artist" },
178 { 0x501F, "CopyrightInfo" },
184 /* /// "nNumToStr()" */
185 STRPTR
nNumToStr(struct NepClassPTP
*nch
, UWORD type
, ULONG id
, STRPTR defstr
)
187 const struct PTPIDMap
*pim
= NULL
;
199 //case NTS_OBJECTFMTCODE:
200 // pim = objectfmtcodemap;
203 //case NTS_EVENTCODE:
204 // pim = eventcodemap;
207 //case NTS_DEVICEPROPCODE:
208 // pim = devicepropcodemap;
213 while(pim
->pim_String
)
215 if(pim
->pim_ID
== id
)
217 return(pim
->pim_String
);