equal
deleted
inserted
replaced
4076 MPX_DEBUG1("CMPXDbPlugin::DoIncrementalOpenL <--"); |
4076 MPX_DEBUG1("CMPXDbPlugin::DoIncrementalOpenL <--"); |
4077 |
4077 |
4078 TInt offset = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLOffset ); |
4078 TInt offset = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLOffset ); |
4079 TInt numItems = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLNumItems ); |
4079 TInt numItems = aCmd.ValueTObjectL<TInt>( KMPXCollectionCommandIdIncOpenLNumItems ); |
4080 |
4080 |
4081 TReadDirection direction(EReadUnknown); |
|
4082 /* Ascending and Decending reads are currently not used. We optimized for offset reads. |
|
4083 if( aCmd.IsSupported(KMPXCollectionCommandIdIncOpenLAscDsc) && |
|
4084 aCmd.IsSupported(KMPXCollectionCommandIdIncOpenLKeyItem) ) |
|
4085 { |
|
4086 direction = aCmd.ValueTObjectL<TReadDirection>(KMPXCollectionCommandIdIncOpenLAscDsc); |
|
4087 } |
|
4088 */ |
|
4089 CMPXCollectionPath* path = aCmd.ValueCObjectL<CMPXCollectionPath>(KMPXCollectionCommandIdIncOpenLPath); |
4081 CMPXCollectionPath* path = aCmd.ValueCObjectL<CMPXCollectionPath>(KMPXCollectionCommandIdIncOpenLPath); |
4090 CleanupStack::PushL( path ); |
4082 CleanupStack::PushL( path ); |
4091 MPX_DEBUG_PATH( *path ); |
4083 MPX_DEBUG_PATH( *path ); |
4092 |
4084 |
4093 // Switch on level and item selected |
4085 // Switch on level and item selected |
4118 EMPXMediaMusicArtist | EMPXMediaMusicAlbumArtFileName ) ); |
4110 EMPXMediaMusicArtist | EMPXMediaMusicAlbumArtFileName ) ); |
4119 |
4111 |
4120 // Array to read data from |
4112 // Array to read data from |
4121 CMPXMediaArray* array = CMPXMediaArray::NewL(); |
4113 CMPXMediaArray* array = CMPXMediaArray::NewL(); |
4122 CleanupStack::PushL( array ); |
4114 CleanupStack::PushL( array ); |
4123 |
4115 iDbHandler->GetSongsAtOffsetL( array, attrs.Array(), offset, numItems ); |
4124 // Do we have to use offset or can we use asc/dsc |
|
4125 // |
|
4126 if( direction == EReadUnknown ) |
|
4127 { |
|
4128 iDbHandler->GetSongsAtOffsetL( array, attrs.Array(), offset, numItems ); |
|
4129 } |
|
4130 else |
|
4131 { |
|
4132 iDbHandler->GetSongsInBlockL( array, attrs.Array(), |
|
4133 aCmd.ValueText( KMPXCollectionCommandIdIncOpenLKeyItem ), |
|
4134 numItems, |
|
4135 direction ); |
|
4136 } |
|
4137 |
|
4138 TInt max( path->Count() ); |
4116 TInt max( path->Count() ); |
4139 TInt count(0); |
4117 TInt count(0); |
4140 TInt aryCount( array->Count() ); |
4118 TInt aryCount( array->Count() ); |
4141 // Update the collection path |
4119 // Update the collection path |
4142 while( count<numItems && offset<max && |
4120 while( count<numItems && offset<max && |