45 // CONSTANTS |
45 // CONSTANTS |
46 const TInt KVcxHgEventLevelRoot = 1; |
46 const TInt KVcxHgEventLevelRoot = 1; |
47 const TInt KVcxHgEventLevelCategory = 2; |
47 const TInt KVcxHgEventLevelCategory = 2; |
48 const TInt KVcxHgEventLevelVideo = 3; |
48 const TInt KVcxHgEventLevelVideo = 3; |
49 |
49 |
|
50 const TInt KVcxMpxLevelRoot = 1; |
50 const TInt KVcxMpxLevelCategories = 2; |
51 const TInt KVcxMpxLevelCategories = 2; |
51 const TInt KVcxMpxLevelVideos = 3; |
52 const TInt KVcxMpxLevelVideos = 3; |
52 |
53 |
53 const TUint32 KVcxHgMyVideosTransactionId = 5; |
54 const TUint32 KVcxHgMyVideosTransactionId = 5; |
54 |
55 |
218 iCollectionUtility->Collection().OpenL( aIndex ); |
219 iCollectionUtility->Collection().OpenL( aIndex ); |
219 iCollectionLevel = KErrNotFound; |
220 iCollectionLevel = KErrNotFound; |
220 } |
221 } |
221 else if ( iCollectionLevel == KVcxMpxLevelVideos ) |
222 else if ( iCollectionLevel == KVcxMpxLevelVideos ) |
222 { |
223 { |
223 // OpenL() will return a list if there has been any changes. |
224 TInt currentIndex = CategoryIndexL(); |
224 // No reply if list is same as with previous OpenL(). |
225 |
225 iCollectionUtility->Collection().OpenL(); |
226 if ( aIndex == currentIndex ) |
|
227 { |
|
228 // OpenL() will return a list if there has been any changes. |
|
229 // No reply if list is same as with previous OpenL(). |
|
230 iCollectionUtility->Collection().OpenL(); |
|
231 } |
|
232 else |
|
233 { |
|
234 iCollectionUtility->Collection().BackL( ); |
|
235 iCollectionUtility->Collection().OpenL( aIndex ); |
|
236 iCollectionLevel = KErrNotFound; |
|
237 } |
226 } |
238 } |
227 else |
239 else |
228 { |
240 { |
229 // NOP |
241 // NOP |
230 } |
242 } |
379 void CVcxHgMyVideosCollectionClient::PlayVideoL( TMPXItemId aMpxItemId ) |
391 void CVcxHgMyVideosCollectionClient::PlayVideoL( TMPXItemId aMpxItemId ) |
380 { |
392 { |
381 IPTVLOGSTRING2_LOW_LEVEL( |
393 IPTVLOGSTRING2_LOW_LEVEL( |
382 "CVcxHgMyVideosCollectionClient::PlayVideoL: Play video at collection index %d", aMpxItemId.iId1 ); |
394 "CVcxHgMyVideosCollectionClient::PlayVideoL: Play video at collection index %d", aMpxItemId.iId1 ); |
383 |
395 |
384 CMPXCollectionPath* path = CMPXCollectionPath::NewL(); |
396 CMPXCollectionPath* collectionPath = iCollectionUtility->Collection().PathL(); |
385 CleanupStack::PushL(path); |
397 CleanupStack::PushL( collectionPath ); |
386 |
398 |
387 path->AppendL( KVcxUidMyVideosMpxCollection ); |
399 if ( collectionPath->Levels() == KVcxMpxLevelVideos ) |
388 path->AppendL( KVcxMvcCategoryIdAll ); |
400 { |
389 path->AppendL( aMpxItemId ); |
401 collectionPath->DeselectAll(); |
390 path->SelectL( aMpxItemId ); |
402 collectionPath->SelectL( aMpxItemId ); |
391 |
403 iCollectionUtility->Collection().OpenL( *collectionPath ); |
392 iCollectionUtility->Collection().OpenL( *path ); |
404 } |
393 CleanupStack::PopAndDestroy(path); |
405 else |
|
406 { |
|
407 CMPXCollectionPath* customPath = CMPXCollectionPath::NewL(); |
|
408 CleanupStack::PushL(customPath); |
|
409 |
|
410 customPath->AppendL( KVcxUidMyVideosMpxCollection ); |
|
411 customPath->AppendL( KVcxMvcCategoryIdAll ); |
|
412 customPath->AppendL( aMpxItemId ); |
|
413 customPath->SelectL( aMpxItemId ); |
|
414 |
|
415 iCollectionUtility->Collection().OpenL( *customPath ); |
|
416 CleanupStack::PopAndDestroy( customPath ); |
|
417 } |
|
418 |
|
419 CleanupStack::PopAndDestroy( collectionPath ); |
394 } |
420 } |
395 |
421 |
396 // ----------------------------------------------------------------------------- |
422 // ----------------------------------------------------------------------------- |
397 // CVcxHgMyVideosCollectionClient::FetchMpxMediaByMpxIdL() |
423 // CVcxHgMyVideosCollectionClient::FetchMpxMediaByMpxIdL() |
398 // ----------------------------------------------------------------------------- |
424 // ----------------------------------------------------------------------------- |
1138 { |
1164 { |
1139 iVideoModelObserver->VideoDetailsCompletedL( *media ); |
1165 iVideoModelObserver->VideoDetailsCompletedL( *media ); |
1140 } |
1166 } |
1141 } |
1167 } |
1142 |
1168 |
|
1169 // ----------------------------------------------------------------------------- |
|
1170 // CVcxHgMyVideosCollectionClient::CategoryIndexL() |
|
1171 // ----------------------------------------------------------------------------- |
|
1172 // |
|
1173 TInt CVcxHgMyVideosCollectionClient::CategoryIndexL() |
|
1174 { |
|
1175 CMPXCollectionPath* path = iCollectionUtility->Collection().PathL(); |
|
1176 CleanupStack::PushL( path ); |
|
1177 TInt index ( -1 ); |
|
1178 if ( path->Levels() > KVcxMpxLevelCategories ) |
|
1179 { |
|
1180 index = path->Index( KVcxMpxLevelRoot ); |
|
1181 } |
|
1182 CleanupStack::PopAndDestroy( path ); |
|
1183 |
|
1184 return index; |
|
1185 } |
|
1186 |
1143 #if defined(_DEBUG) && IPTV_LOGGING_METHOD != 0 |
1187 #if defined(_DEBUG) && IPTV_LOGGING_METHOD != 0 |
1144 // ----------------------------------------------------------------------------- |
1188 // ----------------------------------------------------------------------------- |
1145 // CVcxHgMyVideosCollectionClient::DebugPrintVideoListL() |
1189 // CVcxHgMyVideosCollectionClient::DebugPrintVideoListL() |
1146 // ----------------------------------------------------------------------------- |
1190 // ----------------------------------------------------------------------------- |
1147 // |
1191 // |