equal
deleted
inserted
replaced
93 // Second-phase construction |
93 // Second-phase construction |
94 // ----------------------------------------------------------------------------- |
94 // ----------------------------------------------------------------------------- |
95 // |
95 // |
96 EXPORT_C void CGetObjectInfo::ConstructL() |
96 EXPORT_C void CGetObjectInfo::ConstructL() |
97 { |
97 { |
|
98 CActiveScheduler::Add( this ); |
98 } |
99 } |
99 |
100 |
100 // ----------------------------------------------------------------------------- |
101 // ----------------------------------------------------------------------------- |
101 // CGetObjectInfo::ServiceL |
102 // CGetObjectInfo::ServiceL |
102 // GetObjectInfo request handler |
103 // GetObjectInfo request handler |
103 // ----------------------------------------------------------------------------- |
104 // ----------------------------------------------------------------------------- |
104 // |
105 // |
105 void CGetObjectInfo::ServiceL() |
106 void CGetObjectInfo::ServiceL() |
106 { |
107 { |
107 PRINT( _L( "MM MTP => CGetObjectInfo::ServiceL" ) ); |
108 PRINT( _L( "MM MTP => CGetObjectInfo::ServiceL" ) ); |
108 |
109 |
109 MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive); |
110 MmMtpDpUtility::SetPSStatus(EMtpPSStatusActive); |
110 |
111 |
111 delete iObjectInfo; |
112 delete iObjectInfo; |
112 iObjectInfo = NULL; |
113 iObjectInfo = NULL; |
113 iObjectInfo = CMTPTypeObjectInfo::NewL(); |
114 iObjectInfo = CMTPTypeObjectInfo::NewL(); |
171 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImagePixHeight, height ); |
172 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImagePixHeight, height ); |
172 |
173 |
173 // Image Bit Depth |
174 // Image Bit Depth |
174 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImageBitDepth, 0 ); |
175 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImageBitDepth, 0 ); |
175 // Parent Object |
176 // Parent Object |
176 TUint32 parentHandle = object->Uint( CMTPObjectMetaData::EParentHandle ); |
177 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EParentObject, |
177 // refer to 5.3.1.9 of MTP Spec 1.0 |
178 object->Uint( CMTPObjectMetaData::EParentHandle ) ); |
178 if ( parentHandle == KMTPHandleNoParent ) |
|
179 { |
|
180 parentHandle = KMTPHandleNone; |
|
181 } |
|
182 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EParentObject, parentHandle ); |
|
183 // Association Type |
179 // Association Type |
184 iObjectInfo->SetUint16L( CMTPTypeObjectInfo::EAssociationType, 0 ); |
180 iObjectInfo->SetUint16L( CMTPTypeObjectInfo::EAssociationType, 0 ); |
185 // Association Description |
181 // Association Description |
186 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EAssociationDescription, 0 ); |
182 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EAssociationDescription, 0 ); |
187 // *Sequence Number |
183 // *Sequence Number |