37
|
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 |
* @param aCallid call id
|
|
111 |
* @param aData the returned remote info data
|
|
112 |
*/
|
|
113 |
void GetRemoteInfoDataL(
|
|
114 |
const TInt aCallId,
|
|
115 |
TDes& aData ) const;
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Sets texts for voice call header.
|
|
119 |
* @param aCallId - Call Id.
|
|
120 |
* @param aWaitingCall - Waiting call indication.
|
|
121 |
* @param aCallHeaderData - Call header parameter into which the text
|
|
122 |
* will be set.
|
|
123 |
*/
|
|
124 |
void SetCallHeaderTexts(
|
|
125 |
const TInt aCallId,
|
|
126 |
const TBool aWaitingCall,
|
|
127 |
const TBool aVideoCall,
|
|
128 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
129 |
|
|
130 |
private:
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
/**
|
|
135 |
* Set basic info to call header.
|
|
136 |
* @param aCallId - call id.
|
|
137 |
* @param aCallHeaderData - Call header parameter into which the text/picture
|
|
138 |
* parameters will be set.
|
|
139 |
*/
|
|
140 |
void SetBasicCallHeaderParamsL(
|
|
141 |
const TInt aCallId,
|
|
142 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
143 |
|
|
144 |
/**
|
|
145 |
* Sets divert indication to call header if necessary
|
|
146 |
* @param aCallId - Call Id.
|
|
147 |
* @param aCallHeaderData - Call header where indication will be set
|
|
148 |
* if needed.
|
|
149 |
*/
|
|
150 |
void SetDivertIndicatorToCallHeader(
|
|
151 |
const TInt aCallId,
|
|
152 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Sets divert indication to call header if necessary
|
|
156 |
* @param aFeatureKey - feature key id Id.
|
|
157 |
* @param aCallId - Call Id.
|
|
158 |
*/
|
|
159 |
TBool IsFeatureSupported(
|
|
160 |
const TInt aFeatureKey,
|
|
161 |
const TInt aCallId ) const;
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Return CNAP (Calling Name Presentation) text
|
|
165 |
* @param aCallid call id
|
|
166 |
* @param aData the returned CNAP text
|
|
167 |
* @param aDirection the returned CNAP clipping direction
|
|
168 |
*/
|
|
169 |
void GetCNAPText(
|
|
170 |
const TInt aCallId,
|
|
171 |
TDes& aData,
|
|
172 |
TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection& aDirection ) const;
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Check if contact is available(RemoteName or RemoteCompanyName),
|
|
176 |
* if available ETrue is returned otherwise EFalse.
|
|
177 |
* @param aCallid call id
|
|
178 |
*/
|
|
179 |
TBool ContactInfoAvailable(
|
|
180 |
const TInt aCallId ) const;
|
|
181 |
|
|
182 |
/**
|
|
183 |
* Returns call type and stores type to member variable.
|
|
184 |
* @param aCallId - Call Id.
|
|
185 |
* @param aCallHeaderData - Call header data.
|
|
186 |
*/
|
|
187 |
TPECallType GetCallType(
|
|
188 |
const TInt aCallId,
|
|
189 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
190 |
|
|
191 |
/**
|
|
192 |
* Sets caller image.
|
|
193 |
* @param aCallId - Call Id.
|
|
194 |
* @param aCallHeaderData - Call header parameter where modifications
|
|
195 |
* are made.
|
|
196 |
*/
|
|
197 |
void SetCallerImage(
|
|
198 |
const TInt aCallId,
|
|
199 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
200 |
|
|
201 |
/**
|
|
202 |
* Updates cli and cnap parameters to call header.
|
|
203 |
* @param aCallId - Call Id.
|
|
204 |
* @param aCallHeaderData - Call header parameter where modifications
|
|
205 |
* are made.
|
|
206 |
*/
|
|
207 |
void SetCliAndCnapParamatersL(
|
|
208 |
const TInt aCallId,
|
|
209 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
210 |
/**
|
|
211 |
* Updates cli parameter to call header.
|
|
212 |
* @param aCallId - Call Id.
|
|
213 |
* @param aCallHeaderData - Call header parameter where modifications
|
|
214 |
* are made.
|
|
215 |
*/
|
|
216 |
void SetCliParamatersL(
|
|
217 |
const TInt aCallId,
|
|
218 |
TPhoneCmdParamCallHeaderData* aCallHeaderData );
|
|
219 |
|
|
220 |
/**
|
|
221 |
* Check if call is private or payphone number. If call is
|
|
222 |
* Private/PayPhone call then IsCallPrivateOrPayPhone will
|
|
223 |
* set SetIdentitySpecificCallHeaderData parameters.
|
|
224 |
*
|
|
225 |
* @param aCallId Call id.
|
|
226 |
* @return ETrue if call is private or payphone number.
|
|
227 |
*/
|
|
228 |
TBool IsCallPrivateOrPayPhone( const TInt aCallId, TDes& aData ) const;
|
|
229 |
|
|
230 |
/**
|
|
231 |
* Sets identity specific call header text.
|
|
232 |
*
|
|
233 |
* @param aCallId Call id.
|
|
234 |
* @param aData Identity specific call header text data.
|
|
235 |
*/
|
|
236 |
void SetIdentitySpecificCallHeaderData( const TInt aCallId, TDes& aData ) const;
|
|
237 |
|
|
238 |
/**
|
|
239 |
* Concludes does the engine have information of the
|
|
240 |
* phone number. This information is then send to the view.
|
|
241 |
* @param aNumberLength - phone number's length
|
|
242 |
* @param aContactInfoAvailable - is contact's info available
|
|
243 |
*/
|
|
244 |
void SetPhoneNumberAvailabilityL(
|
|
245 |
const TInt aNumberLength,
|
|
246 |
const TBool aContactInfoAvailable );
|
|
247 |
|
|
248 |
private:
|
|
249 |
|
|
250 |
MPhoneCallHeaderManagerUtility& iManagerUtility;
|
|
251 |
MPhoneStateMachine& iStateMachine;
|
|
252 |
TInt iCallHeaderType;
|
|
253 |
TBool iSetDivertIndication;
|
|
254 |
|
|
255 |
};
|
|
256 |
|
|
257 |
#endif // TPHONECALLHEADERPARAM_H
|