498 properties = iDpConfig.GetAllSupportedProperties(); |
498 properties = iDpConfig.GetAllSupportedProperties(); |
499 else |
499 else |
500 properties = iDpConfig.GetSupportedPropertiesL( formatCode ); |
500 properties = iDpConfig.GetSupportedPropertiesL( formatCode ); |
501 |
501 |
502 const TInt count = properties->Count(); |
502 const TInt count = properties->Count(); |
503 |
|
504 TInt err = KErrNone; |
|
505 TBool successQuery = EFalse; |
|
506 for ( TInt i = 0; i < count; i++ ) |
503 for ( TInt i = 0; i < count; i++ ) |
507 { |
504 { |
508 // no need to do the trap anymore, this is being handle internally in Media DP's ServiceSpecificObjectPropertyL, |
505 ServiceOneObjectPropertyL( aHandle, (*properties)[i] ); |
509 // also, this base class should not know too much of different handling between different formats |
506 } |
510 err = ServiceOneObjectPropertyL( aHandle, (*properties)[i] ); |
507 return KErrNone; |
511 if ( err == KErrNone ) |
|
512 successQuery = ETrue; |
|
513 if ( err == KErrNotSupported || err == KErrNotFound ) // Skip |
|
514 err = KErrNone; |
|
515 if ( err != KErrNone ) |
|
516 break; |
|
517 } |
|
518 |
|
519 // In PC Suite combined mode, a file that was found at the beginning could be deleted by PC Suite protocol |
|
520 // Need to fail it here. |
|
521 if ( successQuery == EFalse ) |
|
522 err = KErrNotFound; |
|
523 |
|
524 PRINT1( _L( "MM MTP <= CGetObjectPropList::ServiceAllPropertiesL err = %d" ), err ); |
|
525 return err; |
|
526 } |
508 } |
527 |
509 |
528 // ----------------------------------------------------------------------------- |
510 // ----------------------------------------------------------------------------- |
529 // CGetObjectPropList::ServiceGroupPropertiesL |
511 // CGetObjectPropList::ServiceGroupPropertiesL |
530 // Get the grouped object properties for specific object |
512 // Get the grouped object properties for specific object |
624 break; |
606 break; |
625 |
607 |
626 // Filename |
608 // Filename |
627 case EMTPObjectPropCodeObjectFileName: |
609 case EMTPObjectPropCodeObjectFileName: |
628 { |
610 { |
629 #ifdef _DEBUG |
|
630 HBufC* log = iObject->DesC( CMTPObjectMetaData::ESuid ).Alloc(); |
|
631 PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL FileName = %S" ), log ); |
|
632 delete log; |
|
633 log = NULL; |
|
634 #endif // _DEBUG |
|
635 TParsePtrC parse( iObject->DesC( CMTPObjectMetaData::ESuid ) ); |
611 TParsePtrC parse( iObject->DesC( CMTPObjectMetaData::ESuid ) ); |
636 textData = CMTPTypeString::NewLC( parse.NameAndExt() ); // + textData |
612 PRINT1( _L( "MM MTP <> CGetObjectPropList::ServiceOneObjectPropertyL FileName = %S" ), &parse.FullName() ); |
637 iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode) ); |
613 iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode) ); |
638 iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, textData->StringChars() ); |
614 iPropertyElement->SetStringL( CMTPTypeObjectPropListElement::EValue, parse.NameAndExt() ); |
639 CleanupStack::PopAndDestroy( textData ); // - textData |
|
640 } |
615 } |
641 break; |
616 break; |
642 |
617 |
643 // Parent Object |
618 // Parent Object |
644 case EMTPObjectPropCodeParentObject: |
619 case EMTPObjectPropCodeParentObject: |
645 { |
620 { |
646 iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); |
621 iPropertyElement = &( iPropertyList->ReservePropElemL( aHandle, aPropCode ) ); |
647 iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, iObject->Uint( CMTPObjectMetaData::EParentHandle ) ); |
622 TUint32 parentHandle = iObject->Uint( CMTPObjectMetaData::EParentHandle ); |
|
623 // refer to 5.3.1.9 of MTP Spec 1.0 |
|
624 if ( parentHandle == KMTPHandleNoParent ) |
|
625 { |
|
626 parentHandle = KMTPHandleNone; |
|
627 } |
|
628 iPropertyElement->SetUint32L( CMTPTypeObjectPropListElement::EValue, parentHandle ); |
648 } |
629 } |
649 break; |
630 break; |
650 |
631 |
651 // PUID |
632 // PUID |
652 case EMTPObjectPropCodePersistentUniqueObjectIdentifier: |
633 case EMTPObjectPropCodePersistentUniqueObjectIdentifier: |