|
1 /* |
|
2 * Copyright (c) 2007 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: CBubbleManager class provides API for phone to draw current calls |
|
15 * on the screen. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef BUBBLEMANAGER_H |
|
22 #define BUBBLEMANAGER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <coemain.h> |
|
26 #include <bmbubbleplace.h> |
|
27 #include <bldvariant.hrh> |
|
28 #include <mphcntmatch.h> |
|
29 |
|
30 // CONSTANTS |
|
31 _LIT( KBubbleTextSeparator ,"\t"); |
|
32 const TUint8 KBubbleShortLabelMaxLength = 25; |
|
33 const TUint8 KBubbleLongLabelMaxLength = 35; |
|
34 const TUint8 KBubbleLabelMaxLength = |
|
35 KBubbleShortLabelMaxLength + KBubbleLongLabelMaxLength; |
|
36 //const TUint8 KBubbleMaxCharsInNE = 48; |
|
37 const TUint8 KBubbleCallMaxAmount = 7; |
|
38 const TUint8 KBubblePlaceMaxAmount = 20; |
|
39 const TUint8 KBubblePlaceMaxAmountTouch = 23; |
|
40 const TUint8 KBubblePlaceMaxVisible = 4; |
|
41 const TUint8 KBubbleMaxCallsInConf = 5; |
|
42 const TInt KBubbleConferenceId = -1; // differs from 0-6 which |
|
43 //are reserved for calls. |
|
44 const TInt KBubbleInvalidId = -2; |
|
45 const TInt KBubbleNoHighlightRow = 0; // 1-5 are conference rows |
|
46 |
|
47 // FORWARD DECLARATIONS |
|
48 class CBubbleOutlook; |
|
49 class CBubbleImageManager; |
|
50 class CBubbleCallHeader; |
|
51 class CBubbleHeader; |
|
52 class CBubbleConfHeader; |
|
53 class CBubbleOutlookNumberEntry; |
|
54 class CBubbleOutlookTopRight; |
|
55 class CEikImage; |
|
56 class CBubbleResourceManager; |
|
57 class CPNGNumberGrouping; |
|
58 class CBubbleCallObjectManager; |
|
59 class CBubbleVideoController; |
|
60 class MBubbleVideoPlaybackObserver; |
|
61 class CBubbleTouchPane; |
|
62 class MBubbleTouchPaneInterface; |
|
63 class CTelBubbleCustomElement; |
|
64 class CBubbleCustomManager; |
|
65 class CBubbleMainPaneControl; |
|
66 |
|
67 // CLASS DECLARATION |
|
68 |
|
69 /** |
|
70 * CBubbleManager container class |
|
71 * |
|
72 * @lib bubblemanager.lib |
|
73 * @since Series60_1.0 |
|
74 */ |
|
75 NONSHARABLE_CLASS(CBubbleManager) : public CCoeControl |
|
76 { |
|
77 public: // Data |
|
78 typedef TInt TBubbleId; |
|
79 typedef TBuf<KBubbleLabelMaxLength> TBubbleLabelString; |
|
80 typedef TUint8 TRowNumber; // 1-5 allowed (for conf) |
|
81 |
|
82 |
|
83 // Different call states |
|
84 enum TPhoneCallState // Set the order for drawing too |
|
85 { |
|
86 ENone = 0, // Default on creation |
|
87 EOnHold, |
|
88 EDisconnected, |
|
89 EActive, |
|
90 EIncoming, |
|
91 EWaiting, |
|
92 EAlertToDisconnected, |
|
93 EOutgoing, |
|
94 EAlerting, |
|
95 }; |
|
96 |
|
97 // Call Flags |
|
98 enum TPhoneCallTypeFlags |
|
99 { |
|
100 ENormal = 0x00, // Default |
|
101 ENoCiphering = 0x08, // open lock icon |
|
102 ELine2 = 0x10, // is call on line 2 |
|
103 EMuted = 0x20, // not implemented for a single call |
|
104 EDiverted = 0x40, // is call diverted |
|
105 EVideo = 0x80, // video call |
|
106 EVoIPCall = 0x100 // VoIP call. |
|
107 }; |
|
108 |
|
109 // Number types |
|
110 enum TPhoneNumberType |
|
111 { |
|
112 ENotSet = 0, // Default |
|
113 EHome, |
|
114 EMobile, |
|
115 EWork, |
|
116 EPhone, |
|
117 EFaxNumber, |
|
118 EPager, |
|
119 ECar, |
|
120 EAssistant |
|
121 }; |
|
122 |
|
123 // Where the text is clipped. |
|
124 enum TPhoneClippingDirection |
|
125 { |
|
126 ELeft, // Default on numbers |
|
127 ERight // Default on texts/names |
|
128 }; |
|
129 |
|
130 enum TPhoneCallAnimationTypes |
|
131 { |
|
132 EAnimVoiceCall = 0, |
|
133 EAnimVideoCall, |
|
134 EAnimVoIPCall |
|
135 }; |
|
136 |
|
137 // Popup bubble type |
|
138 enum TPhonePopupBubbleType |
|
139 { |
|
140 EVideoRingingToneQCIF, |
|
141 EVideoRingingToneSubQCIF |
|
142 }; |
|
143 |
|
144 // Video play |
|
145 enum TBubbleVideoPlayMode |
|
146 { |
|
147 EPlayInLoop, |
|
148 EPlayOnce, |
|
149 EPlayAscending |
|
150 }; |
|
151 |
|
152 // Conference participant CLI |
|
153 enum TBubbleParticipantListCLI |
|
154 { |
|
155 EParticipantListCLIText, |
|
156 EParticipantListCNAP |
|
157 }; |
|
158 |
|
159 public: // Constructors and destructor |
|
160 |
|
161 /** |
|
162 * Two phase constructor |
|
163 * @param aContainer Parent container |
|
164 * @param aRect Area to use |
|
165 * @return New instance |
|
166 */ |
|
167 IMPORT_C static CBubbleManager* NewL( const CCoeControl& aContainer , |
|
168 const TRect& aRect ); |
|
169 |
|
170 /** |
|
171 * Two phase constructor |
|
172 * @param aContainer Parent container |
|
173 * @param aRect Area to use |
|
174 * @param aBigNEInIdle Bigger number entry used in idle state. |
|
175 * @return New instance |
|
176 */ |
|
177 IMPORT_C static CBubbleManager* NewL( const CCoeControl& aContainer , |
|
178 const TRect& aRect, |
|
179 TBool aBigNEInIdle ); |
|
180 |
|
181 /** |
|
182 * Destructor. |
|
183 */ |
|
184 IMPORT_C ~CBubbleManager(); |
|
185 |
|
186 public: // New functions |
|
187 |
|
188 // ==================================================== |
|
189 // Must surround all the changes: |
|
190 // ==================================================== |
|
191 // |
|
192 |
|
193 /** |
|
194 * Before making any changes to bubble headers, call this function so |
|
195 * manager can prapare for them properly. |
|
196 */ |
|
197 IMPORT_C void StartChanges(); |
|
198 |
|
199 /** |
|
200 * After the changes to bubble headers call this function so manager |
|
201 * can prepare bubbles to right places and check the drawing order. |
|
202 * Memory for arrays has been allocated beforehand. |
|
203 */ |
|
204 IMPORT_C void EndChanges(); |
|
205 |
|
206 |
|
207 // ==================================================== |
|
208 // For number entry: |
|
209 // ==================================================== |
|
210 // |
|
211 |
|
212 /** |
|
213 * Sets number entry active. |
|
214 */ |
|
215 IMPORT_C void CreateNumberEntry(); |
|
216 |
|
217 /** |
|
218 * Return pointer to number entry |
|
219 * @return The NE. |
|
220 */ |
|
221 IMPORT_C CCoeControl* GetNumberEntry( ) const; |
|
222 |
|
223 /** |
|
224 * Query, is number entry used. |
|
225 * @return ETrue is NE is used. |
|
226 */ |
|
227 IMPORT_C TBool IsNumberEntryUsed( ) const; |
|
228 |
|
229 /** |
|
230 * This disables NE drawing but doesn't empty the component. |
|
231 * @param aVisibility NE visible or not. |
|
232 */ |
|
233 IMPORT_C void SetNumberEntryVisible( |
|
234 const TBool& aVisibility = ETrue ); |
|
235 |
|
236 /** |
|
237 * Set Number Entry text. |
|
238 * @param aDesC The text. |
|
239 */ |
|
240 IMPORT_C void SetTextToNumberEntry( const TDesC& aDesC ); |
|
241 |
|
242 /** |
|
243 * Get Number Entry Text. |
|
244 * @param aDesC The text. |
|
245 */ |
|
246 IMPORT_C void GetTextFromNumberEntry( TDes& aDesC ); |
|
247 |
|
248 /** |
|
249 * Removes NE and empties the buffer. |
|
250 */ |
|
251 IMPORT_C void RemoveNumberEntry( ); |
|
252 |
|
253 |
|
254 // ==================================================== |
|
255 // For call headers and some for conference call |
|
256 // ==================================================== |
|
257 // |
|
258 |
|
259 /** |
|
260 * Takes a new call header in use. |
|
261 * @return Bubble idenfication number |
|
262 */ |
|
263 IMPORT_C TBubbleId CreateCallHeader(); |
|
264 |
|
265 /** |
|
266 * Removes call header from use |
|
267 * @param aBubbleId Indentifies call header |
|
268 */ |
|
269 IMPORT_C void RemoveCallHeader( const TBubbleId& aBubbleId ); |
|
270 |
|
271 /** |
|
272 * Sets call state to header. |
|
273 * @param aBubbleId Identifies header |
|
274 * @param aState Call state ( e.g. incoming,.. ), for conf also |
|
275 * (active/on hold/ none) |
|
276 */ |
|
277 IMPORT_C void SetState( const TBubbleId& aBubbleId, |
|
278 const TPhoneCallState& aState ); |
|
279 |
|
280 /** |
|
281 * Sets text label to header. For conf also. |
|
282 * @param aBubbleId Identifies header |
|
283 * @param aText Text to be seen in bubble ( e.g. 'on hold' ) |
|
284 * @param aClipDirection Text clipping end |
|
285 */ |
|
286 IMPORT_C void SetLabel( |
|
287 const TBubbleId& aBubbleId, |
|
288 const TDesC& aText, |
|
289 const TPhoneClippingDirection& aClipDirection = ERight ); |
|
290 |
|
291 /** |
|
292 * Sets text label to header. For conf also. |
|
293 * @param aBubbleId Identifies header |
|
294 * @param aLongText Text to be seen in bubble ( e.g. 'disconnected' ) |
|
295 * @param aShortText Text to be seen in bubble ( e.g. 'disconn' ) |
|
296 * @param aClipDirection Text clipping end |
|
297 */ |
|
298 IMPORT_C void SetLabel( |
|
299 const TBubbleId& aBubbleId, |
|
300 const TDesC& aLongText, |
|
301 const TDesC& aShortText, |
|
302 const TPhoneClippingDirection& aClipDirection = ERight ); |
|
303 |
|
304 /** |
|
305 * Sets caller's line identification ( name or number) to header. |
|
306 * For conf also. |
|
307 * @param aBubbleId Identifies header |
|
308 * @param aCLIText Caller's CLI ( e.g. 'Mother' ) |
|
309 * @param aClipDirection Text clipping end |
|
310 */ |
|
311 IMPORT_C void SetCLI( const TBubbleId& aBubbleId, |
|
312 const TDesC& aCLIText, |
|
313 const TPhoneClippingDirection& aClipDirection ); |
|
314 |
|
315 /** |
|
316 * Updates caller's line identification ( name or number) to header. |
|
317 * For conf also. |
|
318 * @param aBubbleId Identifies header |
|
319 * @param aCLIText Caller's CLI ( e.g. 'Daddy' ) |
|
320 * @param aClipDirection Text clipping end |
|
321 */ |
|
322 IMPORT_C void UpdateCLI( |
|
323 const TBubbleId& aBubbleId, |
|
324 const TDesC& aCLIText, |
|
325 const TPhoneClippingDirection& aClipDirection ); |
|
326 |
|
327 |
|
328 /** |
|
329 * Sets call time or cost text to header. For conf also. |
|
330 * @param aBubbleId Identifies header |
|
331 * @param aCallTime Timer or cost text ( e.g. '00:12:34' or '£01.23' ). |
|
332 * If this parameter is too long |
|
333 * (> KBubbleLabelMaxLength) it discards the end. |
|
334 */ |
|
335 IMPORT_C void SetCallTime( |
|
336 const TBubbleId& aBubbleId, |
|
337 const TDesC& aCallTime ); |
|
338 |
|
339 /** |
|
340 * Updates call time or cost text to header. For conf also. |
|
341 * @param aBubbleId Identifies header |
|
342 * @param aCallTime Timer or cost text ( e.g. '00:12:34' or '£01.23' ). |
|
343 * If this parameter is too long |
|
344 * (> KBubbleLabelMaxLength) it discards the end. |
|
345 */ |
|
346 IMPORT_C void UpdateCallTime( |
|
347 const TBubbleId& aBubbleId, |
|
348 const TDesC& aCallTime ); |
|
349 |
|
350 /** |
|
351 * Attach a thumbnail image to header. Bitmap parameters can be NULL. |
|
352 * Ownership is not transferred. |
|
353 * @param aBubbleId Identifies header |
|
354 * @param aTnBitmap A Pointer to wanted thumbnail bitmap. |
|
355 * @param aTnBitmapMask A Pointer to thumbnail bitmap mask. |
|
356 * @param aDataOwnershipTransferred Set ETrue if ownership is transferred. |
|
357 */ |
|
358 IMPORT_C void SetThumbnail( const TBubbleId& aBubbleId, |
|
359 CFbsBitmap* aTnBitmap, |
|
360 CFbsBitmap* aTnBitmapMask, |
|
361 TBool aDataOwnershipTransferred |
|
362 = EFalse ); |
|
363 |
|
364 /** |
|
365 * Attach a call object image to header. |
|
366 * @param aBubbleId Identifies header |
|
367 * @param aImageFile. |
|
368 */ |
|
369 IMPORT_C void SetCallObjectImage( const TBubbleId& aBubbleId, |
|
370 const TDesC& aImageFileName ); |
|
371 |
|
372 /** |
|
373 * Attach a call object image to header. |
|
374 * Ownership is not transferred. |
|
375 * @param aBubbleId Identifies header |
|
376 * @param aCOBitmap A Pointer to wanted call object image bitmap. |
|
377 * @param aCOBitmapMask A Pointer to call object bitmap mask. |
|
378 * @param aDataOwnershipTransferred Set ETrue if ownership is transferred. |
|
379 */ |
|
380 IMPORT_C void SetCallObjectImage( const TBubbleId& aBubbleId, |
|
381 CFbsBitmap* aCOBitmap, |
|
382 CFbsBitmap* aCOBitmapMask = NULL, |
|
383 TBool aDataOwnershipTransferred |
|
384 = EFalse ); |
|
385 |
|
386 /** |
|
387 * Attach a call object image to header. Image is taken from |
|
388 * active theme. |
|
389 * @param aBubbleId Identifies header. |
|
390 */ |
|
391 IMPORT_C void SetCallObjectFromTheme( const TBubbleId& aBubbleId ); |
|
392 |
|
393 /** |
|
394 * Attach a call object text to header. |
|
395 * Ownership is not transferred. |
|
396 * @param aBubbleId Identifies header |
|
397 * @param aCOText Pointer to buffer holding the text. |
|
398 */ |
|
399 IMPORT_C void SetCallObjectText( const TBubbleId& aBubbleId, |
|
400 const TDesC& aCOText ); |
|
401 |
|
402 |
|
403 /** |
|
404 * Sets call flags to header. |
|
405 * @param aBubbleId Identifies header |
|
406 * @param aFlags Call flags |
|
407 */ |
|
408 IMPORT_C void SetCallFlags( |
|
409 const TBubbleId& aBubbleId, |
|
410 const TUint32& aFlags ); |
|
411 |
|
412 /** |
|
413 * Sets call flags to header. |
|
414 * @param aBubbleId Identifies header |
|
415 * @param aFlag One call flag |
|
416 * @param aSet ETrue sets flag and EFalse clears flag |
|
417 */ |
|
418 IMPORT_C void SetCallFlag( const TBubbleId& aBubbleId, |
|
419 const TPhoneCallTypeFlags& aFlag, |
|
420 const TBool& aSet ); |
|
421 |
|
422 /** |
|
423 * Sets number type. |
|
424 * @param aBubbleId Identifies header |
|
425 * @param aNumType Number type enumeration ( e.g. mobile ) |
|
426 */ |
|
427 IMPORT_C void SetNumberType( const TBubbleId& aBubbleId, |
|
428 const TPhoneNumberType& aNumType ); |
|
429 |
|
430 /** |
|
431 * Sets number type. |
|
432 * @param aBubbleId Identifies header |
|
433 * @param aNumType Number type id. |
|
434 */ |
|
435 IMPORT_C void SetPbkNumberType( const TBubbleId& aBubbleId, |
|
436 const TInt aNumType ); |
|
437 |
|
438 IMPORT_C void SetPhCntNumberType( const TBubbleId& aBubbleId, |
|
439 const MPhCntMatch::TNumberType aNumType ); |
|
440 |
|
441 /** |
|
442 * Updates video call header text for animation |
|
443 * @param aBubbleId Identifies header |
|
444 * @param aHeaderText video call header animation text |
|
445 */ |
|
446 IMPORT_C void UpdateCallHeaderText( |
|
447 const TBubbleId& aBubbleId, |
|
448 const TDesC& aLongText, |
|
449 const TDesC& aShortText, |
|
450 const TPhoneClippingDirection& aClipDirection ); |
|
451 |
|
452 // ==================================================== |
|
453 // For all bubbles |
|
454 // ==================================================== |
|
455 // |
|
456 |
|
457 /** |
|
458 * Sets phone muted/unmuted. |
|
459 * @param aIsMuted ETrue if phone is muted. |
|
460 */ |
|
461 IMPORT_C void SetPhoneMuted( const TBool& aIsMuted = ETrue ); |
|
462 |
|
463 |
|
464 // ==================================================== |
|
465 // For conference call |
|
466 // ==================================================== |
|
467 // |
|
468 |
|
469 /** |
|
470 * Creates a conference call based upon two calls. Bubbles must be |
|
471 * created first. |
|
472 * @param aBubble1 Identifies first header to set in conference call. |
|
473 * @param aBubble2 Identifies second header to set in conference call |
|
474 * @return Conference bubble idenfication. |
|
475 */ |
|
476 IMPORT_C TBubbleId CreateConference( const TBubbleId& aBubble1, |
|
477 const TBubbleId& aBubble2 ); |
|
478 |
|
479 /** |
|
480 * Splits conference call into invidual two calls. Call headers stays |
|
481 * in use. Headers' state will not be changed. |
|
482 */ |
|
483 IMPORT_C void RemoveConference(); |
|
484 |
|
485 /** |
|
486 * Adds new call to conference call. |
|
487 * @param aBubbleId Identifies header |
|
488 */ |
|
489 IMPORT_C void AddRowToConference( const TBubbleId& aBubbleId ); |
|
490 |
|
491 /** |
|
492 * Takes specified call out of conference. Use RemoveConference if |
|
493 * conference has only two calls in it. Header's state is same as |
|
494 * before adding it to conference (if not changed inside the conf). |
|
495 * @param aBubbleId Identifies header |
|
496 */ |
|
497 IMPORT_C void RemoveRowFromConference( const TBubbleId& aBubbleId ); |
|
498 |
|
499 /** |
|
500 * Counts calls in conference call. |
|
501 * @return Call amount in conference. |
|
502 */ |
|
503 IMPORT_C TUint8 ConferenceRowCount( ) const; |
|
504 |
|
505 /** |
|
506 * Sets highlight to specified line in conference. |
|
507 * @param aRowNumber Line number in conference bubble. |
|
508 * 0 means no highlight. |
|
509 */ |
|
510 IMPORT_C void SetSelectionInConference( const TRowNumber& aRowNumber ); |
|
511 |
|
512 /** |
|
513 * Sets highlight to specified bubble id in conference. |
|
514 * @param aBubbleId Id for wanted selection. |
|
515 * KBubbleInvalidId means no hihgtlight. |
|
516 */ |
|
517 IMPORT_C void SetSelectionIdInConference( const TBubbleId& aBubbleId ); |
|
518 |
|
519 /** |
|
520 * Gets highlighted item in conference. |
|
521 * @return Row number of the call. 0 if no highlight |
|
522 */ |
|
523 IMPORT_C TRowNumber SelectionInConference() const; |
|
524 |
|
525 /** |
|
526 * Gets highlighted item in conference. |
|
527 * @return Id of the call. Returns KBubbleInvalidId if no highlight |
|
528 */ |
|
529 IMPORT_C TBubbleId SelectionIdInConference() const; |
|
530 |
|
531 /** |
|
532 * Moves highligh one up if possible |
|
533 */ |
|
534 IMPORT_C void MoveHighlightOneUpInConference(); |
|
535 |
|
536 /** |
|
537 * Moves highligh one down if possible |
|
538 */ |
|
539 IMPORT_C void MoveHighlightOneDownInConference(); |
|
540 |
|
541 /** |
|
542 * Use this function to expand or shrink conference bubble. |
|
543 * @param aIsExpanded ETrue=expanded, EFalse=shrink. |
|
544 */ |
|
545 IMPORT_C void SetExpandedConferenceCallHeader( |
|
546 const TBool& aIsExpanded = ETrue ); |
|
547 |
|
548 /** |
|
549 * Query: is conference expanded? |
|
550 * @return ETrue, if conference is expanded |
|
551 */ |
|
552 IMPORT_C TBool IsConferenceExpanded( ) const; |
|
553 |
|
554 // ==================================================== |
|
555 // Use only if __SERIES60_PHONE_CNAP if defined: |
|
556 // ==================================================== |
|
557 // |
|
558 /** |
|
559 * Sets CNAP information to the call header. CLI is used for the CNAP |
|
560 * name got from the network. In addition, the phone number is stored |
|
561 * here to show it also. |
|
562 * @since 1.2 |
|
563 * @param aBubbleId Identifies header |
|
564 * @param aCNAPText Caller's CNAP information. |
|
565 * @param aClipDirection Text clipping end |
|
566 */ |
|
567 IMPORT_C void SetCNAP( |
|
568 const TBubbleId& aBubbleId, |
|
569 const TDesC& aCNAPText, |
|
570 const TPhoneClippingDirection& aClipDirection = ELeft ); |
|
571 |
|
572 |
|
573 /** |
|
574 * Set number entry's editor mode. |
|
575 * @param aMode for number editor input mode. |
|
576 * @return Input mode of the editor. |
|
577 * @since 3.0 |
|
578 */ |
|
579 IMPORT_C TInt ChangeEditorMode( TBool aDefaultMode = EFalse ); |
|
580 |
|
581 /** |
|
582 * Get number entry's editor mode. |
|
583 * @return Input mode of the editor. |
|
584 * @since 3.0 |
|
585 */ |
|
586 IMPORT_C TInt GetEditorMode() const; |
|
587 |
|
588 /** |
|
589 * Resets number entry editor to default values. |
|
590 * @since 3.0 |
|
591 */ |
|
592 IMPORT_C void ResetEditorToDefaultValues(); |
|
593 |
|
594 /** |
|
595 * Starts initialization of most essential icons. This method can |
|
596 * be used to ensure correct LAF in OOM situation (to be called |
|
597 * before OOM). |
|
598 */ |
|
599 IMPORT_C void PrepareIcons(); |
|
600 |
|
601 /** |
|
602 * Preloads/Releases call theme image. |
|
603 * @param aPreload ETrue to preload the image. |
|
604 * EFalse to release the image. |
|
605 */ |
|
606 IMPORT_C void PreloadCallThemeImage( TBool aPreload ); |
|
607 |
|
608 /** |
|
609 * Number of headers shown on the screen. |
|
610 * @return Shown header count. |
|
611 */ |
|
612 IMPORT_C TUint8 ShownHeaderCount() const; |
|
613 |
|
614 /** |
|
615 * Client should call this method when the background context |
|
616 * changes after EndChanges() call. This method updates animation |
|
617 * frames that are created by drawing part of application view |
|
618 * off-screen (updates here cannot be based on redraw events). |
|
619 */ |
|
620 IMPORT_C void HandleBackgroundImageChange(); |
|
621 |
|
622 /** |
|
623 * Sets video ringing tone. Video is played when the next call |
|
624 * enters incoming state and stopped when the call exits the |
|
625 * incoming call state. |
|
626 * @param aFileName File name with path. |
|
627 * @param aPlayMode Play mode. |
|
628 * @param aVolumeLevel Volume level (0-10). |
|
629 * @param aUseArbitraryScaling Set ETrue for arbitrary video scaling. |
|
630 * @param aObserver Playback observer. |
|
631 */ |
|
632 IMPORT_C void SetVideoRingTone( |
|
633 const TDesC& aFileName, |
|
634 TBubbleVideoPlayMode aPlayMode, |
|
635 TInt aVolumeLevel, |
|
636 TBool aUseArbitraryScaling, |
|
637 MBubbleVideoPlaybackObserver* aObserver ); |
|
638 |
|
639 /** |
|
640 * Stops video playback. Call bubble for video ringtone stays |
|
641 * active. |
|
642 */ |
|
643 IMPORT_C void StopVideoRingTone(); |
|
644 |
|
645 /** |
|
646 * Mutes video playback. |
|
647 */ |
|
648 IMPORT_C void MuteVideoRingTone(); |
|
649 |
|
650 /** |
|
651 * Cancels video ringing tone. Video playback is stopped and call |
|
652 * bubble layout is changed to normal. This is meant to be used in |
|
653 * error situations, where client needs to abort video state and |
|
654 * play default ringtone instead. |
|
655 */ |
|
656 IMPORT_C void CancelVideoRingTone(); |
|
657 |
|
658 /** |
|
659 * Set CLI used in participant list (text or phonenumber). |
|
660 * @param aBubbleId Bubble identifier. |
|
661 * @param aParticipantCLI CLI type. |
|
662 * @since S60 5.0 |
|
663 */ |
|
664 IMPORT_C void SetParticipantListCLI( |
|
665 const TBubbleId& aBubbleId, |
|
666 TBubbleParticipantListCLI aParticipantCLI ); |
|
667 |
|
668 /** |
|
669 * Returns touchpane interface. |
|
670 * @return Pointer to touchpane interface. |
|
671 */ |
|
672 IMPORT_C MBubbleTouchPaneInterface* TouchPane(); |
|
673 |
|
674 /** |
|
675 * Sets touchpane visibility. |
|
676 * @param Set ETrue if touchpane is shown otherwise EFalse. |
|
677 */ |
|
678 IMPORT_C void SetTouchPaneVisible( TBool aVisible ); |
|
679 |
|
680 /** |
|
681 * Adds custom ui element to call bubble. Onwership of the element |
|
682 * is not transferred, caller shall remove the element before deleting |
|
683 * the instance. |
|
684 * @since S60 5.0 |
|
685 * @param aBubbleId Bubble identifier. |
|
686 * @param aElement Custom element. |
|
687 * @param aPriority Priotity 0(high) - 255(low). |
|
688 * Used when multiple instances in same position. |
|
689 */ |
|
690 IMPORT_C void AddCustomElement( const TBubbleId& aBubbleId, |
|
691 CTelBubbleCustomElement* aElement, |
|
692 TInt aPriority ); |
|
693 |
|
694 /** |
|
695 * Removes custom ui element from call bubble. |
|
696 * @since S60 5.0 |
|
697 * @param aBubbleId Bubble identifier. |
|
698 * @param aElement Custom element. |
|
699 */ |
|
700 IMPORT_C void RemoveCustomElement( const TBubbleId& aBubbleId, |
|
701 CTelBubbleCustomElement* aElement ); |
|
702 |
|
703 public: // non-imported functions |
|
704 |
|
705 /** |
|
706 * Focus changed |
|
707 * @param aDrawNow Needs redraw? |
|
708 */ |
|
709 void FocusChanged( TDrawNow aDrawNow ); |
|
710 |
|
711 /** |
|
712 * For getting image manager |
|
713 * @return Reference |
|
714 */ |
|
715 CBubbleImageManager& ImageManager(); |
|
716 |
|
717 /** |
|
718 * For getting resource manager |
|
719 * @return Reference |
|
720 */ |
|
721 CBubbleResourceManager& ResourceManager(); |
|
722 |
|
723 /** |
|
724 * For getting customization manager |
|
725 * @return Reference |
|
726 */ |
|
727 CBubbleCustomManager& CustomManager(); |
|
728 |
|
729 /** |
|
730 * Uses number grouping to change the phone number |
|
731 * @since 1.2 |
|
732 * @param aNumber original number |
|
733 * @return grouped number |
|
734 **/ |
|
735 const TDesC& NumberGroup( const TDesC& aNumber ); |
|
736 |
|
737 /** |
|
738 * To test if this call state is such that end key |
|
739 * press terminates the call. |
|
740 * end key is pressed. |
|
741 * @return ETrue if call is dropped by end key. Otherwise EFalse. |
|
742 */ |
|
743 TBool IsCallDroppedByEndKey( const TPhoneCallState& aState ) const; |
|
744 |
|
745 /** |
|
746 * To get number of ongoing calls. |
|
747 * @return Active call count. |
|
748 */ |
|
749 TUint8 ActiveCallCount() const; |
|
750 |
|
751 /** |
|
752 * For getting video controller. |
|
753 * @return Video controller reference. |
|
754 */ |
|
755 CBubbleVideoController& VideoController() const; |
|
756 |
|
757 /** |
|
758 * To get call state of the bubble. |
|
759 * @return Call state. |
|
760 */ |
|
761 TPhoneCallState CallState( const TBubbleId& aBubbleId ); |
|
762 |
|
763 /** |
|
764 * Get size for call object image for incall situations. |
|
765 * @param aIncall Set ETrue for incall states. |
|
766 * @param aBigBubble Set ETrue for big call bubble. |
|
767 * @return The Size. |
|
768 */ |
|
769 TSize CallObjectImageIncallSize( TBool aBigBubble = EFalse ); |
|
770 |
|
771 /** |
|
772 * Returns touch feature status. |
|
773 * @return ETrue if touch call handling enabled, otherwise EFalse. |
|
774 */ |
|
775 TBool IsTouchCallHandling() const; |
|
776 |
|
777 /** |
|
778 * Returns main pane image rect |
|
779 */ |
|
780 const TRect MainPaneImageRect( |
|
781 TBool aTinyImage = EFalse, |
|
782 TBool aThreeLinesShown = EFalse ) const; |
|
783 |
|
784 private: // Functions from base classes |
|
785 |
|
786 /** |
|
787 * From CCoeControl |
|
788 */ |
|
789 void SizeChanged(); |
|
790 |
|
791 /** |
|
792 * From CCoeControl |
|
793 */ |
|
794 void PositionChanged(); |
|
795 |
|
796 /** |
|
797 * From CCoeControl |
|
798 */ |
|
799 TInt CountComponentControls() const; |
|
800 |
|
801 /** |
|
802 * From CCoeControl |
|
803 */ |
|
804 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
805 |
|
806 /** |
|
807 * From CCoeControl |
|
808 */ |
|
809 void Draw( const TRect& aRect ) const; |
|
810 |
|
811 /** |
|
812 * From CCoeControl |
|
813 */ |
|
814 void HandleResourceChange( TInt aType ); |
|
815 |
|
816 /** |
|
817 * From CCoeControl |
|
818 */ |
|
819 void MakeVisible( TBool aVisible ); |
|
820 |
|
821 private: |
|
822 |
|
823 /** |
|
824 * 2nd phase constructor. |
|
825 */ |
|
826 void ConstructL( const CCoeControl& aContainer, |
|
827 const TRect& aRect, |
|
828 TBool aBigNEInIdle ); |
|
829 |
|
830 /** |
|
831 * Activates current place. Place's outlook will read info from header. |
|
832 */ |
|
833 void SetActivePlace( const CBubblePlace::TPhoneBubblePlace& aPlace , |
|
834 CBubbleHeader& aHeader ); |
|
835 |
|
836 /** |
|
837 * Finds header from call headers array. |
|
838 */ |
|
839 TBool FindHeader( |
|
840 const TBubbleId& aBubbleID, |
|
841 CBubbleHeader*& aHeader ) const; |
|
842 |
|
843 /* |
|
844 * Find header from active headers array |
|
845 */ |
|
846 TBool FindActiveHeader( |
|
847 const TBubbleId& aBubbleID, |
|
848 CBubbleHeader*& aHeader ) const; |
|
849 |
|
850 /** |
|
851 * Builds up expanded conference call |
|
852 */ |
|
853 void BuildExpandedConference(); |
|
854 |
|
855 /** |
|
856 * Buils bubbles without NE |
|
857 */ |
|
858 void BuildBubbles(); |
|
859 |
|
860 /** |
|
861 * Builds bubbles with NE |
|
862 */ |
|
863 void BuildBubblesWithNE(); |
|
864 |
|
865 /** |
|
866 * Builds bubbles for touch call handling. |
|
867 */ |
|
868 void BuildBubblesForTouch(); |
|
869 |
|
870 /** |
|
871 * Uses index to navigate through active headers. |
|
872 */ |
|
873 void FindNextDrawableHeader( TUint8& aIndex ); |
|
874 |
|
875 /* |
|
876 * Draw lines in expanded conference again. |
|
877 */ |
|
878 void UpdateConferenceRows( TRowNumber aRow1, TRowNumber aRow2 ); |
|
879 |
|
880 /** |
|
881 * Finds header by call state. |
|
882 */ |
|
883 TBool FindHeader( const TPhoneCallState& aCallState, |
|
884 CBubbleHeader*& aHeader ) const; |
|
885 |
|
886 /** |
|
887 * Builds main pane image from call object data. |
|
888 */ |
|
889 void BuildMainPaneImage(); |
|
890 |
|
891 /** |
|
892 * Reloads call object image. |
|
893 */ |
|
894 void ReloadCallObjectImage(); |
|
895 |
|
896 /** |
|
897 * DoLayoutCall1 (legacy) |
|
898 */ |
|
899 void DoLayoutCall1Bubbles(); |
|
900 |
|
901 /** |
|
902 * DoLayoutCall2 (call object bubbles) |
|
903 */ |
|
904 void DoLayoutCall2Bubbles(); |
|
905 |
|
906 /** |
|
907 * DoLayoutCall4 (touch) |
|
908 */ |
|
909 void DoLayoutCall4Bubbles( const TRect& aWindowPane ); |
|
910 |
|
911 /** |
|
912 * Start animations |
|
913 */ |
|
914 void StartAnimations(); |
|
915 |
|
916 /** |
|
917 * Creates video player and starts video playback. |
|
918 */ |
|
919 void CreateVideoPlayerAndPlay(); |
|
920 |
|
921 /** |
|
922 * Stops video playback and deletes video player. |
|
923 */ |
|
924 void StopAndDeleteVideoPlayer(); |
|
925 |
|
926 /** |
|
927 * Checks if initializing call exist. Returns ETrue if |
|
928 * initializing call exist otherwise EFalse. |
|
929 */ |
|
930 TBool InitializingCall() const; |
|
931 |
|
932 protected: // Data |
|
933 // ?one_line_short_description_of_data |
|
934 //?data_declaration; |
|
935 |
|
936 private: // Data |
|
937 // Is phone muted? |
|
938 TBool iIsMuted; |
|
939 // Muted icon (component control). |
|
940 CEikImage* iMutedImage; |
|
941 |
|
942 // Counter for Start-/EndChanges() |
|
943 TUint8 iIsReadyToDraw; |
|
944 |
|
945 // Array for the call infos |
|
946 CArrayPtrFlat<CBubbleCallHeader>* iCallHeaders; |
|
947 // Array for currently used calls |
|
948 CArrayPtrFlat<CBubbleHeader>* iActiveHeaders; |
|
949 // Info object for conference call. |
|
950 CBubbleConfHeader* iConfHeader; |
|
951 |
|
952 // Array for bubble places |
|
953 CArrayPtrFlat<CBubblePlace>* iBubblePlaces; |
|
954 // Shown bubbles (component control) |
|
955 CArrayPtrFlat<CBubblePlace>* iActivePlaces; |
|
956 |
|
957 // Number Entry (component control) |
|
958 CBubbleOutlookNumberEntry* iNumberEntry; |
|
959 |
|
960 // For getting the images. |
|
961 CBubbleImageManager* iImageManager; |
|
962 // For component pool |
|
963 CBubbleResourceManager* iResourceManager; |
|
964 // For customizable UI controls |
|
965 CBubbleCustomManager* iCustomManager; |
|
966 |
|
967 // Parent container |
|
968 const CCoeControl* iParentControl; |
|
969 |
|
970 // Pointer to the label buffer |
|
971 HBufC* iLabelBuf; |
|
972 |
|
973 // Handles number grouping |
|
974 CPNGNumberGrouping* iNumberGrouping; |
|
975 |
|
976 // Call object manager |
|
977 CBubbleCallObjectManager* iCallObjectManager; |
|
978 |
|
979 // Main pane control |
|
980 CBubbleMainPaneControl* iMainPaneControl; |
|
981 |
|
982 // Flag indicating change in call object |
|
983 TBool iCallObjectChanged; |
|
984 |
|
985 // Video control. |
|
986 CBubbleVideoController* iVideoController; |
|
987 enum TVideoFlags |
|
988 { |
|
989 EBMVideoSetAsRingTone = 1, |
|
990 EBMVideoBubbleActive = 2, |
|
991 EBMVideoPlayingVideo = 4, |
|
992 }; |
|
993 TInt iVideoFlags; |
|
994 |
|
995 // Configuration flags |
|
996 enum TConfigurationFlags |
|
997 { |
|
998 EBMCallObjectDisplay = 1, |
|
999 EBMBigNEInIdleState = 2, |
|
1000 EBMTouchCallhandling = 4 |
|
1001 }; |
|
1002 TInt iConfigFlags; |
|
1003 |
|
1004 // Touchpane object. |
|
1005 CBubbleTouchPane* iTouchPane; |
|
1006 |
|
1007 // Touchpane visibility. |
|
1008 TBool iTouchPaneSetVisible; |
|
1009 |
|
1010 // Layout variety that depend's on image size. |
|
1011 TInt iBottomImageVariety; |
|
1012 |
|
1013 TBool* iReserved2; |
|
1014 }; |
|
1015 |
|
1016 #endif // BUBBLEMANAGER_H |
|
1017 |
|
1018 // End of File |