author | hgs |
Fri, 03 Sep 2010 13:33:36 +0300 | |
changeset 65 | 2a5d4ab426d3 |
parent 46 | bc5a64e5bc3c |
child 51 | f39ed5e045e0 |
child 74 | d1c62c765e48 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2005-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: This file defines the protocol independent interface of the Phone Engine. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef PEVIRTUALENGINE_H |
|
19 |
#define PEVIRTUALENGINE_H |
|
20 |
||
21 |
// INCLUDES |
|
22 |
#include <badesca.h> |
|
23 |
#include <bldvariant.hrh> //protocol definition, component configuration definitions |
|
24 |
#include <cphcntcontactid.h> |
|
25 |
#include <ctsydomainpskeys.h> |
|
26 |
#include <etelmm.h> |
|
27 |
#include <exterror.h> |
|
28 |
#include <fbs.h> |
|
29 |
#include <mccecall.h> |
|
30 |
#include <mmtsy_names.h> |
|
31 |
#include <networkhandlingdomainpskeys.h> |
|
32 |
#include <phclttypes.h> |
|
33 |
#include <Profile.hrh> |
|
34 |
#include <rmmcustomapi.h> |
|
35 |
#include <rsssettings.h> |
|
36 |
#include <sysutil.h> |
|
37 |
||
38 |
||
39 |
// CONSTANTS |
|
40 |
||
41 |
//Call origin types |
|
42 |
enum TPECallOrigin |
|
43 |
{ |
|
44 |
EPECallOriginPhone, |
|
45 |
EPECallOriginClient, |
|
46 |
EPECallOriginSAT |
|
47 |
}; |
|
48 |
||
49 |
//Output types |
|
50 |
enum TPEAudioOutput |
|
51 |
{ |
|
52 |
EPENotActive, |
|
53 |
EPEHandset, |
|
54 |
EPELoudspeaker, |
|
55 |
EPEWiredAudioAccessory, |
|
56 |
EPEBTAudioAccessory, |
|
57 |
EPETTY |
|
58 |
}; |
|
59 |
||
60 |
//Error types |
|
61 |
enum TPEErrorType |
|
62 |
{ |
|
63 |
EPECcp = 0, |
|
64 |
EPECch |
|
65 |
}; |
|
66 |
||
67 |
// PhoneEngine Errors |
|
68 |
const TInt KErrPhoneEngineErrorBase = -30000; |
|
69 |
const TInt KErrPhoneEngineNoWcdmaNetwork = KErrPhoneEngineErrorBase - 1; |
|
70 |
const TInt KErrPhoneEngineVideoCallNotAllowedDuringRestore = KErrPhoneEngineErrorBase - 2; |
|
71 |
const TInt KErrPhoneEngineVideoCallSetupFailed = KErrPhoneEngineErrorBase - 3; |
|
72 |
||
73 |
// Phone Engine dll uid |
|
74 |
const TUid KUidPhoneEngine = { 0x1000A86C }; |
|
75 |
||
76 |
// Maximum length of phone number |
|
77 |
const TInt KPEPhoneNumberMaxLength = 100; |
|
78 |
//Phone number type defined using the custom maximum length |
|
79 |
typedef TBuf<KPEPhoneNumberMaxLength> TPEPhoneNumber; |
|
80 |
//Maximum length of dtmf string |
|
81 |
const TInt KPEDtmfMaxLength = KPEPhoneNumberMaxLength; |
|
82 |
||
83 |
//Maximum number of the SS service groups |
|
84 |
const TInt KPEMaxServiceGroup = 53; // Maximum value taken from etelmm.h(TMobileService) |
|
85 |
||
86 |
const TInt KPEAutomaticAnswerTimeout = 5000000; // 5 seconds; |
|
87 |
||
88 |
// Enumerations for variant messages |
|
89 |
// For enumeration TPEMessagesToPhoneEngine |
|
90 |
const TInt KPEMessagesToPhoneEngineGsmFirst = 11000; |
|
91 |
const TInt KPEMessagesToPhoneEngineGsmLast = 12999; |
|
92 |
const TInt KPEMessagesToPhoneEngineVariantFirst = KPEMessagesToPhoneEngineGsmFirst; |
|
93 |
||
94 |
// For enumeration TPEMessagesFromPhoneEngine |
|
95 |
const TInt KPEMessagesFromPhoneEngineGsmFirst = 11000; |
|
96 |
const TInt KPEMessagesFromPhoneEngineGsmLast = 12999; |
|
97 |
const TInt KPEMessagesFromPhoneEngineVariantFirst = KPEMessagesFromPhoneEngineGsmFirst; |
|
98 |
||
99 |
// Used when initializing number variables with non negative value range. |
|
100 |
const TInt KPENumberInitValue = -1; |
|
101 |
//CallId not used in SendErrorMessageL |
|
102 |
const TInt KPECallIdNotUsed = -1; |
|
103 |
//ErrorCode not used in SendErrorMessageL |
|
104 |
const TInt KPEErrorCodeNotUsed = -1; |
|
105 |
// Informs to phone engine that dont send message to the phone application |
|
106 |
const TInt KPEDontSendMessage = 1; |
|
107 |
||
108 |
// Maximum lenght of timer |
|
109 |
const TInt KPESsTimerMaxLength = 2; |
|
110 |
||
111 |
// Audio player repeats tone forever |
|
112 |
const TInt KPEAudioPlayerRepeatForever = -2; |
|
113 |
// Default Audio volume value |
|
114 |
const TInt KPEDefaultAudioVolume = 7; |
|
115 |
// Default volume value for accessory |
|
116 |
const TInt KPEDefaultAccessoryVolume = 5; |
|
117 |
// Default keypad volume |
|
118 |
const TProfileKeypadVolume KPEDefaultKeypadVolume = EProfileKeypadVolumeLevel2; |
|
119 |
||
120 |
// Dtmf stop character, PE handles internally DTMF characters as lowercase. |
|
121 |
const TUint KPEDtmfStopCharLowercase = 'w'; |
|
122 |
const TUint KPEDtmfStopCharUppercase = 'W'; |
|
123 |
const TUint KPEDtmfPauseCharLowercase = 'p'; |
|
124 |
const TUint KPEDtmfPauseCharUppercase = 'P'; |
|
125 |
const TUint KPEDtmfPlusChar = '+'; |
|
126 |
||
127 |
enum TPELoggingIndicator |
|
128 |
{ |
|
129 |
EPENormalLogging = 0, |
|
130 |
EPEContinuousLogging |
|
131 |
}; |
|
132 |
||
133 |
// Maximum Length of profile name |
|
134 |
const TInt KPEProfileNameLength = 64; |
|
135 |
// Profile is alerting all incoming calls. |
|
136 |
_LIT( KPEAlertForAllCalls, "1"); |
|
137 |
// Informs how many profiles there are |
|
138 |
const TInt KPEProfileGroups = 3; |
|
139 |
// Informs how much time it take's to change ringing tone volume from minimum to maximum(Ascending) |
|
140 |
const TInt KPERingingToneRampDuration = 5000000; |
|
141 |
// Informs how many ringing tone volume levels there are in the profile db |
|
142 |
const TInt KPEProfileRingingToneLevels = 10; |
|
143 |
// Includes default tone volume |
|
144 |
const TInt KPEDefaultToneVolume = 30000; |
|
145 |
// Contact group id string length |
|
146 |
const TInt KPEContactGroupString = 100; |
|
147 |
||
148 |
//The length of a pause created during dialling by the comma character (',') measured in seconds. |
|
149 |
const TUint KPEDefaultInterval = 2; |
|
150 |
||
151 |
// CommDB constants for Data calls |
|
152 |
// Internet Access Point service type |
|
153 |
_LIT( KPEIAPServiceTypeName, "IAP\\IAPServiceType" ); |
|
154 |
// Dial Out Internet Serivce Provider Table name |
|
155 |
_LIT( KPEIAPDialOutISPTableName, "DialOutISP" ); |
|
156 |
// Dial In Internet Service Provider Table name |
|
157 |
_LIT( KPEIAPDialInISPTableName, "DialInISP" ); |
|
158 |
// Access Point Name column on IAP table |
|
159 |
_LIT( KPEIAPAccessPointName, "IAP\\NAME" ); |
|
160 |
||
161 |
const TInt KPEMaxAudioOutputs = EPETTY + 1; // enum count |
|
162 |
||
163 |
// DATA TYPES |
|
164 |
||
165 |
// Contact name definition |
|
166 |
typedef TBuf<KCntMaxTextFieldLength> TPEContactName; |
|
167 |
// Contact company definition |
|
168 |
typedef TBuf<KCntMaxTextFieldLength> TPEContactCompany; |
|
169 |
// Contact group definition |
|
170 |
typedef TBuf<KCntMaxTextFieldLength> TPEContactGroup; |
|
171 |
// Contact filename definition |
|
172 |
typedef TBuf<KMaxFileName> TPEContactFileName; |
|
173 |
// Contact group ids sting |
|
174 |
typedef TBuf<KPEContactGroupString> TPEContactGroupId; |
|
175 |
//Dtmf-string definition |
|
176 |
typedef TBuf<KPEDtmfMaxLength> TPEDtmfString; |
|
177 |
//Profile name definition |
|
178 |
typedef TBuf<KPEProfileNameLength> TPEProfileName; |
|
179 |
//Call control caps |
|
180 |
typedef TUint32 TPECallControlCaps; |
|
181 |
//User to user info |
|
182 |
typedef TBuf<KPhCltUUILength> TPEUserToUserInfo; |
|
183 |
||
184 |
// Phone identity parameters type. |
|
185 |
typedef TBuf<RMobilePhone::KPhoneManufacturerIdSize> TPEManufacturer; |
|
186 |
typedef TBuf<RMobilePhone::KPhoneModelIdSize> TPEModel; |
|
187 |
typedef TBuf<KSysUtilVersionTextLength> TPERevision; |
|
188 |
typedef TBuf<RMobilePhone::KPhoneSerialNumberSize> TPESerialNumber; |
|
189 |
||
190 |
//Call States |
|
191 |
typedef TUint TPEState; |
|
192 |
||
193 |
enum |
|
194 |
{ |
|
195 |
// Call states 0 - 499 |
|
196 |
EPEStateUnknown = 0, |
|
197 |
EPEStateIdle, |
|
198 |
EPEStateDialing, |
|
199 |
EPEStateEmergencyDialing, |
|
200 |
EPEStateRinging, |
|
201 |
EPEStateConnecting, |
|
202 |
EPEStateConnected, |
|
203 |
EPEStateHangingUp, |
|
204 |
EPEStateHeld, |
|
205 |
EPEStateAnswering, |
|
206 |
EPEStateRejecting, |
|
207 |
EPEStateDisconnecting, |
|
208 |
// conference call states |
|
209 |
EPEStateConferenceIdle, |
|
210 |
EPEStateConnectedConference, |
|
211 |
EPEStateHeldConference, |
|
212 |
EPEStateCreatingConference, |
|
213 |
EPEStateHangingUpConference, |
|
214 |
EPEStateSwappingConference, |
|
215 |
EPEStateResumeHoldConference, |
|
216 |
EPEStateGoingOneToOne, |
|
217 |
EPEStateAddingConferenceMember, |
|
218 |
EPEStateAddedConferenceMember, |
|
219 |
EPEStateDroppingConferenceMember, |
|
220 |
EPEStateDroppedConferenceMember, |
|
221 |
// maximum value for boundary checks |
|
222 |
EPEStateMaximumState = 1000 |
|
223 |
}; |
|
224 |
||
225 |
NONSHARABLE_STRUCT( TPEErrorInfo ) |
|
226 |
{ |
|
227 |
//Symbian OS error code |
|
228 |
TInt iErrorCode; |
|
229 |
//Call Id number, equals KPECallIdNotUsed if call id is not available or is |
|
230 |
//invalid for this error condition |
|
231 |
TInt iCallId; |
|
232 |
// Error type( Cch or Ccp ) |
|
233 |
TPEErrorType iErrorType; |
|
234 |
}; |
|
235 |
||
236 |
enum TPECallType |
|
237 |
{ // maintain compatibility with P&S type enum |
|
238 |
// Used to initialize call type information |
|
239 |
EPECallTypeUninitialized = EPSCTsyCallTypeUninitialized, |
|
240 |
// Circuit switched voice call |
|
241 |
EPECallTypeCSVoice = EPSCTsyCallTypeCSVoice, |
|
242 |
// Circuit switched multimedia call |
|
243 |
EPECallTypeVideo = EPSCTsyCallTypeH324Multimedia, |
|
244 |
// Packet switched voice call |
|
245 |
EPECallTypeVoIP = EPSCTsyCallTypeVoIP |
|
246 |
}; |
|
247 |
||
248 |
enum TPEPinCode |
|
249 |
{ |
|
250 |
EPEPinCode, |
|
251 |
EPEPin2Code |
|
252 |
}; |
|
253 |
||
254 |
enum TPEPhoneCommandType |
|
255 |
{ |
|
256 |
EPESendingFlash |
|
257 |
}; |
|
258 |
||
259 |
// Enumeration which defines the search keys with which |
|
260 |
// contact information is searched |
|
261 |
enum TPEFindContactKey |
|
262 |
{ |
|
263 |
//Search keys |
|
264 |
EPEFindWithPhoneNumber = 0, |
|
265 |
EPEFindWithContactId, |
|
266 |
EPEFindKeyNotDefined |
|
267 |
}; |
|
268 |
||
269 |
enum TPESecurityCommand |
|
270 |
{ |
|
271 |
EPESecurityCommandUnknown, |
|
272 |
EPESecurityCommandChangePinCode, |
|
273 |
EPESecurityCommandUnblockPinCode, |
|
274 |
EPESecurityCommandChangeBarringPassword, |
|
275 |
EPESecurityCommandChangeSimLock |
|
276 |
}; |
|
277 |
||
278 |
enum TPEPhoneNumberIdType |
|
279 |
{ |
|
280 |
EPEUnknownNumber, |
|
281 |
EPEMobileNumber, |
|
282 |
EPEPager, |
|
283 |
EPETelephoneNumber, |
|
284 |
EPEVmbxNumberLine1, |
|
285 |
EPEVmbxNumberLine2, |
|
286 |
EPEPrivateNumber, |
|
287 |
EPEEmergencyNumber, |
|
288 |
EPEFaxNumber, |
|
289 |
EPEVoipNumber, |
|
290 |
EPEVideoNumber, |
|
291 |
EPEAssistantNumber, |
|
292 |
EPECarNumber, |
|
293 |
EPEHomeNumber, |
|
294 |
EPEWorkNumber |
|
295 |
}; |
|
296 |
||
297 |
enum TPERxTimeSlots |
|
298 |
{ |
|
299 |
EPERxSlots1 = 1, |
|
300 |
EPERxSlots2 = 2, |
|
301 |
EPERxSlots3 = 3 |
|
302 |
}; |
|
303 |
||
304 |
//VoiceMailBoxNumbers |
|
305 |
NONSHARABLE_STRUCT( TPEVoiceMailBoxNumberInfo ) |
|
306 |
{ |
|
307 |
TPEPhoneNumber iVMBXL1; // Line 1 VoiceMailBoxNumber |
|
308 |
TPEPhoneNumber iVMBXL2; // Line 2 VoiceMailBoxNumber |
|
309 |
TPEPhoneNumber iDTMFVMBXL1; // Line 1 DTMFVoiceMailBoxNumber |
|
310 |
TPEPhoneNumber iDTMFVMBXL2; // Line 2 DTMFVoiceMailBoxNumber |
|
311 |
}; |
|
312 |
||
313 |
// Contains information of call audio route parameters |
|
314 |
NONSHARABLE_STRUCT( TPEPhoneAudioRouteParameters ) |
|
315 |
{ |
|
316 |
TPEAudioOutput iAudioOutput; |
|
317 |
TPEAudioOutput iPreviousOutput; |
|
318 |
TBool iShowNote; |
|
319 |
}; |
|
320 |
||
321 |
// Enumerate definitions for MMI Service Codes from MMETel API: |
|
322 |
||
323 |
// FUNCTION PROTOTYPES |
|
324 |
// None. |
|
325 |
||
326 |
// FORWARD DECLARATIONS |
|
327 |
||
328 |
class MPEEngineInfo; |
|
329 |
||
330 |
// CLASS DECLARATION |
|
331 |
||
332 |
/** |
|
333 |
* Offers message interface from phone engine to phone application. |
|
334 |
* |
|
335 |
* @lib phonenegine.lib |
|
336 |
* @since S60 v.4.0 |
|
337 |
*/ |
|
338 |
NONSHARABLE_CLASS( MEngineMonitor ) |
|
339 |
{ |
|
340 |
||
341 |
public: |
|
342 |
||
343 |
enum TPEMessagesFromPhoneEngine |
|
344 |
{ |
|
345 |
// Audio messages 1000 - 1999 |
|
346 |
EPEMessageAudioDtmfEvent = 1000, |
|
347 |
EPEMessageAudioDTMFPlayComplete, |
|
348 |
EPEMessageAudioMuteChanged, |
|
349 |
EPEMessageAudioOutputChanged, |
|
350 |
EPEMessageAudioOutputPreferenceChanged, |
|
351 |
EPEMessageAudioPlayStopped, |
|
352 |
EPEMessageAudioVolumeChanged, |
|
353 |
EPEMessageAvailableAudioOutputsChanged, |
|
354 |
||
355 |
// Call messages 2000 - 2999 |
|
356 |
EPEMessageAnswer = 2000, |
|
357 |
EPEMessageAnswering, |
|
358 |
EPEMessageCallAdded, |
|
359 |
EPEMessageCallControlCapsChanged, |
|
360 |
EPEMessageCallWaiting, |
|
361 |
EPEMessageCallWaitingAnswered, |
|
362 |
EPEMessageChangedCallDuration, |
|
363 |
EPEMessageConferenceCapsChange, |
|
364 |
EPEMessageConferenceIdle, |
|
365 |
EPEMessageConnected, |
|
366 |
EPEMessageConnectedConference, |
|
367 |
EPEMessageConnecting, |
|
368 |
EPEMessageContinuingDTMFSending, |
|
369 |
EPEMessageDialing, |
|
370 |
EPEMessageDialingError, |
|
371 |
EPEMessageDisconnecting, |
|
372 |
EPEMessageDisconnectingConference, |
|
373 |
EPEMessageDisconnectingWithInband, //UI doesn't get this message, it is mapped as EPEMessageDisconnecting |
|
374 |
EPEMessageDTMFSendingAborted, |
|
375 |
EPEMessageHeld, |
|
376 |
EPEMessageHeldConference, |
|
377 |
EPEMessageIdle, |
|
378 |
EPEMessageIncoming, |
|
379 |
EPEMessageInitiatedEmergencyCall, |
|
380 |
EPEMessageInitiatedEmergencyWhileActiveVideo, |
|
381 |
EPEMessageIssuingUSSDRequest, |
|
382 |
EPEMessageIssuedUSSDRequest, |
|
383 |
EPEMessagePacketNetworkDetached, |
|
384 |
EPEMessageRemoteBusy, |
|
385 |
EPEMessageRemoteTerminated, |
|
386 |
EPEMessageSendingDTMF, |
|
387 |
EPEMessageSentDTMF, |
|
388 |
EPEMessageSentSSString, |
|
389 |
EPEMessageStoppedDTMF, |
|
390 |
EPEMessageSwapped, |
|
391 |
EPEMessageTransferDone, |
|
392 |
EPEMessageTransferring, |
|
393 |
EPEMessageUnknown, |
|
394 |
EPEMessageWentOneToOne, |
|
395 |
EPEMessageRemotePartyInfoChanged, |
|
396 |
EPEMessageConnectingWithInband, //UI doesn't get this message, it is mapped as EPEMessageConnecting |
|
397 |
||
398 |
EPEMessageUnattendedTransferRequest, |
|
399 |
||
400 |
EPEMessageRemoteForwarding, |
|
401 |
EPEMessageMovedPermanently, |
|
402 |
EPEMessageMultipleChoices, |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
403 |
EPEMessageColpNumberAvailable, |
37 | 404 |
|
405 |
// Contact messages 3000 - 3999 |
|
406 |
EPEMessageThumbnailLoadingCompleted = 3000, |
|
407 |
||
408 |
// Error messages 4000 - 4999 |
|
409 |
EPEMessageError = 4000, |
|
410 |
EPEMessageAudioHandlingError, |
|
411 |
EPEMessageCallHandlingError, |
|
412 |
EPEMessageConferenceErrorAddCall, |
|
413 |
EPEMessageConferenceErrorRemoveCall, |
|
414 |
EPEMessageConferenceErrorSwap, |
|
415 |
EPEMessageConferenceErrorHold, |
|
416 |
EPEMessageConferenceErrorResume, |
|
417 |
EPEMessageConferenceErrorGoOneToOne, |
|
418 |
EPEMessageConferenceErrorCurrentCallsToConference, |
|
419 |
EPEMessageConferenceErrorHangUp, |
|
420 |
EPEMessageContactHandlingError, |
|
421 |
EPEMessageLogHandlingError, |
|
422 |
EPEMessageServiceHandlingError, |
|
423 |
||
424 |
// Network messages 5000 - 5999 |
|
425 |
EPEMessageCallSecureStatusChanged= 5000, |
|
426 |
EPEMessageNetworkRegistrationStatusChange, |
|
427 |
||
428 |
// Parser messages 6000 - 6999 |
|
429 |
EPEMessageActivateRfsDeep = 6000, |
|
430 |
EPEMessageActivateRfsNormal, |
|
431 |
EPEMessageShowBTDeviceAddress, |
|
432 |
EPEMessageShowBTLoopback, |
|
433 |
EPEMessageShowWlanMacAddress, |
|
434 |
EPEMessageSSRequestFailed, |
|
435 |
||
436 |
// Security messages 7000 - 7999 |
|
437 |
EPEMessageBadBarringPasswordChange = 7000, |
|
438 |
EPEMessageBadPin1Change, |
|
439 |
EPEMessageBadPin1Unblock, |
|
440 |
EPEMessageBadPin2Change, |
|
441 |
EPEMessageBadPin2Unblock, |
|
442 |
EPEMessageBarringPasswordChanged, |
|
443 |
EPEMessageChangedSimLock, |
|
444 |
EPEMessageFailedChangeSimLock, |
|
445 |
EPEMessageFailedNewPin1AndPin2NotEqual, // Error message, NewPin1 and NewPin2 are not equal |
|
446 |
EPEMessageFailedSecurityCommandAlreadyActive, // Error message, SecurityCommand is already active |
|
447 |
EPEMessagePin1Changed, |
|
448 |
EPEMessagePin1Unblocked, |
|
449 |
EPEMessagePin2Changed, |
|
450 |
EPEMessagePin2Unblocked, |
|
451 |
EPEMessageSIMChanged, |
|
452 |
EPEMessageSIMStateChanged, |
|
453 |
||
454 |
// Settings and Shared Data messages 8000 - 8999 |
|
455 |
EPEMessageProfileChanged = 8000, |
|
456 |
||
457 |
// Startup messages 9000 - 9999 |
|
458 |
EPEMessagePEConstructionReady = 9000, // Phone Engine is initialized and fully operational |
|
459 |
EPEMessagePEConstructionFailed, |
|
460 |
EPEMessagePEConstructionTwoPhaseReady, |
|
461 |
// Miscellaneous messages 10000 - 10999 |
|
462 |
EPEMessageDoNotSendMe = 10000, |
|
463 |
EPEMessageInValidEmergencyNumber, |
|
464 |
EPEMessageLogEventSaved, |
|
465 |
EPEMessageStartATDialing, |
|
466 |
EPEMessageValidEmergencyNumber, |
|
467 |
EPEMessageMuteRingingTone, |
|
468 |
||
469 |
// Audio messages 11000 - 11199 |
|
470 |
||
471 |
// Call messages 11200 - 11399 |
|
472 |
EPEMessageActiveBarring = KPEMessagesFromPhoneEngineGsmFirst + 200, |
|
473 |
EPEMessageActiveCallForwarding, |
|
474 |
EPEMessageAddedConferenceMember, |
|
475 |
EPEMessageALSLineChanged, |
|
476 |
EPEMessageCallBarred, |
|
477 |
EPEMessageIncCallIsForw, |
|
478 |
EPEMessageIncCallForwToC, |
|
479 |
EPEMessageOutCallForwToC, |
|
480 |
EPEMessageForwardUnconditionalModeActive, |
|
481 |
EPEMessageForwardConditionallyModeActive, |
|
482 |
EPEMessageDroppedConferenceMember, |
|
483 |
EPEMessageGoingOneToOne, |
|
484 |
EPEMessageRemoteCreatedConference, |
|
485 |
EPEMessageRemoteHeld, |
|
486 |
EPEMessageRemoteResumed, |
|
487 |
EPEMessageTempClirSuppressUnsuccessful, |
|
488 |
EPEMessageTempClirActivationUnsuccessful, |
|
489 |
EPEMessageShowIncCallGroupIndex, |
|
490 |
EPEMessageDataPortLoaned, |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
491 |
EPEMessageOutgoingCallBarred, |
37 | 492 |
// Contact messages 11400 - 11599 |
493 |
||
494 |
// Error messages 11600 - 11799 |
|
495 |
||
496 |
// VoIP service messages 11800 - 12999 |
|
497 |
EPEMessageServiceEnabled = KPEMessagesFromPhoneEngineGsmFirst + 800, |
|
498 |
EPEMessageServiceEnabling, |
|
499 |
EPEMessageNoService, |
|
500 |
EPEMessageServiceDisabled, |
|
501 |
||
502 |
// Parser messages 12000 - 12199 |
|
503 |
EPEMessageIssuedSSRequest = KPEMessagesFromPhoneEngineGsmFirst + 1000, |
|
504 |
EPEMessageIssuingSSRequest, |
|
505 |
||
506 |
// Security messages 12200 - 12399 |
|
507 |
EPEMessageSecureNotSpecified, |
|
508 |
||
509 |
// Settings and Shared Data messages 12400 - 12599 |
|
510 |
EPEMessageAlsStatusChanged = KPEMessagesFromPhoneEngineGsmFirst + 1400, |
|
511 |
EPEMessageBarringNotification, |
|
512 |
EPEMessageClipStatusNotification, |
|
513 |
EPEMessageClirStatusNotification, |
|
514 |
EPEMessageCnapStatusNotification, |
|
515 |
EPEMessageColpStatusNotification, |
|
516 |
EPEMessageColrStatusNotification, |
|
517 |
EPEMessageForwardingNotification, |
|
518 |
EPEMessageVmbxNumberLine1Changed, |
|
519 |
EPEMessageVmbxNumberLine2Changed, |
|
520 |
EPEMessageWaitingNotification, |
|
521 |
||
522 |
||
523 |
// Miscellaneous messages 12600 - 12799 |
|
524 |
||
525 |
// Last 12999 |
|
526 |
// Exposing this allows the compiler to detect the overlapping enumerations. |
|
527 |
EPEMessageLastVariantItem = KPEMessagesFromPhoneEngineGsmLast |
|
528 |
}; |
|
529 |
||
530 |
/** |
|
531 |
* HandleError |
|
532 |
* Phone Application implements this callback method to provide a framework |
|
533 |
* for proceeding in an error condition. |
|
534 |
* @param aErrorInfo is the call id number. |
|
535 |
*/ |
|
536 |
virtual void HandleError( const TPEErrorInfo& aErrorInfo ) = 0; |
|
537 |
||
538 |
/** |
|
539 |
* HandleMessage |
|
540 |
* Phone Application implements this callback method to provide a response |
|
541 |
* for an event message sent by the Phone Engine. |
|
542 |
* @param aMessage specifies the event that has taken place |
|
543 |
* @param aCallId is the call id number. |
|
544 |
*/ |
|
545 |
virtual void HandleMessage( const TInt aMessage, const TInt aCallId ) = 0; |
|
546 |
||
547 |
}; // MEngineMonitor |
|
548 |
||
549 |
||
550 |
// Maximum number of the conference members. |
|
551 |
const TInt KPEMaximumNumberOfConferenceMembers = 5; |
|
552 |
// Maximum number of voice calls |
|
553 |
const TInt KPEMaximumNumberOfVoiceCalls = 8; // Phone engine user can change this value if needed. |
|
554 |
// Maximum number of data calls |
|
555 |
const TInt KPEMaximumNumberOfDataCalls = 2; |
|
556 |
// Maximum number of conference calls |
|
557 |
const TInt KPEMaximumNumberOfConferenceCalls = 1; |
|
558 |
// Maximum number of all calls |
|
559 |
const TInt KPEMaximumNumberOfCalls = KPEMaximumNumberOfVoiceCalls + |
|
560 |
KPEMaximumNumberOfDataCalls + KPEMaximumNumberOfConferenceCalls; |
|
561 |
||
562 |
// Emergency CallId |
|
563 |
const TInt KPEEmergencyCallId = KPEMaximumNumberOfVoiceCalls - 1; |
|
564 |
// Conference Call ID |
|
565 |
const TInt KPEConferenceCallID = KPEMaximumNumberOfVoiceCalls; |
|
566 |
||
567 |
// Invalid call index, note not the same as call id |
|
568 |
const TInt KPEInvalidCallIndex = -1; |
|
569 |
// These two are needed in TPECallInfo's conference field |
|
570 |
// Indicates, that this is Conference Master |
|
571 |
const TInt KPEConferenceMaster = -1; |
|
572 |
// Indicates, that this is Normal voice call |
|
573 |
const TInt KPENormalVoiceCall = -2; |
|
574 |
||
575 |
// All MMI Service Codes are defined in standard 3GPP TS 02.30 V7.1.1, Annex C. |
|
576 |
// MMI Service Codes: No service code was specified |
|
577 |
_LIT( KPENoServiceCode, "" ); |
|
578 |
// MMI Service Codes: All teleservices |
|
579 |
_LIT( KPEAllTeleservices, "10" ); |
|
580 |
// MMI Service Codes: Voice teleservices |
|
581 |
_LIT( KPETelephony, "11" ); |
|
582 |
// MMI Service Codes: All Data Services |
|
583 |
_LIT( KPEAllDataServices, "12" ); |
|
584 |
// MMI Service Codes: Fax Services |
|
585 |
_LIT( KPEFacsimileServices, "13" ); |
|
586 |
// MMI Service Codes: SMS Services |
|
587 |
_LIT( KPEShortMessageServices, "16" ); |
|
588 |
// MMI Service Codes: Voice Group Call Service |
|
589 |
_LIT( KPEVoiceGroupCallService, "17" ); |
|
590 |
// MMI Service Codes: Voice Broadcast Service |
|
591 |
_LIT( KPEVoiceBroadcastService, "18" ); |
|
592 |
// MMI Service Codes: All teleservices except SMS |
|
593 |
_LIT( KPEAllTeleservicesExceptSMS, "19" ); |
|
594 |
// MMI Service Codes: All Bearer Service |
|
595 |
_LIT( KPEAllBearerServices, "20" ); |
|
596 |
// MMI Service Codes: All Async Services |
|
597 |
_LIT( KPEAllAsyncServices, "21" ); |
|
598 |
// MMI Service Codes: All Sync Services |
|
599 |
_LIT( KPEAllSyncServices, "22" ); |
|
600 |
// MMI Service Codes: All Data Circuit Sync |
|
601 |
_LIT( KPEAllDataCircuitSync, "24" ); |
|
602 |
// MMI Service Codes: All Data Circuit Async |
|
603 |
_LIT( KPEAllDataCircuitAsync, "25" ); |
|
604 |
// MMI Service Codes: All Dedicated Packet Access |
|
605 |
_LIT( KPEAllDedicatedPacketAccess, "26" ); |
|
606 |
// MMI Service Codes: All Dedicated Pad Access |
|
607 |
_LIT( KPEAllDedicatedPadAccess, "27" ); |
|
608 |
// MMI Service Codes: All Gprs Beares Services |
|
609 |
_LIT( KPEAllGprsBearerServices, "99" ); |
|
610 |
// MMI Service Codess: PLMN specific teleservices |
|
611 |
_LIT( KPEAllPlmnSpecificTeleservices, "50" ); |
|
612 |
_LIT( KPEPlmnSpecificTeleservice1, "51" ); |
|
613 |
_LIT( KPEPlmnSpecificTeleservice2, "52" ); |
|
614 |
_LIT( KPEPlmnSpecificTeleservice3, "53" ); |
|
615 |
_LIT( KPEPlmnSpecificTeleservice4, "54" ); |
|
616 |
_LIT( KPEPlmnSpecificTeleservice5, "55" ); |
|
617 |
_LIT( KPEPlmnSpecificTeleservice6, "56" ); |
|
618 |
_LIT( KPEPlmnSpecificTeleservice7, "57" ); |
|
619 |
_LIT( KPEPlmnSpecificTeleservice8, "58" ); |
|
620 |
_LIT( KPEPlmnSpecificTeleservice9, "59" ); |
|
621 |
_LIT( KPEPlmnSpecificTeleservice10, "60" ); |
|
622 |
_LIT( KPEPlmnSpecificTeleservice11, "61" ); |
|
623 |
_LIT( KPEPlmnSpecificTeleservice12, "62" ); |
|
624 |
_LIT( KPEPlmnSpecificTeleservice13, "63" ); |
|
625 |
_LIT( KPEPlmnSpecificTeleservice14, "64" ); |
|
626 |
_LIT( KPEPlmnSpecificTeleservice15, "65" ); |
|
627 |
// MMI Service Codess: PLMN specific bearer services |
|
628 |
_LIT( KPEAllPlmnSpecificBearerServices, "70" ); |
|
629 |
_LIT( KPEPlmnSpecificBearerService1, "71" ); |
|
630 |
_LIT( KPEPlmnSpecificBearerService2, "72" ); |
|
631 |
_LIT( KPEPlmnSpecificBearerService3, "73" ); |
|
632 |
_LIT( KPEPlmnSpecificBearerService4, "74" ); |
|
633 |
_LIT( KPEPlmnSpecificBearerService5, "75" ); |
|
634 |
_LIT( KPEPlmnSpecificBearerService6, "76" ); |
|
635 |
_LIT( KPEPlmnSpecificBearerService7, "77" ); |
|
636 |
_LIT( KPEPlmnSpecificBearerService8, "78" ); |
|
637 |
_LIT( KPEPlmnSpecificBearerService9, "79" ); |
|
638 |
_LIT( KPEPlmnSpecificBearerService10, "80" ); |
|
639 |
_LIT( KPEPlmnSpecificBearerService11, "81" ); |
|
640 |
_LIT( KPEPlmnSpecificBearerService12, "82" ); |
|
641 |
_LIT( KPEPlmnSpecificBearerService13, "83" ); |
|
642 |
_LIT( KPEPlmnSpecificBearerService14, "84" ); |
|
643 |
_LIT( KPEPlmnSpecificBearerService15, "85" ); |
|
644 |
// ALS |
|
645 |
_LIT( KPEAuxVoiceService, "89" ); |
|
646 |
||
647 |
//Fax Modem UI application UID |
|
648 |
const TInt KPEFaxModemUIUid = 0x1000594E; |
|
649 |
// TPESimState fisrt value |
|
650 |
const TInt KPEStartupEnumerationFirstValue = 100; |
|
651 |
||
652 |
// Indicates that dtmf sending is possible with this call. |
|
653 |
const TUint KPECapsDtmf = 0x00080000; |
|
654 |
||
655 |
// SIM states |
|
656 |
enum TPESimState |
|
657 |
{ |
|
658 |
EPESimStatusUninitialized = KPEStartupEnumerationFirstValue, |
|
659 |
EPESimUsable, // The Sim card is fully usable. |
|
660 |
EPESimReadable, // The SIM card is not fully usable, but the emergency number can be read. |
|
661 |
EPESimNotReady, // The Sim card is present but not ready or usable. |
|
662 |
EPESimNotPresent, // The Sim card is not present. |
|
663 |
EPESimNotSupported // SIM/RUIM is not supported. Some CDMA phones do not support a SIM/RUIM at all. |
|
664 |
}; |
|
665 |
||
666 |
// Supplementary Services action type |
|
667 |
enum TPESSAction |
|
668 |
{ |
|
669 |
EPESSActionUnspecified = 0, |
|
670 |
EPESSActivation, |
|
671 |
EPESSDeactivation, |
|
672 |
EPESSInterrogation, |
|
673 |
EPESSRegistration, |
|
674 |
EPESSErasure, |
|
675 |
EPEPasswordOperation |
|
676 |
}; |
|
677 |
||
678 |
// Supplementary Services type |
|
679 |
enum TPESSType |
|
680 |
{ |
|
681 |
EPESSTypeUnspecified = 0, |
|
682 |
EPECallForwardingNotReachable, |
|
683 |
EPECallForwardingNoReply, |
|
684 |
EPECallForwardingBusy, |
|
685 |
EPECallForwardingUnconditional, |
|
686 |
EPECallForwardingAll, |
|
687 |
EPECallForwardingAllConditional, |
|
688 |
EPECallBarringAllOutgoing, |
|
689 |
EPECallBarringAllOutgoingInternational, |
|
690 |
EPECallBarringAllOutgoingInternationalExcHome, |
|
691 |
EPECallBarringAllIncoming, |
|
692 |
EPECallBarringAllIncomingWhenRoaming, |
|
693 |
EPECallBarringAllServices, |
|
694 |
EPECallBarringAllOutgoingServices, |
|
695 |
EPECallBarringAllIncomingServices, |
|
696 |
EPECallBarringPassword, |
|
697 |
EPECallWaiting, |
|
698 |
EPEClip, |
|
699 |
EPEClir, |
|
700 |
EPECnap, |
|
701 |
EPEColp, |
|
702 |
EPEColr, |
|
703 |
EPEEmlpp, |
|
704 |
EPEMsp, |
|
705 |
EPESpnp, |
|
706 |
EPEPin, |
|
707 |
EPEUnblockPin, |
|
708 |
EPESimLock |
|
709 |
}; |
|
710 |
||
711 |
//Forwarded information definition |
|
712 |
NONSHARABLE_STRUCT( TPEForwardedInfo ) |
|
713 |
{ |
|
714 |
RMobilePhone::TMobilePhoneCFCondition iCondition; |
|
715 |
RMobilePhone::TMobileService iServiceGroup; |
|
716 |
RMobilePhone::TMobilePhoneCFStatus iStatus; |
|
717 |
TPEPhoneNumber iPhoneNumber; |
|
718 |
TInt iTimeout; |
|
719 |
}; |
|
720 |
||
721 |
// Forwarding information definition |
|
722 |
NONSHARABLE_STRUCT( TPEForwardingInfo ) |
|
723 |
{ |
|
724 |
TInt iGroupCount; |
|
725 |
TFixedArray<TPEForwardedInfo, KPEMaxServiceGroup> iForwardedInfo; |
|
726 |
}; |
|
727 |
||
728 |
NONSHARABLE_STRUCT( TPEActiveForwardInfo ) |
|
729 |
{ |
|
730 |
RMobilePhone::TMobilePhoneCFActive iActiveType; |
|
731 |
RMobilePhone::TMobileService iServiceGroup; |
|
732 |
}; |
|
733 |
||
734 |
//Wait information definition |
|
735 |
NONSHARABLE_STRUCT( TPEWaitInfo ) |
|
736 |
{ |
|
737 |
RMobilePhone::TMobileService iServiceGroup; |
|
738 |
RMobilePhone::TMobilePhoneCWStatus iStatus; |
|
739 |
}; |
|
740 |
||
741 |
// Waiting information definition |
|
742 |
NONSHARABLE_STRUCT( TPEWaitingInfo ) |
|
743 |
{ |
|
744 |
TInt iGroupCount; |
|
745 |
TFixedArray<TPEWaitInfo, KPEMaxServiceGroup> iWaitInfo; |
|
746 |
}; |
|
747 |
||
748 |
//Barred information definition |
|
749 |
NONSHARABLE_STRUCT( TPEBarredInfo ) |
|
750 |
{ |
|
751 |
RMobilePhone::TMobilePhoneCBCondition iCondition; |
|
752 |
RMobilePhone::TMobileService iServiceGroup; |
|
753 |
RMobilePhone::TMobilePhoneCBStatus iStatus; |
|
754 |
}; |
|
755 |
||
756 |
// Barring information definition |
|
757 |
NONSHARABLE_STRUCT( TPEBarringInfo ) |
|
758 |
{ |
|
759 |
TInt iGroupCount; |
|
760 |
TFixedArray<TPEBarredInfo, KPEMaxServiceGroup> iBarredInfo; |
|
761 |
}; |
|
762 |
||
763 |
// Contains information of the Suplementary Services command. |
|
764 |
NONSHARABLE_STRUCT( TPESSCommandInfo ) // For SS Commands. |
|
765 |
{ |
|
766 |
TPESSAction action; // SS Action |
|
767 |
/*RMobilePhone::TMobileService*/ TInt group; // MMI Service Code |
|
768 |
TPESSType type; // Supplementary Services type |
|
769 |
}; |
|
770 |
||
771 |
NONSHARABLE_STRUCT( TPEConferenceMemberInfo ) |
|
772 |
{ |
|
773 |
TName iConferenceMemberName; |
|
774 |
TInt iConferenceMemberId; |
|
775 |
}; |
|
776 |
||
777 |
/** |
|
778 |
* Offers message interface from phone application to phone engine. |
|
779 |
* |
|
780 |
* ?more_complete_description |
|
781 |
* |
|
782 |
* @lib phoneengine |
|
783 |
* @since S60 v4.0 |
|
784 |
*/ |
|
785 |
NONSHARABLE_CLASS( MPEPhoneModel ) |
|
786 |
{ |
|
787 |
public: |
|
788 |
||
789 |
typedef TInt TPEMessagesToPhoneEngine; |
|
790 |
||
791 |
enum |
|
792 |
{ |
|
793 |
// Audio messages 1000 - 1999 |
|
794 |
EPEMessageSetAudioMute = 1000, |
|
795 |
EPEMessageSetAudioVolume, |
|
796 |
EPEMessageSetAudioOutput, |
|
797 |
||
798 |
// Call messages 2000 - 2999 |
|
799 |
EPEMessageAnswer = 2000, |
|
800 |
EPEMessageClientDial, |
|
801 |
EPEMessageContinueDTMFSending, |
|
802 |
EPEMessageDial, |
|
803 |
EPEMessagePlayDTMF, |
|
804 |
EPEMessageEndDTMF, |
|
805 |
EPEMessagePhoneNumberEdited, |
|
806 |
EPEMessageRelease, |
|
807 |
EPEMessageReleaseAll, |
|
808 |
EPEMessageReject, |
|
809 |
EPEMessageSendDTMF, |
|
810 |
EPEMessageStopDTMFSending, |
|
811 |
EPEMessageStopTonePlay, |
|
812 |
EPEMessageAutomaticAnswerOff, //UI sends when soft reject is needed |
|
813 |
EPEMessageTerminateAllConnections, |
|
814 |
EPEMessageSetSwitchToCallFlag, |
|
815 |
EPEMessageSwitchToVideoOrVoice, |
|
816 |
EPEMessageSatCallRequestCompleted, |
|
817 |
EPEMessageClientDialEmergency, |
|
818 |
EPEMessageReplaceActive, |
|
819 |
EPEMessageContinueEmergencyCallInitialization, |
|
820 |
EPEMessageAcceptUnattendedTransfer, |
|
821 |
EPEMessageRejectUnattendedTransfer, |
|
822 |
||
823 |
EPEMessageDoUnattendedTransfer, |
|
824 |
EPEMessageForwardCallToAddress, |
|
825 |
EPEMessageDialServiceCall, |
|
826 |
// Contact messages 3000 - 3999 |
|
827 |
||
828 |
// Error messages 4000 - 4999 |
|
829 |
||
830 |
// Network messages 5000 - 5999 |
|
831 |
||
832 |
// Parser messages 6000 - 6999 |
|
833 |
||
834 |
// Security messages 7000 - 7999 |
|
835 |
||
836 |
// Service messages 8000 - 8999 |
|
837 |
EPEMessageDisableService = 8000, |
|
838 |
||
839 |
// Startup messages 9000 - 9999 |
|
840 |
EPEMessagePEConstructionReady = 9000, |
|
841 |
||
842 |
// Miscellaneous messages 10000 - 10999 |
|
843 |
EPEMessageCheckEmergencyNumber = 10000 // Request engine to check is entered number emergency. |
|
844 |
||
845 |
// Variant messages 11000 - 12999 |
|
846 |
// From KPEMessagesToPhoneEngineGsmFirst |
|
847 |
// to KPEMessagesToPhoneEngineGsmLast |
|
848 |
}; |
|
849 |
||
850 |
virtual ~MPEPhoneModel() {}; |
|
851 |
||
852 |
/** |
|
853 |
* Returns pointer to information object (CPEEngineInfo) |
|
854 |
* |
|
855 |
* @since S60 v4.0 |
|
856 |
* @return Return pointer to CPEEngineInfo object |
|
857 |
*/ |
|
858 |
virtual MPEEngineInfo* EngineInfo() = 0; |
|
859 |
||
860 |
/** |
|
861 |
* Reroutes messages from the phone application to the message handler |
|
862 |
* |
|
863 |
* @since S60 v4.0 |
|
864 |
* @param aMessage is the message code |
|
865 |
*/ |
|
866 |
virtual void HandleMessage( const TInt aMessage ) = 0; |
|
867 |
||
868 |
/** |
|
869 |
* Returns the name of the specified message to PhoneEngine |
|
870 |
* |
|
871 |
* @since S60 v4.0 |
|
872 |
* @param aMessage is the message code |
|
873 |
* @return String containing the name of the message |
|
874 |
*/ |
|
875 |
virtual TPtrC NameByMessageToPhoneEngine( const TInt aMessage ) const = 0; |
|
876 |
||
877 |
/** |
|
878 |
* Returns the name of the specified message from PhoneEngine |
|
879 |
* |
|
880 |
* @param aMessage is the message code |
|
881 |
* @return String containing the name of the message |
|
882 |
*/ |
|
883 |
virtual TPtrC NameByMessageFromPhoneEngine( const TInt aMessage ) const = 0; |
|
884 |
||
885 |
}; // MPEPhoneModel |
|
886 |
||
887 |
/** |
|
888 |
* Utility class for call id. |
|
889 |
* |
|
890 |
* @lib PhoneEngine.lib |
|
891 |
*/ |
|
892 |
NONSHARABLE_CLASS( CallIdCheck ) |
|
893 |
{ |
|
894 |
public: |
|
895 |
static inline TBool IsValid( TInt aCallId ) |
|
896 |
{ |
|
897 |
return aCallId >= 0 && aCallId < KPEMaximumNumberOfCalls; |
|
898 |
} |
|
899 |
static inline TBool IsVoice( TInt aCallId ) |
|
900 |
{ |
|
901 |
return aCallId >= 0 && aCallId < KPEMaximumNumberOfVoiceCalls; |
|
902 |
} |
|
903 |
static inline TBool IsConference( TInt aCallId ) |
|
904 |
{ |
|
905 |
return aCallId >= KPEMaximumNumberOfVoiceCalls && |
|
906 |
aCallId < ( KPEMaximumNumberOfVoiceCalls + KPEMaximumNumberOfConferenceCalls ); |
|
907 |
} |
|
908 |
static inline TBool IsVideo( TInt aCallId ) |
|
909 |
{ |
|
910 |
return aCallId >= ( KPEMaximumNumberOfVoiceCalls + KPEMaximumNumberOfConferenceCalls ) |
|
911 |
&& aCallId < ( KPEMaximumNumberOfVoiceCalls + KPEMaximumNumberOfConferenceCalls + |
|
912 |
KPEMaximumNumberOfDataCalls ); |
|
913 |
} |
|
914 |
}; |
|
915 |
||
916 |
#endif // PEVIRTUALENGINE_H |
|
917 |
||
918 |
//End of file |