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