CPhCltEmergencyCall Class Reference

class CPhCltEmergencyCall : public CActive

Phone Client Emergency Call Api for emergency number query and emergency dialing.

Example:

// Creates an instance of the class CPhCltEmergencyCall* emergencyCall = CPhCltEmergencyCall::NewL( this );

CleanupStack::PushL( emergencyCall ); TPhCltEmergencyNumber emNumber;

// Number contains DTMF code _LIT( KTestNumber, "112p123" ); emNumber.Copy( KTestNumber ); TBool isEmergency( EFalse );

// Check if this number is considered as an emergency number TInt error = emergencyCall->IsEmergencyPhoneNumber( emNumber, isEmergency );

// Dial if ( isEmergency && !error ) { emergencyCall->DialEmergencyCallL( emNumber ); }

// Deletes emergencyCall CleanupStack::PopAndDestroy( emergencyCall );

phoneclient.lib
Since
SeriesS60_3.2

Inherits from

Constructor & Destructor Documentation

CPhCltEmergencyCall(MPhCltEmergencyCallObserver *)

CPhCltEmergencyCall(MPhCltEmergencyCallObserver *aObserver)[protected]

C++ constructor.

Parameters

MPhCltEmergencyCallObserver * aObserver

Member Functions Documentation

DialEmergencyCallL(const TDesC &)

voidDialEmergencyCallL(const TDesC &aNumber)[pure virtual]

Initiates an emergency call.

If the aNumber parameter supplies an "empty" buffer the call is created either dialing the default emergency phone number or use the SET UP EMERGENCY request that does not contain a dialling number.

Leaves with KErrArgument, if parameter aNumber was not an emergency number.

Pre-condition
IsActive() returns EFalse, otherwise leaves with KErrInUse.

Parameters

const TDesC & aNumberEmergency number to be dialed. The aNumber parameter should be a buffer and the clients are provided with a typedef called TPhCltEmergencyNumber.

FindEmergencyPhoneNumber(TDes &, TBool &)

IMPORT_C TIntFindEmergencyPhoneNumber(TDes &aNumber,
TBool &aIsEmergencyNumber
)[pure virtual]

Method can be used to check if the number specified contains a valid emergency number in the end of the number.

Parameters

TDes & aNumberNumber to be queried, matched emergency number is returned in this parameter. The aNumber parameter should be a buffer and the clients are provided with a typedef called TPhCltTelephoneNumber.
TBool & aIsEmergencyNumberIf ETrue, then the aNumber parameter was emergency number.

IsEmergencyPhoneNumber(const TDesC &, TBool &)

IMPORT_C TIntIsEmergencyPhoneNumber(const TDesC &aNumber,
TBool &aIsEmergencyNumber
)[pure virtual]

Returns information whether the number specified was an emergency number.

Parameters

const TDesC & aNumberNumber to be queried. aNumber might contain prefix (SS code) and/or postfix (DTMF part). The aNumber parameter should be a buffer and the clients are provided with a typedef called TPhCltEmergencyNumber.
TBool & aIsEmergencyNumberIf ETrue, then the aNumber parameter included emergency number.

IsEmergencyPhoneNumber(const TDesC &, TDes &, TBool &)

IMPORT_C TIntIsEmergencyPhoneNumber(const TDesC &aNumber,
TDes &aMatchedEmergencyNumber,
TBool &aIsEmergencyNumber
)[pure virtual]

Returns information whether the number specified was an emergency number and also returns the plain emergency number.

Parameters

const TDesC & aNumberNumber to be queried.aNumber might contain prefix (SS code) and/or postfix (DTMF part). The aNumber parameter should be a buffer and the clients are provided with a typedef called TPhCltEmergencyNumber.
TDes & aMatchedEmergencyNumberMatched emergencynumber without prefix or postfix is returned in this parameter. The aMatchedEmergencyNumber parameter should be a buffer and the clients are provided with atypedef called TPhCltEmergencyNumber.
TBool & aIsEmergencyNumberIf ETrue, then the aNumber parameter included emergency number.

NewL(MPhCltEmergencyCallObserver *)

IMPORT_C CPhCltEmergencyCall *NewL(MPhCltEmergencyCallObserver *aObserver)[static]

Create an instance that implements the interface.

Parameters

MPhCltEmergencyCallObserver * aObserverIt is the observer for the instance.

Member Data Documentation

MPhCltEmergencyCallObserver * iObserver

MPhCltEmergencyCallObserver *iObserver[protected]