videocollection/tsrc/stubs/src/videothumbnaildata.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 20:28:16 +0300
changeset 59 a76e86df7ccd
parent 52 e3cecb93e76a
child 62 0e1e938beb1a
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* 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;
bool VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled = false;
int VideoThumbnailTestData::mStartBackgroundFetchingCallCount = 0;
int VideoThumbnailTestData::mFetchIndex = -1;

VideoThumbnailData &VideoThumbnailData::instance()
{
    VideoThumbnailTestData::mInstanceCallCount++;
    static VideoThumbnailData _thumbnailData;
    return _thumbnailData;
}

VideoThumbnailData::VideoThumbnailData()
{
    // not stubbed
}

VideoThumbnailData::~VideoThumbnailData()
{
    // not stubbed
}

bool VideoThumbnailData::removeThumbnail(const TMPXItemId &mediaId)
{
    Q_UNUSED(mediaId);
    
    // not stubbed
    
    return true;
}

const QIcon* VideoThumbnailData::getThumbnail(const TMPXItemId &mediaId)
{
    Q_UNUSED(mediaId);
    
    // not stubbed
    
    return 0;
}

void VideoThumbnailData::startBackgroundFetching(VideoSortFilterProxyModel *model, int fetchIndex)
{
    Q_UNUSED(model);
    VideoThumbnailTestData::mStartBackgroundFetchingCallCount++;
    VideoThumbnailTestData::mFetchIndex = fetchIndex;
}

void VideoThumbnailData::enableBackgroundFetching(bool enable)
{
    VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled = enable;
}

bool VideoThumbnailData::backgroundFetchingEnabled()
{
    return VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled;
}

void VideoThumbnailData::enableThumbnailCreation(bool enable)
{
    Q_UNUSED(enable);
    // not stubbed
}

void VideoThumbnailData::freeThumbnailData()
{
    VideoThumbnailTestData::mFreeThumbnailDataCallCount++;
}