equal
deleted
inserted
replaced
14 * Description: Implement operation: GetObjectInfo |
14 * Description: Implement operation: GetObjectInfo |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include <mtp/mmtpdataproviderframework.h> |
|
20 #include <mtp/cmtptypeobjectinfo.h> |
19 #include <mtp/cmtptypeobjectinfo.h> |
21 #include <f32file.h> |
20 #include <f32file.h> |
22 |
21 |
23 #include "mmmtpdputility.h" |
22 #include "mmmtpdputility.h" |
24 #include "cgetobjectinfo.h" |
23 #include "cgetobjectinfo.h" |
161 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EThumbPixHeight, 0 ); |
160 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EThumbPixHeight, 0 ); |
162 |
161 |
163 TUint32 width(0); |
162 TUint32 width(0); |
164 TUint32 height(0); |
163 TUint32 height(0); |
165 TInt err = KErrNone; |
164 TInt err = KErrNone; |
166 TRAP( err, iDpConfig.GetWrapperL().GetImageObjPropL( suid, width, height ) ); |
165 TRAP( err, iDpConfig.GetWrapperL().GetImageObjPropL( *object, width, height ) ); |
167 if( err != KErrNone ) |
166 if( err != KErrNone ) |
168 PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfoL TRAP iWrapper.GetImageObjPropL err = %d" ), err ); |
167 PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfoL TRAP iWrapper.GetImageObjPropL err = %d" ), err ); |
169 |
168 |
170 // Image Pix Width |
169 // Image Pix Width |
171 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImagePixWidth, width ); |
170 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::EImagePixWidth, width ); |
185 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::ESequenceNumber, 0 ); |
184 iObjectInfo->SetUint32L( CMTPTypeObjectInfo::ESequenceNumber, 0 ); |
186 // Filename |
185 // Filename |
187 TParsePtrC parse( suid ); |
186 TParsePtrC parse( suid ); |
188 iObjectInfo->SetStringL( CMTPTypeObjectInfo::EFilename, parse.NameAndExt() ); |
187 iObjectInfo->SetStringL( CMTPTypeObjectInfo::EFilename, parse.NameAndExt() ); |
189 |
188 |
190 TTime dataModified; |
|
191 dataModified = MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid ); |
|
192 |
|
193 TBuf<KMtpMaxDateTimeStringLength> date; |
189 TBuf<KMtpMaxDateTimeStringLength> date; |
194 dataModified.FormatL( date, KMtpDateTimeFormat ); |
190 MmMtpDpUtility::GetObjectDateModifiedL( iFramework.Fs(), suid, date ); |
|
191 |
195 PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfo date is %S" ), &date ); |
192 PRINT1( _L( "MM MTP <> CGetObjectInfo::BuildObjectInfo date is %S" ), &date ); |
196 |
193 |
197 // Date Created |
194 // Date Created |
198 iObjectInfo->SetStringL( CMTPTypeObjectInfo::EDateCreated, date ); |
195 iObjectInfo->SetStringL( CMTPTypeObjectInfo::EDateCreated, date ); |
199 // Date Modified |
196 // Date Modified |