34
|
1 |
|
|
2 |
/**
|
|
3 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
* All rights reserved.
|
|
5 |
* This component and the accompanying materials are made available
|
|
6 |
* under the terms of "Eclipse Public License v1.0"
|
|
7 |
* which accompanies this distribution, and is available
|
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
9 |
*
|
|
10 |
* Initial Contributors:
|
|
11 |
* Nokia Corporation - initial contribution.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description: stub collection client for testing VideoCollectionListener
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef __VIDEOCOLLECTIONCLIENT_H
|
|
20 |
#define __VIDEOCOLLECTIONCLIENT_H
|
|
21 |
|
|
22 |
#include <mpxcollectionmessagedefs.h>
|
|
23 |
#include <mpxitemid.h>
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
class VideoCollectionClient
|
|
28 |
{
|
|
29 |
public:
|
|
30 |
|
|
31 |
|
|
32 |
enum TCollectionOpenStatus
|
|
33 |
{
|
|
34 |
ECollectionInvalid,
|
|
35 |
ECollectionOpening,
|
|
36 |
ECollectionOpened
|
|
37 |
};
|
|
38 |
/**
|
|
39 |
* constructor
|
|
40 |
*/
|
|
41 |
VideoCollectionClient();
|
|
42 |
|
|
43 |
/**
|
|
44 |
* destructor
|
|
45 |
*/
|
|
46 |
virtual ~VideoCollectionClient();
|
|
47 |
|
|
48 |
/**
|
|
49 |
* sets mLevel
|
|
50 |
*/
|
|
51 |
void setCollectionLevel(int level);
|
|
52 |
|
|
53 |
/**
|
|
54 |
* return mLevel
|
|
55 |
*/
|
|
56 |
int getCollectionLevel();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* return mOpenStatus
|
|
60 |
*/
|
|
61 |
int getOpenStatus();
|
|
62 |
|
|
63 |
/**
|
|
64 |
* return id and type
|
|
65 |
*/
|
|
66 |
void getCategoryId(TMPXItemId &id);
|
|
67 |
|
|
68 |
|
|
69 |
/**
|
|
70 |
* sets mOpenStatus
|
|
71 |
*/
|
36
|
72 |
void setOpenStatus(int status, bool startOpening = true);
|
34
|
73 |
|
|
74 |
/**
|
|
75 |
* sets mLatestItemId
|
|
76 |
*/
|
|
77 |
void fetchMpxMediaByMpxId(TMPXItemId &eventData);
|
|
78 |
|
|
79 |
/**
|
|
80 |
* gets mLatestItemId
|
|
81 |
*/
|
|
82 |
TMPXItemId getLatestMPXId();
|
|
83 |
|
|
84 |
/**
|
|
85 |
* startOpenCurrentState
|
|
86 |
*/
|
|
87 |
int startOpenCurrentState();
|
|
88 |
|
|
89 |
/**
|
|
90 |
* sets mLatestItemId
|
|
91 |
*/
|
|
92 |
void openItem(TMPXItemId id);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* count of openItemcalls
|
|
96 |
*/
|
|
97 |
int mOpenItemCallCount;
|
|
98 |
|
|
99 |
private:
|
|
100 |
|
|
101 |
/**
|
|
102 |
* value returned from collectionLevel
|
|
103 |
*/
|
|
104 |
int mLevel;
|
|
105 |
|
|
106 |
/**
|
|
107 |
* value simulating open status
|
|
108 |
*/
|
|
109 |
int mOpenStatus;
|
|
110 |
|
|
111 |
/**
|
|
112 |
* value fecthed from fetchMpxMediaByMpxId or
|
|
113 |
* setted in openItem
|
|
114 |
*/
|
|
115 |
TMPXItemId mLatestItemId;
|
|
116 |
|
|
117 |
public:
|
|
118 |
static int mStartOpenCurrentStateCallCount;
|
36
|
119 |
|
|
120 |
static bool mSetOpenStatusStartOpening;
|
34
|
121 |
|
|
122 |
};
|
|
123 |
|
|
124 |
#endif
|
|
125 |
|
|
126 |
|