|
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 mpxcollectionutiolity for testing CVideoCollectionClient |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MMPXCOLLECTIONUTILITY_H |
|
19 #define MMPXCOLLECTIONUTILITY_H |
|
20 |
|
21 #include <e32cmn.h> |
|
22 #include <mpxcollectionframeworkdefs.h> |
|
23 #include <mpxcommand.h> |
|
24 #include "stub/inc/mpxcollectionpath.h" |
|
25 |
|
26 |
|
27 class MMPXCollectionObserver; |
|
28 |
|
29 |
|
30 class MMPXCollection |
|
31 { |
|
32 public: |
|
33 |
|
34 /** |
|
35 * set gLeavePathL |
|
36 */ |
|
37 static void setPathLLeave(bool leave); |
|
38 |
|
39 /** |
|
40 * set gLeaveOpenPath |
|
41 */ |
|
42 static void setOpenLPathLeave(bool leave); |
|
43 |
|
44 /** |
|
45 * set gLeaveOpenMedia |
|
46 */ |
|
47 static void setOpenLMediaLeave(bool leave); |
|
48 |
|
49 /** |
|
50 * set gLeaveOpen |
|
51 */ |
|
52 static void setOpenLLeave(bool leave); |
|
53 |
|
54 /** |
|
55 * set gLeaveBack |
|
56 */ |
|
57 static void setBackLLeave(bool leave); |
|
58 |
|
59 /** |
|
60 * set gLeaveCommand |
|
61 */ |
|
62 static void setCommandLLeave(bool leave); |
|
63 |
|
64 /** |
|
65 * constructor |
|
66 */ |
|
67 MMPXCollection(){}; |
|
68 |
|
69 /** |
|
70 * destructor |
|
71 */ |
|
72 ~MMPXCollection(){}; |
|
73 |
|
74 /** |
|
75 * if gLeavePathL is true leaves KErrGeneral |
|
76 * if gLeavePathL is false returns address of new |
|
77 * CMPXCollectionPath |
|
78 * |
|
79 */ |
|
80 CMPXCollectionPath* PathL(); |
|
81 |
|
82 /** |
|
83 * if gLeaveOpenPath is true, leaves KErrGeneral |
|
84 */ |
|
85 void OpenL(CMPXCollectionPath& path); |
|
86 |
|
87 /** |
|
88 * if gLeaveOpenMedia is true, levaes KErrGeneral |
|
89 */ |
|
90 void OpenL(CMPXMedia& media); |
|
91 |
|
92 /** |
|
93 * if gLeaveOpenMedia is true, levaes KErrGeneral |
|
94 */ |
|
95 void OpenL(TInt aIndex); |
|
96 |
|
97 /** |
|
98 * if gLeaveOpen is true leaves KErrGeneral |
|
99 */ |
|
100 void OpenL(); |
|
101 |
|
102 /** |
|
103 * if gLeaveBack is true leaves KErrGeneral |
|
104 */ |
|
105 void BackL(); |
|
106 |
|
107 /** |
|
108 * if gLeaveCommand is true, leaves KErrGeneral |
|
109 */ |
|
110 void CommandL(CMPXCommand& cmd); |
|
111 |
|
112 }; |
|
113 |
|
114 |
|
115 |
|
116 class MMPXCollectionUtility |
|
117 { |
|
118 public: |
|
119 |
|
120 /** |
|
121 * sets gLeaveNewL |
|
122 */ |
|
123 static void setNewLLeave(bool fails); |
|
124 |
|
125 /** |
|
126 * zeroes gUtilCloseCounter |
|
127 */ |
|
128 static void resetCloseCounter(); |
|
129 |
|
130 /** |
|
131 * returns gUtilCloseCounter |
|
132 */ |
|
133 static int getCloseCounter(); |
|
134 |
|
135 /** |
|
136 * Creates collection utility stub, if gLeaveNewL is true, leaves with KErrGeneral |
|
137 */ |
|
138 static MMPXCollectionUtility* NewL( |
|
139 MMPXCollectionObserver* aObs = NULL, |
|
140 const TUid& aModeId = KMcModeDefault); |
|
141 |
|
142 /** |
|
143 * stub contructor |
|
144 */ |
|
145 MMPXCollectionUtility(); |
|
146 |
|
147 /** |
|
148 * stub desttructor |
|
149 */ |
|
150 virtual ~MMPXCollectionUtility(); |
|
151 |
|
152 /** |
|
153 * reference to collection |
|
154 */ |
|
155 MMPXCollection& Collection(); |
|
156 |
|
157 /** |
|
158 * NOP |
|
159 */ |
|
160 void Close(); |
|
161 |
|
162 private: |
|
163 |
|
164 /** |
|
165 * concrete collection object |
|
166 */ |
|
167 MMPXCollection mCollection; |
|
168 |
|
169 }; |
|
170 |
|
171 #endif |