class CAknEcsDetector : public CBase |
Central coordinating object in the emergency call system Objects of this class own the number queue and own the interface object to the stored emergency numbers.
A phone client session is also open while constructed
Public Member Functions | |
---|---|
~CAknEcsDetector () | |
IMPORT_C void | AddChar ( TText ) |
TInt | CallAttemptedCallback ( TAny *) |
IMPORT_C void | CloseEventSource () |
IMPORT_C TBool | ConnectToEventSource () |
IMPORT_C TPtrC | CurrentMatch () |
void | HandlePhoneStatusL (const TInt ) |
IMPORT_C void | HandleWsEventL (const TWsEvent &, CCoeControl *) |
TInt | IndexOfCurrentMatch () |
IMPORT_C CAknEcsDetector * | NewL () |
IMPORT_C void | Reset () |
IMPORT_C void | SetBuffer (const TDesC &) |
IMPORT_C void | SetObserver ( MAknEcsObserver *) |
IMPORT_C TState | State () |
Protected Member Functions | |
---|---|
CAknEcsDetector () | |
TInt | CancelMatch ( TAny *) |
IMPORT_C void | ConstructL () |
IMPORT_C TBool | OfferEmergencyCall () |
IMPORT_C void | ReportEvent ( TState ) |
IMPORT_C void | SetState ( TState ) |
Private Member Functions | |
---|---|
void | AttemptEmergencyCall () |
void | CaptureKeys () |
void | DetermineState () |
void | MakeServiceCallL () |
void | RelinquishCapturedKeys () |
Public Member Enumerations | |
---|---|
enum |
TState
{
ENotFullyConstructed , EEmpty , ENoMatch , EPartialMatch , ECompleteMatch , ECompleteMatchThenSendKey , ECallAttempted , EServiceNumMatch } |
Protected Member Enumerations | |
---|---|
enum | TBitFlagIndices { EEventSourceConnected = 0, ETestMode } |
Private Attributes | |
---|---|
TInt | iCapturedKey |
CCoeEnv * | iCoeEnv |
CPhCltEmergencyCallObserver * | iEmergencyCallObserver |
TBitFlags16 | iFlags |
CIdle * | iIdler |
CPeriodic * | iKeyTimeoutTimer |
MAknEcsObserver * | iObserver |
CPhCltEmergencyCall * | iPhCltEmergencyCall |
CAknMatchingCharacterQueue * | iQueue |
TBool | iServiceCallEnabled |
TBuf < KAknEcsMaxMatchingLength > | iSpare_3 |
TState | iState |
IMPORT_C void | AddChar | ( | TText | aNewChar | ) |
Add a character to the emergency call buffer. This should be fed with both numberic key presses and the Send key.
TText aNewChar | New character to emergency call buffer. |
void | AttemptEmergencyCall | ( | ) | [private] |
Wraps up the code that acutally sets off the emergency call
TInt | CallAttemptedCallback | ( | TAny * | aSelf | ) | [static] |
This callback is called by a CIdle object to state that the call has been attempted. This is called outside the event loop in order allow self-deletion of the client object.
State is set to CallAttempted by this method.
TAny * aSelf |
TInt | CancelMatch | ( | TAny * | aAny | ) | [protected, static] |
Static method that can be used as a cancel callback to the detector
TAny * aAny |
void | CaptureKeys | ( | ) | [private] |
Wraps up the code to capture whatever keys are necessary when the emergency number
IMPORT_C void | CloseEventSource | ( | ) |
Closes the connection to the appui object opened by a previous call to ConnectToEventSource
IMPORT_C TBool | ConnectToEventSource | ( | ) |
This method attaches the Ecs Detector to the current appui and the registers itself for receiving all key presses parasitically. This method is called when there is no requirement for the ECS to keep synchronized with a visual buffer
IMPORT_C void | ConstructL | ( | ) | [protected] |
2nd stage construction. All memory allocation is performed in this routine
IMPORT_C TPtrC | CurrentMatch | ( | ) | const |
Returns a pointer to the current matching number.
void | DetermineState | ( | ) | [private] |
Utility routine to determine the new state of the module.
void | HandlePhoneStatusL | ( | const TInt | aStatus | ) | [virtual] |
It is called whenever status is retrieved (by the client).
const TInt aStatus | It is the status of the phone. |
IMPORT_C void | HandleWsEventL | ( | const TWsEvent & | aEvent, |
CCoeControl * | aDestination | |||
) | [virtual] |
Handle and event coming from the AppUi. Default implementation handles all keys and updates the Status(), CurrentMatch() , and IndexOfCurrentMatch()
const TWsEvent & aEvent | |
CCoeControl * aDestination |
TInt | IndexOfCurrentMatch | ( | ) | const |
Returns an index to the current character buffer where the emergency number match begins. This value is between 0 and KAknEcsMaxMatchingLength, even if there have been a large number characters input to the FIFO. Thus, it does not take account of characters that have fallen out of the FIFO.
The main use case for this is to allow clients to tell if the number was matched from the beginning of the buffer (value 0). Note that for emergency numbers of length KAknEcsMaxMatchingLength will ALWAYS return 0 if there is a complete match.
void | MakeServiceCallL | ( | ) | [private] |
Wraps up the code that actually initiates the service call
IMPORT_C CAknEcsDetector * | NewL | ( | ) | [static] |
Two phase constructor for Ecs detector Static method.
IMPORT_C TBool | OfferEmergencyCall | ( | ) | [protected, virtual] |
Framework method that may be re-implemented in order to perform some check or put up UI before the phone call is made Implementation must not leave;
void | RelinquishCapturedKeys | ( | ) | [private] |
Uncaptures Send key (if necessary)
IMPORT_C void | ReportEvent | ( | TState | aNewState | ) | [protected, virtual] |
Calls the observer
TState aNewState |
IMPORT_C void | SetBuffer | ( | const TDesC & | aNewBuffer | ) |
Set the entire contents of the emergency call buffer. A reset is performed first, and then the characters in the passed descriptor are added to the buffer. Emergency number is matched only if there is not other content in the string.
const TDesC & aNewBuffer | Emergency call buffer. |
IMPORT_C void | SetObserver | ( | MAknEcsObserver * | aNewObserver | ) |
Sets the obserever of the EcsDetector
MAknEcsObserver * aNewObserver |
IMPORT_C void | SetState | ( | TState | newState | ) | [protected] |
Internal routine to set the state
TState newState |
Enumeration for the bit indices of iFlags Used for substates or state modifiers
EEventSourceConnected = 0 | |
ETestMode |
Enumeration to carry the state of the Ecs detector
ENotFullyConstructed | |
EEmpty | |
ENoMatch | |
EPartialMatch | |
ECompleteMatch | |
ECompleteMatchThenSendKey | |
ECallAttempted | |
EServiceNumMatch |
CPhCltEmergencyCallObserver * | iEmergencyCallObserver | [private] |
Pointer to emergency call observer object
CPhCltEmergencyCall * | iPhCltEmergencyCall | [private] |
Phone client interface of emergency call.
TBool | iServiceCallEnabled | [private] |
Boolean to check if service call is enabled during device or key lock
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.