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: A parameter class for setting call header information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TPHONECALLHEADERPARAM_H |
|
20 #define TPHONECALLHEADERPARAM_H |
|
21 |
|
22 //INCLUDES |
|
23 #include "mpeengineinfo.h" |
|
24 #include "tphonecmdparamcallheaderdata.h" |
|
25 |
|
26 //FORWARD |
|
27 class MPhoneStateMachine; |
|
28 class MPhoneCallHeaderManagerUtility; |
|
29 class TPhoneCmdParamCallHeaderData; |
|
30 |
|
31 /** |
|
32 * A parameter class for setting call header information. |
|
33 * |
|
34 * @since S60 v9.1 |
|
35 */ |
|
36 class TPhoneCallHeaderParam |
|
37 { |
|
38 public: // Constructors & destructors. |
|
39 |
|
40 /** |
|
41 * C++ constructor. |
|
42 */ |
|
43 TPhoneCallHeaderParam( |
|
44 MPhoneCallHeaderManagerUtility& aManagerUtility, |
|
45 MPhoneStateMachine& aStateMachine ); |
|
46 |
|
47 public: // New functions. |
|
48 |
|
49 /** |
|
50 * Sets info to outgoing call header. |
|
51 * @param aCallId - call id. |
|
52 * @param aWaitingCall - if call is waiting value is ETrue otherwise EFalse. |
|
53 * @param aVideoCall - if call is video value is ETrue otherwise EFalse. |
|
54 * @param aCallHeaderData - Call header parameter into which the text/picture |
|
55 * parameters will be set. |
|
56 */ |
|
57 void SetIncomingCallHeaderParamsL( |
|
58 const TInt aCallId, |
|
59 const TBool aWaitingCall, |
|
60 const TBool aVideoCall, |
|
61 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
62 /** |
|
63 * Sets info to outgoing call header. |
|
64 * @param aCallId - call id. |
|
65 * @param aCallHeaderData - Call header parameter into which the text/picture |
|
66 * parameters will be set. |
|
67 */ |
|
68 void SetOutgoingCallHeaderParamsL( |
|
69 const TInt aCallId, |
|
70 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
71 /** |
|
72 * Updates call header info. |
|
73 * NOTE: This method is used when state receives |
|
74 * EPEMessageRemotePartyInfoChanged from PhoneEngine. |
|
75 * |
|
76 * @param aCallId - call id. |
|
77 * @param aWaitingCall - if call is waiting value is ETrue otherwise EFalse. |
|
78 * @param aVideoCall - if call is video value is ETrue otherwise EFalse. |
|
79 * @param aCallHeaderData - Call header parameter into which the text/picture |
|
80 * parameters will be set. |
|
81 */ |
|
82 void UpdateCallHeaderInfoL( |
|
83 const TInt aCallId, |
|
84 const TBool aWaitingCall, |
|
85 const TBool aVideoCall, |
|
86 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
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 * Returns the set call header type. Used for constructing right type |
|
96 * of call bubble. |
|
97 */ |
|
98 TInt CallHeaderType() const; |
|
99 |
|
100 /** |
|
101 * Setter for divert indication showing in bubble. |
|
102 * @param aDivertIndication ETrue to show divert indication, |
|
103 * EFalse to not. Usually setting EFalse isn't necessary |
|
104 * as it's a default value in bubble creation. |
|
105 */ |
|
106 void SetDivertIndication( const TBool aDivertIndication ); |
|
107 |
|
108 /** |
|
109 * Return remote info data |
|
110 * @return True if secondary CLI is used |
|
111 * @param aCallid call id |
|
112 * @param aData the returned remote info data |
|
113 */ |
|
114 TBool GetRemoteInfoDataL( |
|
115 const TInt aCallId, |
|
116 TDes& aData ) const; |
|
117 |
|
118 /** |
|
119 * Sets texts for voice call header. |
|
120 * @param aCallId - Call Id. |
|
121 * @param aWaitingCall - Waiting call indication. |
|
122 * @param aCallHeaderData - Call header parameter into which the text |
|
123 * will be set. |
|
124 */ |
|
125 void SetCallHeaderTexts( |
|
126 const TInt aCallId, |
|
127 const TBool aWaitingCall, |
|
128 const TBool aVideoCall, |
|
129 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
130 |
|
131 private: |
|
132 |
|
133 |
|
134 |
|
135 /** |
|
136 * Set basic info to call header. |
|
137 * @param aCallId - call id. |
|
138 * @param aCallHeaderData - Call header parameter into which the text/picture |
|
139 * parameters will be set. |
|
140 */ |
|
141 void SetBasicCallHeaderParamsL( |
|
142 const TInt aCallId, |
|
143 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
144 |
|
145 /** |
|
146 * Sets divert indication to call header if necessary |
|
147 * @param aCallId - Call Id. |
|
148 * @param aCallHeaderData - Call header where indication will be set |
|
149 * if needed. |
|
150 */ |
|
151 void SetDivertIndicatorToCallHeader( |
|
152 const TInt aCallId, |
|
153 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
154 |
|
155 /** |
|
156 * Sets divert indication to call header if necessary |
|
157 * @param aFeatureKey - feature key id Id. |
|
158 * @param aCallId - Call Id. |
|
159 */ |
|
160 TBool IsFeatureSupported( |
|
161 const TInt aFeatureKey, |
|
162 const TInt aCallId ) const; |
|
163 |
|
164 /** |
|
165 * Return CNAP (Calling Name Presentation) text |
|
166 * @param aCallid call id |
|
167 * @param aData the returned CNAP text |
|
168 * @param aDirection the returned CNAP clipping direction |
|
169 */ |
|
170 void GetCNAPText( |
|
171 const TInt aCallId, |
|
172 TDes& aData, |
|
173 TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection& aDirection ) const; |
|
174 |
|
175 /** |
|
176 * Check if contact is available(RemoteName or RemoteCompanyName), |
|
177 * if available ETrue is returned otherwise EFalse. |
|
178 * @param aCallid call id |
|
179 */ |
|
180 TBool ContactInfoAvailable( |
|
181 const TInt aCallId ) const; |
|
182 |
|
183 /** |
|
184 * Returns call type and stores type to member variable. |
|
185 * @param aCallId - Call Id. |
|
186 * @param aCallHeaderData - Call header data. |
|
187 */ |
|
188 TPECallType GetCallType( |
|
189 const TInt aCallId, |
|
190 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
191 |
|
192 /** |
|
193 * Sets caller image. |
|
194 * @param aCallId - Call Id. |
|
195 * @param aCallHeaderData - Call header parameter where modifications |
|
196 * are made. |
|
197 */ |
|
198 void SetCallerImage( |
|
199 const TInt aCallId, |
|
200 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
201 |
|
202 /** |
|
203 * Updates cli and cnap parameters to call header. |
|
204 * @param aCallId - Call Id. |
|
205 * @param aCallHeaderData - Call header parameter where modifications |
|
206 * are made. |
|
207 */ |
|
208 void SetCliAndCnapParamatersL( |
|
209 const TInt aCallId, |
|
210 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
211 /** |
|
212 * Updates cli parameter to call header. |
|
213 * @param aCallId - Call Id. |
|
214 * @param aCallHeaderData - Call header parameter where modifications |
|
215 * are made. |
|
216 */ |
|
217 void SetCliParamatersL( |
|
218 const TInt aCallId, |
|
219 TPhoneCmdParamCallHeaderData* aCallHeaderData ); |
|
220 |
|
221 private: |
|
222 |
|
223 MPhoneCallHeaderManagerUtility& iManagerUtility; |
|
224 MPhoneStateMachine& iStateMachine; |
|
225 TInt iCallHeaderType; |
|
226 TBool iSetDivertIndication; |
|
227 |
|
228 }; |
|
229 |
|
230 #endif // TPHONECALLHEADERPARAM_H |
|