30
|
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 videocollectionclient class for videocollectionsortfilterproxy unit tests
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef __VIDEOCOLLECTIONCLIENT_H
|
|
20 |
#define __VIDEOCOLLECTIONCLIENT_H
|
|
21 |
|
|
22 |
//#include <mpxmedia.h>
|
|
23 |
#include <vcxmyvideosdefs.h>
|
|
24 |
#include <qstring.h>
|
|
25 |
#include <qlist.h>
|
|
26 |
|
|
27 |
// FORWARD DECLARATIONS
|
|
28 |
class VideoCollectionUtils;
|
|
29 |
|
|
30 |
|
|
31 |
class VideoCollectionClient
|
|
32 |
{
|
|
33 |
|
|
34 |
public: // Constructors and destructor
|
|
35 |
|
|
36 |
/**
|
|
37 |
* constructor
|
|
38 |
*
|
|
39 |
*/
|
|
40 |
VideoCollectionClient();
|
|
41 |
|
|
42 |
/**
|
|
43 |
* destructor
|
|
44 |
*
|
|
45 |
*/
|
|
46 |
virtual ~VideoCollectionClient();
|
|
47 |
|
|
48 |
public:
|
|
49 |
|
|
50 |
/**
|
|
51 |
*
|
34
|
52 |
* if mFailInit is true returns -1
|
|
53 |
* if mFailInit is false returns 0
|
30
|
54 |
*
|
|
55 |
* @return int
|
|
56 |
*/
|
|
57 |
int initialize();
|
|
58 |
|
|
59 |
/**
|
|
60 |
*
|
34
|
61 |
* if mFailStartOpen is true returns -1
|
|
62 |
* if mFailStartOpen is false returns 0
|
30
|
63 |
*
|
|
64 |
* @return int
|
|
65 |
*/
|
|
66 |
int startOpenCollection(int level);
|
|
67 |
|
|
68 |
/**
|
|
69 |
*
|
34
|
70 |
* if mFailMediaPlayback is true returns -1
|
|
71 |
* if mFailMediaPlayback is false returns 0
|
30
|
72 |
*
|
|
73 |
* @return int
|
|
74 |
*/
|
34
|
75 |
int openItem(int mpxId1);
|
|
76 |
|
30
|
77 |
/**
|
|
78 |
*
|
34
|
79 |
* if mFailMediaDetails is true returns -1
|
|
80 |
* if mFailMediaDetails is false returns 0
|
30
|
81 |
*
|
|
82 |
* @return int
|
|
83 |
*/
|
|
84 |
int getVideoDetails(int mpxId1);
|
|
85 |
|
|
86 |
/**
|
34
|
87 |
* @return mNewAlbumId
|
30
|
88 |
*/
|
34
|
89 |
TMPXItemId addNewAlbum(QString name);
|
|
90 |
|
30
|
91 |
/**
|
34
|
92 |
* no funtionality needed here for unit tests
|
30
|
93 |
*/
|
34
|
94 |
int addItemsInAlbum(TMPXItemId albumId, QList<TMPXItemId> items);
|
|
95 |
|
30
|
96 |
/**
|
34
|
97 |
* no funtionality needed here for unit tests
|
30
|
98 |
*/
|
34
|
99 |
int removeAlbums(const QList<TMPXItemId> &items);
|
|
100 |
|
30
|
101 |
/**
|
34
|
102 |
* saves contant id (1,2) into provided id
|
30
|
103 |
*/
|
34
|
104 |
void getCategoryId(TMPXItemId &id);
|
30
|
105 |
|
|
106 |
/**
|
|
107 |
* calls collection to go back to collection level
|
|
108 |
*
|
|
109 |
*/
|
|
110 |
int back();
|
36
|
111 |
|
|
112 |
/**
|
|
113 |
* returns mRenameAlbumReturnValue
|
|
114 |
*/
|
|
115 |
int renameAlbum(const TMPXItemId &albumId, const QString &newTitle);
|
30
|
116 |
|
|
117 |
public:
|
|
118 |
static bool mFailInit;
|
|
119 |
static bool mFailStartOpen;
|
|
120 |
static bool mFailMediaPlayback;
|
|
121 |
static bool mFailMediaDetails;
|
|
122 |
static bool mFailSetSort;
|
|
123 |
static bool mFailAddNewCollection;
|
34
|
124 |
static TMPXItemId mNewAlbumId;
|
30
|
125 |
static TVcxMyVideosSortingOrder mSettedSortOrder;
|
|
126 |
static int mSortOrderSetCount;
|
|
127 |
static QString mAddNewCollectionName;
|
|
128 |
static QString mAddNewCollectionThumb;
|
|
129 |
static QList<TMPXItemId> mAddNewCollectionIds;
|
36
|
130 |
static int mRenameAlbumReturnValue;
|
|
131 |
static int mBackReturnValue;
|
30
|
132 |
|
|
133 |
private:
|
|
134 |
|
|
135 |
/**
|
|
136 |
* static instance from this class
|
|
137 |
*/
|
|
138 |
static VideoCollectionClient *testInstance;
|
|
139 |
};
|
|
140 |
|
|
141 |
#endif // __VIDEOCOLLECTIONCLIENT_H
|