|
1 /** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 * All rights reserved. |
|
3 * This component and the accompanying materials are made available |
|
4 * under the terms of the License "Eclipse Public License v1.0" |
|
5 * which accompanies this distribution, and is available |
|
6 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 * |
|
8 * Initial Contributors: |
|
9 * Nokia Corporation - initial contribution. |
|
10 * |
|
11 * Contributors: |
|
12 * |
|
13 * Description: |
|
14 * |
|
15 */ |
|
16 #include <QDebug> |
|
17 #include <QMap> |
|
18 #include <smcmockclassincludes.h> |
|
19 #include "phonebubblewrapper.h" |
|
20 |
|
21 typedef QMap <int , int > QMappi; |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // PhoneBubbleWrapper::PhoneBubbleWrapper |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 PhoneBubbleWrapper::PhoneBubbleWrapper( |
|
30 BubbleManagerIF & bubble, |
|
31 QObject * parent ) |
|
32 : |
|
33 QObject(parent), |
|
34 m_bubbleManager(bubble) |
|
35 { |
|
36 |
|
37 } |
|
38 |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // PhoneBubbleWrapper::~PhoneBubbleWrapper |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 PhoneBubbleWrapper::~PhoneBubbleWrapper( ) |
|
45 { |
|
46 |
|
47 } |
|
48 |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // PhoneBubbleWrapper::updateCallState |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 void PhoneBubbleWrapper::updateCallState( |
|
55 int callId, |
|
56 int newState ) |
|
57 { |
|
58 SMC_MOCK_METHOD2( void, int, callId, |
|
59 int, newState ) |
|
60 } |
|
61 |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // PhoneBubbleWrapper::callId |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 int PhoneBubbleWrapper::callId( |
|
68 int state ) |
|
69 { |
|
70 SMC_MOCK_METHOD1( int, int, state ) |
|
71 } |
|
72 |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // PhoneBubbleWrapper::createCallHeader |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 int PhoneBubbleWrapper::createCallHeader( |
|
79 int callId ) |
|
80 { |
|
81 SMC_MOCK_METHOD1( int, int, callId ) |
|
82 } |
|
83 |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // PhoneBubbleWrapper::removeCallHeader |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 void PhoneBubbleWrapper::removeCallHeader( |
|
90 int callId ) |
|
91 { |
|
92 SMC_MOCK_METHOD1( void, int, callId ) |
|
93 } |
|
94 |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // PhoneBubbleWrapper::setState |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 void PhoneBubbleWrapper::setState( |
|
101 int callId, |
|
102 int bubble, |
|
103 int callState ) |
|
104 { |
|
105 SMC_MOCK_METHOD3( void, int, callId, |
|
106 int, bubble, |
|
107 int, callState ) |
|
108 } |
|
109 |
|
110 |
|
111 // ----------------------------------------------------------------------------- |
|
112 // PhoneBubbleWrapper::setLabel |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 void PhoneBubbleWrapper::setLabel( |
|
116 int bubble, |
|
117 const TDesC & text ) |
|
118 { |
|
119 SMC_MOCK_METHOD2( void, int, bubble, |
|
120 const TDesC &, text ) |
|
121 } |
|
122 |
|
123 |
|
124 // ----------------------------------------------------------------------------- |
|
125 // PhoneBubbleWrapper::setCli |
|
126 // ----------------------------------------------------------------------------- |
|
127 // |
|
128 void PhoneBubbleWrapper::setCli( |
|
129 int bubble, |
|
130 const TDesC & cliText, |
|
131 Qt::TextElideMode elide ) |
|
132 { |
|
133 SMC_MOCK_METHOD3( void, int, bubble, |
|
134 const TDesC &, cliText, |
|
135 Qt::TextElideMode, elide ) |
|
136 } |
|
137 |
|
138 |
|
139 // ----------------------------------------------------------------------------- |
|
140 // PhoneBubbleWrapper::setSecondaryCli |
|
141 // ----------------------------------------------------------------------------- |
|
142 // |
|
143 void PhoneBubbleWrapper::setSecondaryCli( |
|
144 int bubble, |
|
145 const TDesC & cliText, |
|
146 Qt::TextElideMode elide ) |
|
147 { |
|
148 SMC_MOCK_METHOD3( void, int, bubble, |
|
149 const TDesC &, cliText, |
|
150 Qt::TextElideMode, elide ) |
|
151 } |
|
152 |
|
153 |
|
154 // ----------------------------------------------------------------------------- |
|
155 // PhoneBubbleWrapper::setCallType |
|
156 // ----------------------------------------------------------------------------- |
|
157 // |
|
158 void PhoneBubbleWrapper::setCallType( |
|
159 int bubble, |
|
160 int callType ) |
|
161 { |
|
162 SMC_MOCK_METHOD2( void, int, bubble, |
|
163 int, callType ) |
|
164 } |
|
165 |
|
166 |
|
167 // ----------------------------------------------------------------------------- |
|
168 // PhoneBubbleWrapper::bubbleManager |
|
169 // ----------------------------------------------------------------------------- |
|
170 // |
|
171 BubbleManagerIF & PhoneBubbleWrapper::bubbleManager( ) |
|
172 { |
|
173 return m_bubbleManager; |
|
174 } |
|
175 |
|
176 |
|
177 // ----------------------------------------------------------------------------- |
|
178 // PhoneBubbleWrapper::bubbleId |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 int PhoneBubbleWrapper::bubbleId( |
|
182 int callId ) |
|
183 { |
|
184 SMC_MOCK_METHOD1( int, int, callId ) |
|
185 } |
|
186 |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // PhoneBubbleWrapper::setDivert |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 void PhoneBubbleWrapper::setDivert( |
|
193 int bubble, |
|
194 bool enabled ) |
|
195 { |
|
196 SMC_MOCK_METHOD2( void, int, bubble, |
|
197 bool, enabled ) |
|
198 } |
|
199 |
|
200 |
|
201 // ----------------------------------------------------------------------------- |
|
202 // PhoneBubbleWrapper::setCiphering |
|
203 // ----------------------------------------------------------------------------- |
|
204 // |
|
205 void PhoneBubbleWrapper::setCiphering( |
|
206 int bubble, |
|
207 bool indicatorAllowed, |
|
208 bool enabled ) |
|
209 { |
|
210 SMC_MOCK_METHOD3( void, int, bubble, |
|
211 bool, indicatorAllowed, |
|
212 bool, enabled ) |
|
213 } |
|
214 |
|
215 |
|
216 // ----------------------------------------------------------------------------- |
|
217 // PhoneBubbleWrapper::activeCallCount |
|
218 // ----------------------------------------------------------------------------- |
|
219 // |
|
220 int PhoneBubbleWrapper::activeCallCount( ) |
|
221 { |
|
222 SMC_MOCK_METHOD0( int ) |
|
223 } |
|
224 |
|
225 |
|
226 // ----------------------------------------------------------------------------- |
|
227 // PhoneBubbleWrapper::callStates |
|
228 // ----------------------------------------------------------------------------- |
|
229 // |
|
230 QMap <int , int > PhoneBubbleWrapper::callStates( ) const |
|
231 { |
|
232 SMC_MOCK_METHOD0( QMappi ) |
|
233 } |
|
234 |
|
235 |
|
236 // ----------------------------------------------------------------------------- |
|
237 // PhoneBubbleWrapper::bubbles |
|
238 // ----------------------------------------------------------------------------- |
|
239 // |
|
240 QMap <int , int > PhoneBubbleWrapper::bubbles( ) const |
|
241 { |
|
242 SMC_MOCK_METHOD0( QMappi ) |
|
243 } |
|
244 |
|
245 |
|
246 // ----------------------------------------------------------------------------- |
|
247 // PhoneBubbleWrapper::createConferenceBubble |
|
248 // ----------------------------------------------------------------------------- |
|
249 // |
|
250 int PhoneBubbleWrapper::createConferenceBubble( |
|
251 int callId, |
|
252 int callState, |
|
253 const TDesC & labelText, |
|
254 const TDesC & cliText ) |
|
255 { |
|
256 SMC_MOCK_METHOD4( int, int, callId, |
|
257 int, callState, |
|
258 const TDesC &, labelText, |
|
259 const TDesC &, cliText ) |
|
260 } |
|
261 |
|
262 |
|
263 // ----------------------------------------------------------------------------- |
|
264 // PhoneBubbleWrapper::setConferenceCallId |
|
265 // ----------------------------------------------------------------------------- |
|
266 // |
|
267 void PhoneBubbleWrapper::setConferenceCallId( |
|
268 int callId ) |
|
269 { |
|
270 SMC_MOCK_METHOD1( void, int, callId ) |
|
271 } |
|
272 |
|
273 |
|
274 // ----------------------------------------------------------------------------- |
|
275 // PhoneBubbleWrapper::conferenceCallList |
|
276 // ----------------------------------------------------------------------------- |
|
277 // |
|
278 QList <int > PhoneBubbleWrapper::conferenceCallList( ) const |
|
279 { |
|
280 SMC_MOCK_METHOD0( QList <int > ) |
|
281 } |
|
282 |
|
283 |
|
284 // ----------------------------------------------------------------------------- |
|
285 // PhoneBubbleWrapper::removeConferenceCallId |
|
286 // ----------------------------------------------------------------------------- |
|
287 // |
|
288 void PhoneBubbleWrapper::removeConferenceCallId( |
|
289 int callId ) |
|
290 { |
|
291 SMC_MOCK_METHOD1( void, int, callId ) |
|
292 } |
|
293 |
|
294 |
|
295 // ----------------------------------------------------------------------------- |
|
296 // PhoneBubbleWrapper::conferenceCallId |
|
297 // ----------------------------------------------------------------------------- |
|
298 // |
|
299 bool PhoneBubbleWrapper::conferenceCallId( |
|
300 int callId ) const |
|
301 { |
|
302 SMC_MOCK_METHOD1( bool, int, callId ) |
|
303 } |
|
304 |
|
305 |
|
306 // ----------------------------------------------------------------------------- |
|
307 // PhoneBubbleWrapper::removeCallFromConference |
|
308 // ----------------------------------------------------------------------------- |
|
309 // |
|
310 void PhoneBubbleWrapper::removeCallFromConference( |
|
311 int callId ) |
|
312 { |
|
313 SMC_MOCK_METHOD1( void, int, callId ) |
|
314 } |
|
315 |
|
316 |
|
317 // ----------------------------------------------------------------------------- |
|
318 // PhoneBubbleWrapper::removeConferenceBubble |
|
319 // ----------------------------------------------------------------------------- |
|
320 // |
|
321 void PhoneBubbleWrapper::removeConferenceBubble( ) |
|
322 { |
|
323 SMC_MOCK_METHOD0( void ) |
|
324 } |
|
325 |
|
326 |
|
327 // ----------------------------------------------------------------------------- |
|
328 // PhoneBubbleWrapper::callIdByBubbleId |
|
329 // ----------------------------------------------------------------------------- |
|
330 // |
|
331 int PhoneBubbleWrapper::callIdByBubbleId( |
|
332 int bubbleId ) |
|
333 { |
|
334 SMC_MOCK_METHOD1( int, int, bubbleId ) |
|
335 } |
|
336 |
|
337 |
|
338 // ----------------------------------------------------------------------------- |
|
339 // PhoneBubbleWrapper::addToConferenceBubble |
|
340 // ----------------------------------------------------------------------------- |
|
341 // |
|
342 void PhoneBubbleWrapper::addToConferenceBubble( ) |
|
343 { |
|
344 SMC_MOCK_METHOD0( void ) |
|
345 } |
|
346 |
|
347 |
|
348 // ----------------------------------------------------------------------------- |
|
349 // PhoneBubbleWrapper::setServiceId |
|
350 // ----------------------------------------------------------------------------- |
|
351 // |
|
352 void PhoneBubbleWrapper::setServiceId( |
|
353 int callId, |
|
354 int serviceId ) |
|
355 { |
|
356 SMC_MOCK_METHOD2( void, int, callId, |
|
357 int, serviceId ) |
|
358 } |
|
359 |
|
360 |
|
361 // ----------------------------------------------------------------------------- |
|
362 // PhoneBubbleWrapper::serviceIdByCallId |
|
363 // ----------------------------------------------------------------------------- |
|
364 // |
|
365 int PhoneBubbleWrapper::serviceIdByCallId( |
|
366 int callId ) const |
|
367 { |
|
368 SMC_MOCK_METHOD1( int, int, callId ) |
|
369 } |
|
370 |
|
371 |
|
372 // ----------------------------------------------------------------------------- |
|
373 // PhoneBubbleWrapper::serviceIds |
|
374 // ----------------------------------------------------------------------------- |
|
375 // |
|
376 QMap <int , int > PhoneBubbleWrapper::serviceIds( ) const |
|
377 { |
|
378 SMC_MOCK_METHOD0( QMappi ) |
|
379 } |
|
380 |
|
381 |