equal
deleted
inserted
replaced
25 #include <mtp/mmtpobjectmgr.h> |
25 #include <mtp/mmtpobjectmgr.h> |
26 |
26 |
27 #include "cmtpgetobjectpropvalue.h" |
27 #include "cmtpgetobjectpropvalue.h" |
28 #include "mtpdpconst.h" |
28 #include "mtpdpconst.h" |
29 #include "mtpdppanic.h" |
29 #include "mtpdppanic.h" |
|
30 #include "mtpdebug.h" |
|
31 #include "OstTraceDefinitions.h" |
|
32 #ifdef OST_TRACE_COMPILER_IN_USE |
|
33 #include "cmtpgetobjectpropvalueTraces.h" |
|
34 #endif |
|
35 |
30 |
36 |
31 |
37 |
32 /** |
38 /** |
33 Verification data for the GetObjectPropValue request |
39 Verification data for the GetObjectPropValue request |
34 */ |
40 */ |
122 { |
128 { |
123 __ASSERT_DEBUG(iRequestChecker, Panic(EMTPDpRequestCheckNull)); |
129 __ASSERT_DEBUG(iRequestChecker, Panic(EMTPDpRequestCheckNull)); |
124 |
130 |
125 TUint32 handle = Request().Uint32(TMTPTypeRequest::ERequestParameter1); |
131 TUint32 handle = Request().Uint32(TMTPTypeRequest::ERequestParameter1); |
126 iFramework.ObjectMgr().ObjectL(TMTPTypeUint32(handle), *iObjMeta); |
132 iFramework.ObjectMgr().ObjectL(TMTPTypeUint32(handle), *iObjMeta); |
127 User::LeaveIfError(iRfs.Entry(iObjMeta->DesC(CMTPObjectMetaData::ESuid), iFileEntry)); |
133 LEAVEIFERROR(iRfs.Entry(iObjMeta->DesC(CMTPObjectMetaData::ESuid), iFileEntry), |
128 |
134 OstTraceExt1(TRACE_ERROR, CMTPGETOBJECTPROPVALUE_SERVICEL, |
|
135 "can't get entry details for %S!", iObjMeta->DesC(CMTPObjectMetaData::ESuid))); |
|
136 |
129 TUint32 propCode = Request().Uint32(TMTPTypeRequest::ERequestParameter2); |
137 TUint32 propCode = Request().Uint32(TMTPTypeRequest::ERequestParameter2); |
130 switch(propCode) |
138 switch(propCode) |
131 { |
139 { |
132 case EMTPObjectPropCodeStorageID: |
140 case EMTPObjectPropCodeStorageID: |
133 ServiceStorageIdL(); |
141 ServiceStorageIdL(); |
163 ServiceNameL(); |
171 ServiceNameL(); |
164 break; |
172 break; |
165 case EMTPObjectPropCodeNonConsumable: |
173 case EMTPObjectPropCodeNonConsumable: |
166 ServiceNonConsumableL(); |
174 ServiceNonConsumableL(); |
167 break; |
175 break; |
|
176 case EMTPObjectPropCodeHidden: |
|
177 ServiceHiddenL(); |
|
178 break; |
168 default: |
179 default: |
|
180 OstTrace1(TRACE_ERROR, DUP1_CMTPGETOBJECTPROPVALUE_SERVICEL, "Invalid property code %d", propCode ); |
169 User::Leave( KErrNotSupported ); |
181 User::Leave( KErrNotSupported ); |
170 break; |
182 break; |
171 } |
183 } |
172 } |
184 } |
173 |
185 |
263 { |
275 { |
264 iMTPTypeUint8.Set((iObjMeta->Uint(CMTPObjectMetaData::ENonConsumable))); |
276 iMTPTypeUint8.Set((iObjMeta->Uint(CMTPObjectMetaData::ENonConsumable))); |
265 SendDataL(iMTPTypeUint8); |
277 SendDataL(iMTPTypeUint8); |
266 } |
278 } |
267 |
279 |
|
280 void CMTPGetObjectPropValue::ServiceHiddenL() |
|
281 { |
|
282 TBool isHidden = iFileEntry.IsHidden(); |
|
283 if ( isHidden ) |
|
284 { |
|
285 iMTPTypeUint16.Set(EMTPHidden); |
|
286 } |
|
287 else |
|
288 { |
|
289 iMTPTypeUint16.Set(EMTPVisible); |
|
290 } |
|
291 SendDataL(iMTPTypeUint16); |
|
292 } |
268 |
293 |
269 |
294 |
270 |
295 |
271 |
296 |
272 |
297 |