videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp
changeset 35 3738fe97f027
parent 34 bbb98528c666
child 36 8aed59de29f9
--- a/videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp	Thu Apr 01 23:22:15 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp	Thu Apr 01 23:32:44 2010 +0300
@@ -64,6 +64,8 @@
  */
 bool VideoListDataModelPrivate::mFailInit = false;
 
+bool VideoListDataModelPrivate::mOverrideVideoCount = false;
+quint32 VideoListDataModelPrivate::mVideoCount = 0;
 
 bool VideoListDataModelPrivate::mOverrideSize = false;
 quint32 VideoListDataModelPrivate::mSize = 0;
@@ -75,6 +77,8 @@
 
 bool VideoListDataModelPrivate::mBelongsToAlbum = false;
 
+int VideoListDataModelPrivate::mRemoveFrAlbumReturn = -1;
+
 // -----------------------------------------------------------------------------
 // CVideoListData
 // -----------------------------------------------------------------------------
@@ -173,15 +177,35 @@
 }
 
 // -----------------------------------------------------------------------------
+// getVideoThumbnailFromIndex
+// -----------------------------------------------------------------------------
+//
+quint32 VideoListDataModelPrivate::getCategoryVideoCountFromIndex( int index ) const
+{
+    if(mOverrideVideoCount)
+    {
+        return mVideoCount;
+    }
+    
+    quint32 count(0);
+    CMPXMedia *media = getMediaFromIndex(index);
+    if( media && media->IsSupported( KVcxMediaMyVideosCategoryItemCount ) )
+         {
+         count = *media->Value<TUint32>( KVcxMediaMyVideosCategoryItemCount );
+         }
+    return count;
+}
+
+// -----------------------------------------------------------------------------
 // getVideoSizeFromIndex
 // -----------------------------------------------------------------------------
 //
 quint32 VideoListDataModelPrivate::getVideoSizeFromIndex( int index ) const
 {
-     if(mOverrideSize)
-     {
-         return mSize;
-     }
+    if(mOverrideSize)
+    {
+        return mSize;
+    }
     quint32 size(0);
     CMPXMedia *media = getMediaFromIndex(index);
     if(media && media->IsSupported( KMPXMediaGeneralSize ))
@@ -285,6 +309,16 @@
     mCurrentAlbum = albumId;
 }
   
+// -----------------------------------------------------------------------------
+// removeItemsFromAlbum
+// -----------------------------------------------------------------------------
+//
+int VideoListDataModelPrivate::removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &ids)
+{
+    Q_UNUSED(albumId);
+    Q_UNUSED(ids);    
+    return mRemoveFrAlbumReturn;
+}
 
 // -----------------------------------------------------------------------------
 // getVideoStatusFromIndex