mpdata/tsrc/unittest_mpcollectiondatamodel/stub/src/mpcollectionalbumartmanager.cpp
changeset 22 ecf06a08d4d9
child 29 8192e5b5c935
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mpdata/tsrc/unittest_mpcollectiondatamodel/stub/src/mpcollectionalbumartmanager.cpp	Mon May 03 12:29:20 2010 +0300
@@ -0,0 +1,88 @@
+
+
+
+/*
+* 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: Music Player collection album art manager.
+*
+*/
+
+#include "stub/inc/mpcollectionalbumartmanager.h"
+
+int gAlbumInitCounter = 0;
+
+/*!
+ Returns gAlbumInitCounter.
+ gAlbumInitCounter counts the number of constructor/destructor calls.
+ */
+int MpCollectionAlbumArtManager::getInitCounter()
+{
+    return gAlbumInitCounter;
+}
+
+/*!
+ Resets gAlbumInitCounter to zero.
+ */
+void MpCollectionAlbumArtManager::resetInitCounter()
+{
+    gAlbumInitCounter = 0;
+}
+
+/*!
+ Stub function.
+ */
+MpCollectionAlbumArtManager::MpCollectionAlbumArtManager( MpMpxCollectionData *data, QObject *parent )
+    : QObject(parent),
+      mIcon(0),
+      mAlbumArtCount(0),
+      mCacheAlbumArtCount(0)
+{
+    Q_UNUSED(data);
+    gAlbumInitCounter++;
+    mIcon = new QIcon(":/testicons/default_album.png");
+}
+
+/*!
+ Stub function.
+ */
+MpCollectionAlbumArtManager::~MpCollectionAlbumArtManager()
+{
+    gAlbumInitCounter--;
+    delete mIcon;
+}
+
+/*!
+ Stub function.
+ */
+const QIcon* MpCollectionAlbumArtManager::albumArt( int index )
+{
+    Q_UNUSED(index);
+    mAlbumArtCount++;
+    return mIcon;
+}
+
+/*!
+ Stub function.
+ */
+void MpCollectionAlbumArtManager::cacheFirstScreen()
+{
+    mCacheAlbumArtCount++;
+}
+
+/*!
+ Stub function.
+ */
+void MpCollectionAlbumArtManager::cancel()
+{
+}