|
1 /* |
|
2 * Copyright (c) 2008 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: Manages default implementations for customizable elements. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_BUBBLEDEFAULTMANAGER_H |
|
20 #define C_BUBBLEDEFAULTMANAGER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "BMBubbleManager.h" |
|
24 #include "telbubblecustomelement.h" |
|
25 |
|
26 class CBubbleHeader; |
|
27 |
|
28 /** |
|
29 * Customization manager. |
|
30 * |
|
31 * @lib BubbleManager.lib |
|
32 * @since S60 5.0 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CBubbleDefaultManager ) : public CBase |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param ?arg1 ?description |
|
40 * @param ?arg2 ?description |
|
41 */ |
|
42 static CBubbleDefaultManager* NewL( CBubbleManager& aBubbleManager ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CBubbleDefaultManager(); |
|
48 |
|
49 /** |
|
50 * Reserves big call indicator element. |
|
51 * |
|
52 * @since S60 5.0 |
|
53 * @param aHeader Bubble header. |
|
54 * @return Element instance. |
|
55 */ |
|
56 CTelBubbleCustomElement* ReserveBigCallIndicatorElement( |
|
57 const CBubbleHeader& aHeader ); |
|
58 |
|
59 /** |
|
60 * Reserves number type icon element. |
|
61 * |
|
62 * @since S60 5.0 |
|
63 * @param aHeader Bubble header. |
|
64 * @return Element instance. |
|
65 */ |
|
66 CTelBubbleCustomElement* ReserveNumberTypeIconElement( |
|
67 const CBubbleHeader& aHeader ); |
|
68 |
|
69 /** |
|
70 * Reserves small call indicator element. |
|
71 * |
|
72 * @since S60 5.0 |
|
73 * @param aHeader Bubble header. |
|
74 * @return Element instance. |
|
75 */ |
|
76 CTelBubbleCustomElement* ReserveSmallCallIndicatorElement( |
|
77 const CBubbleHeader& aHeader ); |
|
78 |
|
79 /** |
|
80 * Reserves call image element. |
|
81 * |
|
82 * @since S60 5.0 |
|
83 * @param aHeader Bubble header. |
|
84 * @return Element instance. |
|
85 */ |
|
86 CTelBubbleCustomElement* ReserveCallImageElement( |
|
87 const CBubbleHeader& aHeader ); |
|
88 |
|
89 /** |
|
90 * Releases default element. |
|
91 * |
|
92 * @since S60 5.0 |
|
93 * @param aElement Released element. |
|
94 */ |
|
95 void ReleaseElement( CTelBubbleCustomElement*& aElement ); |
|
96 |
|
97 private: |
|
98 // Default implementations |
|
99 enum TBubbleDefaultElements |
|
100 { |
|
101 EBMDefaultCallStatusIndiBig, |
|
102 EBMDefaultCallStatusIndiSmall, |
|
103 EBMDefaultCallStatusAnimBig, |
|
104 EBMDefaultCallStatusAnimSmall, |
|
105 EBMDefaultNumberTypeIcon, |
|
106 EBMDefaultCallImageControl |
|
107 }; |
|
108 |
|
109 private: |
|
110 CBubbleDefaultManager( CBubbleManager& aBubbleManager ); |
|
111 void ConstructL(); |
|
112 CTelBubbleCustomElement* ReserveElement( TBubbleDefaultElements aType ); |
|
113 |
|
114 private: // data |
|
115 CBubbleManager& iBubbleManager; |
|
116 |
|
117 // default elements |
|
118 typedef CArrayPtrFlat<CTelBubbleCustomElement> CSingleElement; |
|
119 // array of max elements |
|
120 RArray<TUint> iMaxAmounts; |
|
121 // array of resource arrays |
|
122 CArrayPtrFlat<CSingleElement>* iElements; |
|
123 // array of info about usage |
|
124 RArray<TUint> iAvailabilities; |
|
125 }; |
|
126 |
|
127 #endif // C_BUBBLEDEFAULTMANAGER_H |