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: Bubble manager wrapper. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHONECALLHEADERMANAGER_H |
|
20 #define CPHONECALLHEADERMANAGER_H |
|
21 |
|
22 //INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "mphonecallheadermanagerutility.h" |
|
25 #include "mphonestatemachine.h" |
|
26 #include "mphoneviewcommandhandle.h" |
|
27 #include "mphonecustomization.h" |
|
28 |
|
29 class TPhoneCmdParamCallHeaderData; |
|
30 class TPhoneCallHeaderParam; |
|
31 |
|
32 /** |
|
33 * Class contains helper functions for bubble manager. |
|
34 * |
|
35 * @lib phoneuicontrol |
|
36 * @since S60 v9.1 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CPhoneCallHeaderManager ) : public CBase, |
|
39 public MPhoneCallHeaderManagerUtility |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Creates new instance of CPhoneCallHeaderManager |
|
45 * @param aStateMachine: a state machine |
|
46 * @param aViewCommandHandle: handle to the PhoneUIView |
|
47 * @param aCustomization: handle to customization. |
|
48 * @return CPhoneCallHeaderManager* object |
|
49 */ |
|
50 static CPhoneCallHeaderManager* NewL( |
|
51 MPhoneViewCommandHandle& aViewCommandHandle, |
|
52 MPhoneStateMachine& aStateMachine, |
|
53 MPhoneCustomization* aCustomization ); |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CPhoneCallHeaderManager(); |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Returns updated remote information data. |
|
63 * @param aCallId - Call Id. |
|
64 */ |
|
65 TPhoneCmdParamCallHeaderData UpdateCallHeaderInfoL( |
|
66 const TInt aCallId ); |
|
67 |
|
68 void GetRemoteInfoDataL( const TInt aCallId, TDes& aData ) const; |
|
69 |
|
70 /** |
|
71 * Display call header for call coming in ( the remote info data |
|
72 * and picture is displayed immediately ) |
|
73 * @param aCallid call id |
|
74 * @param aWaitingCall waiting call indication |
|
75 */ |
|
76 void DisplayHeaderForCallComingInL( |
|
77 const TInt aCallId, |
|
78 const TBool aWaitingCall ); |
|
79 |
|
80 /** |
|
81 * Display call header for outgoing call (the phone number is initially |
|
82 * displayed) |
|
83 * @param aCallid call id |
|
84 */ |
|
85 void DisplayHeaderForOutgoingCallL( |
|
86 const TInt aCallId ); |
|
87 |
|
88 /** |
|
89 * Sets the call header type used in the call bubble. |
|
90 * @param aCallHeaderType, call header type. |
|
91 */ |
|
92 void SetCallHeaderType( |
|
93 TInt aCallHeaderType ); |
|
94 |
|
95 /** |
|
96 * Returns the set call header type. |
|
97 */ |
|
98 TInt CallHeaderType() const; |
|
99 |
|
100 /** |
|
101 * Sets divert indication to call header if necessary |
|
102 * @param aCallId - Call Id. |
|
103 * @param aCallHeaderData - Call header where indication will be set |
|
104 * if needed. |
|
105 */ |
|
106 void SetDivertIndication( const TBool aDivertIndication ); |
|
107 |
|
108 /** |
|
109 * Checks if call is waiting, returns ETrue if call is waiting |
|
110 * otherwise EFalse. |
|
111 * @param aCallId, call id. |
|
112 */ |
|
113 TBool IsWaitingCallL( const TInt aCallId ) const; |
|
114 |
|
115 /** |
|
116 * Checks if call is video, returns ETrue if call is video |
|
117 * otherwise EFalse. |
|
118 * @param aCallId, call id. |
|
119 */ |
|
120 TBool IsVideoCall( const TInt aCallId ) const; |
|
121 |
|
122 /** |
|
123 * Sets texts to call header |
|
124 * @param aCallId - Call Id. |
|
125 * @param aWaitingCall waiting call indication |
|
126 * @param aCallHeaderData - Call header where indication will be set |
|
127 * if needed. |
|
128 */ |
|
129 void SetCallHeaderTextsForCallComingIn( |
|
130 const TInt aCallId, |
|
131 const TBool aWaitingCall, |
|
132 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
133 |
|
134 public: // Functions from base class |
|
135 |
|
136 /** |
|
137 * @see MPhoneBubbleManagerUtility. |
|
138 */ |
|
139 void SetPhoneNumberAvailabilityL( |
|
140 const TInt aNumberLength, |
|
141 const TBool aContactInfoAvailable ); |
|
142 |
|
143 /** |
|
144 * @see MPhoneBubbleManagerUtility. |
|
145 */ |
|
146 void GetInCallNumberTextL( TInt aCallId, TDes& aData ) const; |
|
147 |
|
148 /** |
|
149 * @see MPhoneBubbleManagerUtility. |
|
150 */ |
|
151 void LoadCallHeaderTexts( |
|
152 const TInt aLabelId, |
|
153 const TInt aShortLabelId, |
|
154 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
155 |
|
156 /** |
|
157 * @see MPhoneBubbleManagerUtility. |
|
158 */ |
|
159 MPhoneCustomization* Customization(){ return iCustomization; } |
|
160 |
|
161 /** |
|
162 * @see MPhoneBubbleManagerUtility. |
|
163 */ |
|
164 void LoadResource( TDes& aData, const TInt aResource ); |
|
165 |
|
166 private: |
|
167 |
|
168 /** |
|
169 * C++ default constructor. |
|
170 */ |
|
171 CPhoneCallHeaderManager( |
|
172 MPhoneViewCommandHandle& aViewCommandHandle, |
|
173 MPhoneStateMachine& aStateMachine, |
|
174 MPhoneCustomization* aCustomization ); |
|
175 |
|
176 /** |
|
177 * Symbian constructor |
|
178 */ |
|
179 void ConstructL(); |
|
180 |
|
181 private: |
|
182 |
|
183 MPhoneViewCommandHandle& iViewCommandHandle; |
|
184 MPhoneStateMachine& iStateMachine; |
|
185 MPhoneCustomization* iCustomization; |
|
186 TPhoneCallHeaderParam* iCallHeaderParam; |
|
187 }; |
|
188 |
|
189 |
|
190 #endif // CPHONECALLHEADERMANAGER_H |
|