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