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 * |
|
52 * if mFailInit is true returns -1 |
|
53 * if mFailInit is false returns 0 |
|
54 * |
|
55 * @return int |
|
56 */ |
|
57 int initialize(); |
|
58 |
|
59 /** |
|
60 * |
|
61 * if mFailStartOpen is true returns -1 |
|
62 * if mFailStartOpen is false returns 0 |
|
63 * |
|
64 * @return int |
|
65 */ |
|
66 int startOpenCollection(int level); |
|
67 |
|
68 /** |
|
69 * |
|
70 * if mFailMediaPlayback is true returns -1 |
|
71 * if mFailMediaPlayback is false returns 0 |
|
72 * |
|
73 * @return int |
|
74 */ |
|
75 int openItem(int mpxId1); |
|
76 |
|
77 /** |
|
78 * |
|
79 * if mFailMediaDetails is true returns -1 |
|
80 * if mFailMediaDetails is false returns 0 |
|
81 * |
|
82 * @return int |
|
83 */ |
|
84 int getVideoDetails(int mpxId1); |
|
85 |
|
86 /** |
|
87 * @return mNewAlbumId |
|
88 */ |
|
89 TMPXItemId addNewAlbum(QString name); |
|
90 |
|
91 /** |
|
92 * no funtionality needed here for unit tests |
|
93 */ |
|
94 int addItemsInAlbum(TMPXItemId albumId, QList<TMPXItemId> items); |
|
95 |
|
96 /** |
|
97 * no funtionality needed here for unit tests |
|
98 */ |
|
99 int removeAlbums(const QList<TMPXItemId> &items); |
|
100 |
|
101 /** |
|
102 * saves contant id (1,2) into provided id |
|
103 */ |
|
104 void getCategoryId(TMPXItemId &id); |
|
105 |
|
106 /** |
|
107 * calls collection to go back to collection level |
|
108 * |
|
109 */ |
|
110 int back(); |
|
111 |
|
112 /** |
|
113 * returns mRenameItemReturnValue |
|
114 */ |
|
115 int renameItem(const TMPXItemId &itemId, const QString &newTitle); |
|
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; |
|
124 static TMPXItemId mNewAlbumId; |
|
125 static TVcxMyVideosSortingOrder mSettedSortOrder; |
|
126 static int mSortOrderSetCount; |
|
127 static QString mAddNewCollectionName; |
|
128 static QString mAddNewCollectionThumb; |
|
129 static QList<TMPXItemId> mAddNewCollectionIds; |
|
130 static int mRenameItemReturnValue; |
|
131 static int mBackReturnValue; |
|
132 |
|
133 private: |
|
134 |
|
135 /** |
|
136 * static instance from this class |
|
137 */ |
|
138 static VideoCollectionClient *testInstance; |
|
139 }; |
|
140 |
|
141 #endif // __VIDEOCOLLECTIONCLIENT_H |
|