74 iAbstractMediaEnumerator( NULL ), |
74 iAbstractMediaEnumerator( NULL ), |
75 iPendingEnumerations ( KAbstractMediaMtpDpArrayGranularity ), |
75 iPendingEnumerations ( KAbstractMediaMtpDpArrayGranularity ), |
76 iActiveProcessor( -1 ), |
76 iActiveProcessor( -1 ), |
77 iRenameObject( NULL ), |
77 iRenameObject( NULL ), |
78 iSupportedFormat( KAbstractMediaMtpDpArrayGranularity ), |
78 iSupportedFormat( KAbstractMediaMtpDpArrayGranularity ), |
79 iSupportedProperties( KAbstractMediaMtpDpArrayGranularity ) |
79 #ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT |
|
80 iSupportedPropAbstractAlbum( KAbstractMediaMtpDpArrayGranularity ), |
|
81 #endif |
|
82 iSupportedPropPlaylist( KAbstractMediaMtpDpArrayGranularity ), |
|
83 iSupportedPropAll( KAbstractMediaMtpDpArrayGranularity ) |
80 { |
84 { |
81 // Do nothing |
85 // Do nothing |
82 } |
86 } |
83 |
87 |
84 // ----------------------------------------------------------------------------- |
88 // ----------------------------------------------------------------------------- |
127 { |
135 { |
128 PRINT( _L( "MM MTP => CAbstractMediaMtpDataProvider::ConstructL" ) ); |
136 PRINT( _L( "MM MTP => CAbstractMediaMtpDataProvider::ConstructL" ) ); |
129 |
137 |
130 iAbstractMediaEnumerator = CAbstractMediaMtpDataProviderEnumerator::NewL( Framework(), *this ); |
138 iAbstractMediaEnumerator = CAbstractMediaMtpDataProviderEnumerator::NewL( Framework(), *this ); |
131 |
139 |
132 CMmMtpDpAccessSingleton::CreateL( Framework().Fs(), Framework() ); |
140 CMmMtpDpAccessSingleton::CreateL( Framework() ); |
133 |
141 |
134 GetSupportedFormatL(); |
142 GetSupportedFormatL(); |
135 GetSupportedPropertiesL(); |
143 GetSupportedPropertiesL(); |
|
144 GetAllSupportedPropL(); |
136 |
145 |
137 iPropSettingUtility = CAbstractMediaMtpDataProviderPropertySettingUtility::NewL(); |
146 iPropSettingUtility = CAbstractMediaMtpDataProviderPropertySettingUtility::NewL(); |
138 iDescriptionUtility = CAbstractMediaMtpDataProviderDescriptionUtility::NewL(); |
147 iDescriptionUtility = CAbstractMediaMtpDataProviderDescriptionUtility::NewL(); |
139 |
148 |
140 PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProvider::ConstructL" ) ); |
149 PRINT( _L( "MM MTP <= CAbstractMediaMtpDataProvider::ConstructL" ) ); |
525 { |
536 { |
526 InsertL( iSupportedFormat, KAbstractMediaMtpDataProviderSupportedFormats[i] ); |
537 InsertL( iSupportedFormat, KAbstractMediaMtpDataProviderSupportedFormats[i] ); |
527 } |
538 } |
528 } |
539 } |
529 |
540 |
530 const RArray<TUint>* CAbstractMediaMtpDataProvider::GetSupportedPropertiesL( TUint32 /*aFormatCode*/ ) const |
541 const RArray<TUint>* CAbstractMediaMtpDataProvider::GetSupportedPropertiesL( TUint32 aFormatCode ) const |
531 { |
542 { |
532 // May need add more implementation here for further extension. |
543 if ( ( aFormatCode == EMTPFormatCodeM3UPlaylist ) || ( aFormatCode == EMTPFormatCodeAbstractAudioVideoPlaylist ) ) |
533 return &iSupportedProperties; |
544 { |
|
545 return &iSupportedPropPlaylist; |
|
546 } |
|
547 #ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT |
|
548 else if ( aFormatCode == EMTPFormatCodeAbstractAudioAlbum ) |
|
549 { |
|
550 return &iSupportedPropAbstractAlbum; |
|
551 } |
|
552 #endif |
|
553 else |
|
554 { |
|
555 User::Leave( KErrNotSupported ); |
|
556 } |
|
557 // should never run to this line, just for avoiding warning. |
|
558 return NULL; |
534 } |
559 } |
535 |
560 |
536 // --------------------------------------------------------------------------- |
561 // --------------------------------------------------------------------------- |
537 // CAbstractMediaMtpDataProvider::GetSupportedPropertiesL |
562 // CAbstractMediaMtpDataProvider::GetSupportedPropertiesL |
538 // |
563 // |
539 // --------------------------------------------------------------------------- |
564 // --------------------------------------------------------------------------- |
540 // |
565 // |
541 void CAbstractMediaMtpDataProvider::GetSupportedPropertiesL() |
566 void CAbstractMediaMtpDataProvider::GetSupportedPropertiesL() |
542 { |
567 { |
543 iSupportedProperties.Reset(); |
568 #ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT |
|
569 iSupportedPropAbstractAlbum.Reset(); |
|
570 #endif |
|
571 iSupportedPropPlaylist.Reset(); |
544 |
572 |
545 TInt count = 0, i = 0; |
573 TInt count = 0, i = 0; |
546 count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 ); |
574 count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 ); |
547 for ( i = 0; i < count; i++ ) |
575 for ( i = 0; i < count; i++ ) |
548 { |
576 { |
549 InsertL( iSupportedProperties, KMmMtpDpSupportedPropMandatoryAll[i] ); |
577 #ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT |
|
578 InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropMandatoryAll[i] ); |
|
579 #endif |
|
580 InsertL( iSupportedPropPlaylist, KMmMtpDpSupportedPropMandatoryAll[i] ); |
550 } |
581 } |
551 |
582 |
552 count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 ); |
583 count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 ); |
553 for ( i = 0; i < count; i++ ) |
584 for ( i = 0; i < count; i++ ) |
554 { |
585 { |
555 InsertL( iSupportedProperties, KMmMtpDpSupportedPropAdditionalAll[i] ); |
586 #ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT |
556 } |
587 InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropAdditionalAll[i] ); |
|
588 #endif |
|
589 InsertL( iSupportedPropPlaylist, KMmMtpDpSupportedPropAdditionalAll[i] ); |
|
590 } |
|
591 |
|
592 #ifdef MMMTPDP_ABSTRACTAUDIOALBUM_SUPPORT |
|
593 count = sizeof( KMmMtpDpSupportedPropMandatoryALB ) / sizeof( TUint16 ); |
|
594 for ( i = 0; i < count; i++ ) |
|
595 { |
|
596 InsertL( iSupportedPropAbstractAlbum, KMmMtpDpSupportedPropMandatoryALB[i] ); |
|
597 } |
|
598 #endif |
557 } |
599 } |
558 |
600 |
559 // --------------------------------------------------------------------------- |
601 // --------------------------------------------------------------------------- |
560 // CAbstractMediaMtpDataProvider::GetAllSupportedProperties |
602 // CAbstractMediaMtpDataProvider::GetAllSupportedProperties |
561 // |
603 // |
562 // --------------------------------------------------------------------------- |
604 // --------------------------------------------------------------------------- |
563 // |
605 // |
564 const RArray<TUint>* CAbstractMediaMtpDataProvider::GetAllSupportedProperties() const |
606 const RArray<TUint>* CAbstractMediaMtpDataProvider::GetAllSupportedProperties() const |
565 { |
607 { |
566 return &iSupportedProperties; |
608 return &iSupportedPropAll; |
|
609 } |
|
610 |
|
611 void CAbstractMediaMtpDataProvider::GetAllSupportedPropL() |
|
612 { |
|
613 iSupportedPropAll.Reset(); |
|
614 |
|
615 TInt count = 0, i = 0; |
|
616 count = sizeof( KMmMtpDpSupportedPropMandatoryAll ) / sizeof( TUint16 ); |
|
617 for ( i = 0; i < count; i++ ) |
|
618 { |
|
619 InsertL( iSupportedPropAll, KMmMtpDpSupportedPropMandatoryAll[i] ); |
|
620 } |
|
621 |
|
622 count = sizeof( KMmMtpDpSupportedPropAdditionalAll ) / sizeof( TUint16 ); |
|
623 for ( i = 0; i < count; i++ ) |
|
624 { |
|
625 InsertL( iSupportedPropAll, KMmMtpDpSupportedPropAdditionalAll[i] ); |
|
626 } |
|
627 |
|
628 count = sizeof( KMmMtpDpSupportedPropMandatoryALB ) / sizeof( TUint16 ); |
|
629 for ( i = 0; i < count; i++ ) |
|
630 { |
|
631 InsertL( iSupportedPropAll, KMmMtpDpSupportedPropMandatoryALB[i] ); |
|
632 } |
567 } |
633 } |
568 |
634 |
569 // --------------------------------------------------------------------------- |
635 // --------------------------------------------------------------------------- |
570 // CMediaMtpDataProvider::GetDefaultStorageIdL |
636 // CMediaMtpDataProvider::GetDefaultStorageIdL |
571 // |
637 // |