videocollection/tsrc/stubs/src/videothumbnaildata.cpp
author hgs
Fri, 03 Sep 2010 12:37:43 +0300
changeset 58 d2b028fd1f7d
parent 55 4bfa887905cf
permissions -rw-r--r--
201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description: VideoThumbnailData class implementation
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
// INCLUDE FILES
hgs
parents:
diff changeset
    19
#include "videothumbnaildata.h"
hgs
parents:
diff changeset
    20
#include "videothumbnailtestdata.h"
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
int VideoThumbnailTestData::mInstanceCallCount = 0;
hgs
parents:
diff changeset
    23
int VideoThumbnailTestData::mFreeThumbnailDataCallCount = 0;
50
hgs
parents: 44
diff changeset
    24
bool VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled = false;
34
hgs
parents:
diff changeset
    25
int VideoThumbnailTestData::mStartBackgroundFetchingCallCount = 0;
44
hgs
parents: 34
diff changeset
    26
int VideoThumbnailTestData::mFetchIndex = -1;
34
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
VideoThumbnailData &VideoThumbnailData::instance()
hgs
parents:
diff changeset
    29
{
hgs
parents:
diff changeset
    30
    VideoThumbnailTestData::mInstanceCallCount++;
hgs
parents:
diff changeset
    31
    static VideoThumbnailData _thumbnailData;
hgs
parents:
diff changeset
    32
    return _thumbnailData;
hgs
parents:
diff changeset
    33
}
hgs
parents:
diff changeset
    34
hgs
parents:
diff changeset
    35
VideoThumbnailData::VideoThumbnailData()
hgs
parents:
diff changeset
    36
{
hgs
parents:
diff changeset
    37
    // not stubbed
hgs
parents:
diff changeset
    38
}
hgs
parents:
diff changeset
    39
hgs
parents:
diff changeset
    40
VideoThumbnailData::~VideoThumbnailData()
hgs
parents:
diff changeset
    41
{
hgs
parents:
diff changeset
    42
    // not stubbed
hgs
parents:
diff changeset
    43
}
hgs
parents:
diff changeset
    44
55
hgs
parents: 50
diff changeset
    45
bool VideoThumbnailData::removeThumbnail(const TMPXItemId &mediaId)
34
hgs
parents:
diff changeset
    46
{
hgs
parents:
diff changeset
    47
    Q_UNUSED(mediaId);
hgs
parents:
diff changeset
    48
    
hgs
parents:
diff changeset
    49
    // not stubbed
hgs
parents:
diff changeset
    50
    
hgs
parents:
diff changeset
    51
    return true;
hgs
parents:
diff changeset
    52
}
hgs
parents:
diff changeset
    53
55
hgs
parents: 50
diff changeset
    54
const QIcon* VideoThumbnailData::getThumbnail(const TMPXItemId &mediaId)
34
hgs
parents:
diff changeset
    55
{
hgs
parents:
diff changeset
    56
    Q_UNUSED(mediaId);
hgs
parents:
diff changeset
    57
    
hgs
parents:
diff changeset
    58
    // not stubbed
hgs
parents:
diff changeset
    59
    
hgs
parents:
diff changeset
    60
    return 0;
hgs
parents:
diff changeset
    61
}
hgs
parents:
diff changeset
    62
58
hgs
parents: 55
diff changeset
    63
void VideoThumbnailData::startBackgroundFetching(VideoProxyModelGeneric *model, int fetchIndex)
34
hgs
parents:
diff changeset
    64
{
hgs
parents:
diff changeset
    65
    Q_UNUSED(model);
hgs
parents:
diff changeset
    66
    VideoThumbnailTestData::mStartBackgroundFetchingCallCount++;
44
hgs
parents: 34
diff changeset
    67
    VideoThumbnailTestData::mFetchIndex = fetchIndex;
34
hgs
parents:
diff changeset
    68
}
hgs
parents:
diff changeset
    69
hgs
parents:
diff changeset
    70
void VideoThumbnailData::enableBackgroundFetching(bool enable)
hgs
parents:
diff changeset
    71
{
hgs
parents:
diff changeset
    72
    VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled = enable;
hgs
parents:
diff changeset
    73
}
hgs
parents:
diff changeset
    74
50
hgs
parents: 44
diff changeset
    75
bool VideoThumbnailData::backgroundFetchingEnabled()
hgs
parents: 44
diff changeset
    76
{
hgs
parents: 44
diff changeset
    77
    return VideoThumbnailTestData::mBackgroundThumbnailFetchingEnabled;
hgs
parents: 44
diff changeset
    78
}
hgs
parents: 44
diff changeset
    79
34
hgs
parents:
diff changeset
    80
void VideoThumbnailData::enableThumbnailCreation(bool enable)
hgs
parents:
diff changeset
    81
{
hgs
parents:
diff changeset
    82
    Q_UNUSED(enable);
hgs
parents:
diff changeset
    83
    // not stubbed
hgs
parents:
diff changeset
    84
}
hgs
parents:
diff changeset
    85
hgs
parents:
diff changeset
    86
void VideoThumbnailData::freeThumbnailData()
hgs
parents:
diff changeset
    87
{
hgs
parents:
diff changeset
    88
    VideoThumbnailTestData::mFreeThumbnailDataCallCount++;
hgs
parents:
diff changeset
    89
}