104 } |
104 } |
105 IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CVcxHgMyVideosVideoList::ReplaceVideoListL() - Exit" ); |
105 IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CVcxHgMyVideosVideoList::ReplaceVideoListL() - Exit" ); |
106 } |
106 } |
107 |
107 |
108 // ----------------------------------------------------------------------------- |
108 // ----------------------------------------------------------------------------- |
|
109 // |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 TBool CVcxHgMyVideosVideoList::HasSameItemsL( const CMPXMediaArray& aVideoList ) |
|
113 { |
|
114 TInt count( iVideoList.Count() ); |
|
115 if ( aVideoList.Count() != count || count == 0 ) |
|
116 { |
|
117 return EFalse; |
|
118 } |
|
119 |
|
120 TBool isSame( ETrue ); |
|
121 CMPXMedia* oldMedia = NULL; |
|
122 CMPXMedia* newMedia = NULL; |
|
123 for ( TInt i = 0; i < count; i++ ) |
|
124 { |
|
125 oldMedia = iVideoList[i]->Media(); |
|
126 newMedia = aVideoList[i]; |
|
127 if ( oldMedia && oldMedia->IsSupported( KMPXMediaGeneralId ) |
|
128 && newMedia && newMedia->IsSupported( KMPXMediaGeneralId ) ) |
|
129 { |
|
130 if ( oldMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) != |
|
131 newMedia->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ) ) |
|
132 { |
|
133 isSame = EFalse; |
|
134 break; |
|
135 } |
|
136 } |
|
137 } |
|
138 return isSame; |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
109 // CVcxHgMyVideosVideoList::VideoCount() |
142 // CVcxHgMyVideosVideoList::VideoCount() |
110 // ----------------------------------------------------------------------------- |
143 // ----------------------------------------------------------------------------- |
111 // |
144 // |
112 TInt CVcxHgMyVideosVideoList::VideoCount() |
145 TInt CVcxHgMyVideosVideoList::VideoCount() |
113 { |
146 { |
114 return iVideoList.Count(); |
147 return iVideoList.Count(); |
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CVcxHgMyVideosVideoList::VideoDownloadState() |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 TVcxMyVideosDownloadState CVcxHgMyVideosVideoList::VideoDownloadState( TInt aIndex ) |
|
122 { |
|
123 TVcxMyVideosDownloadState state( EVcxMyVideosDlStateNone ); |
|
124 |
|
125 if ( aIndex >= 0 && aIndex < iVideoList.Count() ) |
|
126 { |
|
127 state = iVideoList[aIndex]->DownloadState(); |
|
128 } |
|
129 return state; |
|
130 } |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // CVcxHgMyVideosVideoList::GetOngoingDownloads() |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 void CVcxHgMyVideosVideoList::GetOngoingDownloads( RArray<TInt>& aDownloads ) |
|
137 { |
|
138 TInt count( iVideoList.Count() ); |
|
139 for ( TInt i = 0; i < count; i++ ) |
|
140 { |
|
141 if ( iVideoList[i]->DownloadState() != EVcxMyVideosDlStateNone ) |
|
142 { |
|
143 aDownloads.Append( i ); |
|
144 } |
|
145 } |
|
146 } |
148 } |
147 |
149 |
148 // ----------------------------------------------------------------------------- |
150 // ----------------------------------------------------------------------------- |
149 // CVcxHgMyVideosVideoList::RemoveVideo() |
151 // CVcxHgMyVideosVideoList::RemoveVideo() |
150 // ----------------------------------------------------------------------------- |
152 // ----------------------------------------------------------------------------- |