74
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 PHONECALLHEADERUTIL_H
|
|
20 |
#define PHONECALLHEADERUTIL_H
|
|
21 |
|
|
22 |
//INCLUDES
|
|
23 |
#include "mpeengineinfo.h"
|
|
24 |
|
|
25 |
//FORWARD
|
|
26 |
class MPEEngineInfo;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* A parameter class for setting call header information.
|
|
30 |
*
|
|
31 |
* @since S60 v10.1
|
|
32 |
*/
|
|
33 |
class PhoneCallHeaderUtil
|
|
34 |
{
|
|
35 |
public: // Constructors & destructors.
|
76
|
36 |
|
|
37 |
enum ClippingDirection
|
|
38 |
{
|
|
39 |
ERight = 0,
|
|
40 |
ELeft
|
|
41 |
};
|
|
42 |
|
74
|
43 |
/**
|
|
44 |
* C++ constructor.
|
|
45 |
*/
|
|
46 |
PhoneCallHeaderUtil( MPEEngineInfo& engineInfo );
|
|
47 |
|
|
48 |
virtual ~PhoneCallHeaderUtil();
|
|
49 |
|
|
50 |
public: // New functions.
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Returns the call header label text
|
|
54 |
* @return Returns the label
|
|
55 |
*/
|
|
56 |
const TDesC& LabelText( TInt aCallId );
|
|
57 |
|
76
|
58 |
/**
|
|
59 |
* Gets the call cli texts.
|
|
60 |
*/
|
|
61 |
void GetCliTexts(
|
|
62 |
TInt aCallId,
|
|
63 |
TDes& aCliText,
|
|
64 |
ClippingDirection &aCliClip,
|
|
65 |
TDes& aSecondaryCliText,
|
|
66 |
ClippingDirection &aSecondaryCliClip );
|
74
|
67 |
|
76
|
68 |
/**
|
|
69 |
* Gets the cli text.
|
|
70 |
* @return Returns cli text.
|
|
71 |
*/
|
|
72 |
void GetCli( TInt aCallId, TDes& aCliText,
|
|
73 |
ClippingDirection &aClipping );
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Gets the secondary cli text.
|
|
77 |
*/
|
|
78 |
void GetSecondaryCli( TInt aCallId,
|
|
79 |
TDes& aSecondaryCliText,
|
|
80 |
ClippingDirection &aClipping );
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Remote phone number.
|
|
84 |
* @return Phone number for remote end.
|
|
85 |
*/
|
|
86 |
const TDesC& RemotePhoneNumber( TInt aCallId ) const;
|
74
|
87 |
|
|
88 |
/**
|
76
|
89 |
* Returns the call type.
|
|
90 |
* @return Returns call type.
|
|
91 |
*/
|
|
92 |
TInt CallType( const TInt aCallId );
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Returns service id.
|
|
96 |
* @return Returns service id.
|
|
97 |
*/
|
|
98 |
TInt ServiceId( const TInt aCallId );
|
|
99 |
|
|
100 |
/**
|
|
101 |
* Returns flag is the call forwarded.
|
|
102 |
* @return Returns is forwarded.
|
|
103 |
*/
|
|
104 |
TBool IsCallForwarded( TInt aCallId );
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Returns secure specified status.
|
|
108 |
* @return Returns secure specified status.
|
|
109 |
*/
|
|
110 |
TBool SecureSpecified();
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Returns ciphering status.
|
|
114 |
* @return Returns ciphering status.
|
|
115 |
*/
|
|
116 |
TBool Ciphering( TInt aCallId );
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Returns the call state.
|
74
|
120 |
* @return Returns the call state
|
|
121 |
*/
|
|
122 |
TInt CallState( TInt aCallId ) const;
|
|
123 |
|
|
124 |
/**
|
76
|
125 |
* Returns the caller image.
|
|
126 |
* @return Returns the caller image.
|
|
127 |
*/
|
|
128 |
const TDesC& CallerImage( const TInt aCallId );
|
|
129 |
|
74
|
130 |
/**
|
76
|
131 |
* Returns emergency call header text.
|
|
132 |
* @return Returns emergency call header text.
|
|
133 |
*/
|
|
134 |
const TDesC& EmergencyHeaderText();
|
74
|
135 |
|
|
136 |
/**
|
76
|
137 |
* Returns emergency call label text.
|
|
138 |
* @return Returns emergency call label text.
|
|
139 |
*/
|
|
140 |
const TDesC& AttemptingEmergencyText();
|
74
|
141 |
|
|
142 |
/**
|
76
|
143 |
* Check if the call is video call.
|
|
144 |
* @param aCallid call id
|
74
|
145 |
*/
|
76
|
146 |
TBool IsVoiceCall(TInt aCallId) const;
|
|
147 |
|
74
|
148 |
/**
|
76
|
149 |
* Check if the call is video call.
|
|
150 |
* @param aCallid call id
|
74
|
151 |
*/
|
|
152 |
TBool IsVideoCall(int aCallId ) const;
|
|
153 |
|
|
154 |
private:
|
|
155 |
|
76
|
156 |
/**
|
|
157 |
* Sets label text for incoming call.
|
|
158 |
* @param aCallId - Call Id.
|
|
159 |
*/
|
|
160 |
void SetCallHeaderLabelTextForRingingCall( TInt aCallId );
|
|
161 |
|
|
162 |
/**
|
|
163 |
* Check if remote name info is available
|
|
164 |
* (RemoteName, RemotePartyName or RemoteCompanyName),
|
|
165 |
* if available ETrue is returned otherwise EFalse.
|
|
166 |
* @param aCallid call id
|
|
167 |
*/
|
|
168 |
TBool RemoteNameAvailable( const TInt aCallId ) const;
|
|
169 |
|
|
170 |
/**
|
|
171 |
* Gets remote info data
|
|
172 |
* @param aCallid call id
|
|
173 |
* @param aData the returned remote info data
|
|
174 |
*/
|
|
175 |
void GetRemoteInfoData(
|
|
176 |
const TInt aCallId,
|
|
177 |
TDes& aData ) const;
|
|
178 |
|
|
179 |
/**
|
|
180 |
* Checks is the secondary cli allowed for the call.
|
|
181 |
* @param aCallid call id
|
|
182 |
* @return ETrue if allowed to show the secondary cli.
|
|
183 |
*/
|
|
184 |
TBool IsSecondaryCliAllowed( TInt aCallId );
|
|
185 |
|
|
186 |
/**
|
|
187 |
* Check if the call is waiting call.
|
|
188 |
* @param aCallid call id
|
|
189 |
*/
|
|
190 |
TBool IsWaitingCall(int callId) const;
|
|
191 |
|
|
192 |
/**
|
|
193 |
* Loads resource text.
|
|
194 |
* @return Returns loaded text.
|
|
195 |
*/
|
|
196 |
HBufC* LoadResource( const TInt aResource ) const;
|
|
197 |
|
|
198 |
/**
|
|
199 |
* Loads recource text.
|
|
200 |
*/
|
|
201 |
void LoadResource( TDes& aData, const TInt aResource ) const;
|
|
202 |
|
|
203 |
private:
|
|
204 |
|
74
|
205 |
MPEEngineInfo& m_engineInfo;
|
|
206 |
HBufC *iLabelText;
|
76
|
207 |
HBufC *iCliText;
|
|
208 |
HBufC *iSecondaryCliText;
|
|
209 |
HBufC *iCallerImage;
|
74
|
210 |
HBufC *iEmergencyHeaderText;
|
|
211 |
HBufC *iAttemptingEmergencyText;
|
|
212 |
|
|
213 |
};
|
|
214 |
|
|
215 |
#endif // PHONECALLHEADERUTIL_H
|