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: stub collection client for testing VideoCollectionListener
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "stub/inc/videocollectionclient.h"
|
|
19 |
|
36
|
20 |
bool VideoCollectionClient::mSetOpenStatusStartOpening = false;
|
34
|
21 |
int VideoCollectionClient::mStartOpenCurrentStateCallCount = 0;
|
|
22 |
|
|
23 |
// -----------------------------------------------------------------------------
|
|
24 |
// VideoCollectionClient
|
|
25 |
// -----------------------------------------------------------------------------
|
|
26 |
//
|
|
27 |
VideoCollectionClient::VideoCollectionClient():
|
|
28 |
mLevel(0),
|
|
29 |
mOpenStatus(-1),
|
|
30 |
mLatestItemId(0),
|
|
31 |
mOpenItemCallCount(0)
|
|
32 |
{
|
|
33 |
|
|
34 |
}
|
|
35 |
|
|
36 |
// -----------------------------------------------------------------------------
|
|
37 |
// ~VideoCollectionClient
|
|
38 |
// -----------------------------------------------------------------------------
|
|
39 |
//
|
|
40 |
VideoCollectionClient::~VideoCollectionClient()
|
|
41 |
{
|
|
42 |
|
|
43 |
}
|
|
44 |
|
|
45 |
// -----------------------------------------------------------------------------
|
|
46 |
// setCollectionLevel
|
|
47 |
// -----------------------------------------------------------------------------
|
|
48 |
//
|
|
49 |
void VideoCollectionClient::setCollectionLevel(int level)
|
|
50 |
{
|
|
51 |
mLevel = level;
|
|
52 |
}
|
|
53 |
|
|
54 |
// -----------------------------------------------------------------------------
|
|
55 |
// getCategoryIds
|
|
56 |
// -----------------------------------------------------------------------------
|
|
57 |
//
|
|
58 |
void VideoCollectionClient::getCategoryId(TMPXItemId &id)
|
|
59 |
{
|
|
60 |
id = mLatestItemId;
|
|
61 |
}
|
|
62 |
|
|
63 |
// -----------------------------------------------------------------------------
|
|
64 |
// getCollectionLevel
|
|
65 |
// -----------------------------------------------------------------------------
|
|
66 |
//
|
|
67 |
int VideoCollectionClient::getCollectionLevel()
|
|
68 |
{
|
|
69 |
return mLevel;
|
|
70 |
}
|
|
71 |
|
|
72 |
// -----------------------------------------------------------------------------
|
|
73 |
// getOpenStatus
|
|
74 |
// -----------------------------------------------------------------------------
|
|
75 |
//
|
|
76 |
int VideoCollectionClient::getOpenStatus()
|
|
77 |
{
|
|
78 |
return mOpenStatus;
|
|
79 |
}
|
|
80 |
|
|
81 |
// -----------------------------------------------------------------------------
|
|
82 |
// setOpenStatus
|
|
83 |
// -----------------------------------------------------------------------------
|
|
84 |
//
|
36
|
85 |
void VideoCollectionClient::setOpenStatus(int status, bool startOpening)
|
34
|
86 |
{
|
36
|
87 |
mSetOpenStatusStartOpening = startOpening;
|
34
|
88 |
mOpenStatus = status;
|
|
89 |
}
|
|
90 |
|
|
91 |
// -----------------------------------------------------------------------------
|
|
92 |
// fetchMpxMediaByMpxId
|
|
93 |
// -----------------------------------------------------------------------------
|
|
94 |
//
|
|
95 |
void VideoCollectionClient::fetchMpxMediaByMpxId(TMPXItemId &eventData)
|
|
96 |
{
|
|
97 |
mLatestItemId = eventData;
|
|
98 |
}
|
|
99 |
|
|
100 |
// -----------------------------------------------------------------------------
|
|
101 |
// getLatestMPXId
|
|
102 |
// -----------------------------------------------------------------------------
|
|
103 |
//
|
|
104 |
TMPXItemId VideoCollectionClient::getLatestMPXId()
|
|
105 |
{
|
|
106 |
return mLatestItemId;
|
|
107 |
}
|
|
108 |
|
|
109 |
// -----------------------------------------------------------------------------
|
|
110 |
// startOpenCurrentState
|
|
111 |
// -----------------------------------------------------------------------------
|
|
112 |
//
|
|
113 |
int VideoCollectionClient::startOpenCurrentState()
|
|
114 |
{
|
|
115 |
mStartOpenCurrentStateCallCount++;
|
|
116 |
return 0;
|
|
117 |
}
|
|
118 |
|
|
119 |
// -----------------------------------------------------------------------------
|
|
120 |
// openItem
|
|
121 |
// -----------------------------------------------------------------------------
|
|
122 |
//
|
|
123 |
void VideoCollectionClient::openItem(TMPXItemId id)
|
|
124 |
{
|
|
125 |
mOpenItemCallCount++;
|
|
126 |
mLatestItemId = id;
|
|
127 |
}
|
|
128 |
|