videocollection/videocollectionwrapper/src/videodatacontainer.cpp
changeset 36 8aed59de29f9
parent 34 bbb98528c666
child 28 c48470be1ba7
--- a/videocollection/videocollectionwrapper/src/videodatacontainer.cpp	Thu Apr 01 23:32:44 2010 +0300
+++ b/videocollection/videocollectionwrapper/src/videodatacontainer.cpp	Fri Apr 16 18:13:14 2010 +0300
@@ -11,14 +11,19 @@
 *
 * Contributors:
 *
-* Description:   VideoListData class declaration*
+* Description:   VideoDataContainer class declaration*
 */
 
+// Version : %version: %
+
+// INCLUDE FILES
 #include <mpxmediageneraldefs.h>
 #include <mpxmedia.h>
 #include <vcxmyvideosdefs.h>
+
 #include "videodatacontainer.h"
 #include "videocollectionutils.h"
+#include "videocollectiontrace.h"
 
 /**
  * global qHash function required fo creating hash values for TMPXItemId -keys
@@ -30,14 +35,13 @@
     return qHash(keyPair);
 }
 
-
 // -----------------------------------------------------------------------------
 // VideoDataContainer
 // -----------------------------------------------------------------------------
 //
 VideoDataContainer::VideoDataContainer()
 {
-    // NOP
+	FUNC_LOG;
 }
     
 // -----------------------------------------------------------------------------
@@ -46,6 +50,7 @@
 //
 VideoDataContainer::~VideoDataContainer()
 {
+	FUNC_LOG;
     clear();
     clearRemoved();
 }
@@ -56,6 +61,7 @@
 //
 void VideoDataContainer::clear()
 {
+	FUNC_LOG;
     QHash<TMPXItemId, QPair<int, CMPXMedia*> >::iterator i = mMediaData.begin();
     while(i != mMediaData.end())
     {
@@ -101,6 +107,7 @@
         // could not get id or id does not match ==> NOP
         return;       
     }
+    
     QHash<TMPXItemId, QPair<int, CMPXMedia*> >::iterator iter = mMediaData.find(mediaId);
     // if item is in the removal list, not allowed to append
     if(mRemovedMedia.contains(mediaId))
@@ -131,7 +138,6 @@
     }
     return 0;  
 }
-   
  
 // -----------------------------------------------------------------------------
 // indexOfId
@@ -144,7 +150,6 @@
     {
         return iter->first;
     }
-    
     return -1;
 }
 
@@ -225,6 +230,7 @@
 //
 int VideoDataContainer::clearRemoved(QList<TMPXItemId> *itemIds)
 {
+	FUNC_LOG;
     int count = 0;
     QList<TMPXItemId> ids;
 
@@ -259,6 +265,7 @@
 //
 int VideoDataContainer::restoreRemovedItems(QList<TMPXItemId> *itemIds)
 {  
+	FUNC_LOG;
     
     int count = 0;
     QList<TMPXItemId> ids;
@@ -282,7 +289,7 @@
         {
             // append data to actual containers and remove item from deleted hash
             mMediaIds.append(iter.key());
-            mMediaData[iter.key()] = qMakePair(mMediaIds.count() - 1, iter.value());              
+            mMediaData[iter.key()] = qMakePair(mMediaIds.count() - 1, iter.value());
             mRemovedMedia.remove((*idIter));
             count++;    
         }
@@ -303,7 +310,7 @@
     {
         return itemIter.value();
     }
-   return 0;
+    return 0;
 }
 
 // end of file