videocollection/tsrc/stubs/src/videothumbnaildata.cpp
changeset 15 cf5481c2bc0b
child 44 518105d52e45
child 52 e3cecb93e76a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/videocollection/tsrc/stubs/src/videothumbnaildata.cpp	Fri Apr 16 14:59:52 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: VideoThumbnailData class implementation
+*
+*/
+
+// INCLUDE FILES
+#include "videothumbnaildata.h"
+#include "videothumbnailtestdata.h"
+
+int VideoThumbnailTestData::mInstanceCallCount = 0;
+int VideoThumbnailTestData::mFreeThumbnailDataCallCount = 0;
+int VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled = 0;
+int VideoThumbnailTestData::mStartBackgroundFetchingCallCount = 0;
+
+VideoThumbnailData &VideoThumbnailData::instance()
+{
+    VideoThumbnailTestData::mInstanceCallCount++;
+    static VideoThumbnailData _thumbnailData;
+    return _thumbnailData;
+}
+
+VideoThumbnailData::VideoThumbnailData()
+{
+    // not stubbed
+}
+
+VideoThumbnailData::~VideoThumbnailData()
+{
+    // not stubbed
+}
+
+bool VideoThumbnailData::removeThumbnail(TMPXItemId mediaId)
+{
+    Q_UNUSED(mediaId);
+    
+    // not stubbed
+    
+    return true;
+}
+
+const QIcon* VideoThumbnailData::getThumbnail(TMPXItemId mediaId)
+{
+    Q_UNUSED(mediaId);
+    
+    // not stubbed
+    
+    return 0;
+}
+
+void VideoThumbnailData::startBackgroundFetching(VideoSortFilterProxyModel *model, int fetchIndex)
+{
+    Q_UNUSED(model);
+    Q_UNUSED(fetchIndex);
+    
+    VideoThumbnailTestData::mStartBackgroundFetchingCallCount++;
+}
+
+void VideoThumbnailData::enableBackgroundFetching(bool enable)
+{
+    VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled = enable;
+}
+
+void VideoThumbnailData::enableThumbnailCreation(bool enable)
+{
+    Q_UNUSED(enable);
+    // not stubbed
+}
+
+void VideoThumbnailData::freeThumbnailData()
+{
+    VideoThumbnailTestData::mFreeThumbnailDataCallCount++;
+}