videocollection/tsrc/stubs/src/videothumbnaildata.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 14:59:52 +0300
changeset 15 cf5481c2bc0b
child 44 518105d52e45
child 52 e3cecb93e76a
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* 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++;
}