CAnswerIncomingCallAct Class Reference

class CAnswerIncomingCallAct : public CAsyncRequestBaseAct

This is an active object responsible for interacting with Multimode ETel

Inherits from

Public Member Functions
~CAnswerIncomingCallAct()
voidAnswerIncomingCall(CTelephony::TCallId &, CTelephony::TCallId &)
voidEventCompleted()
CAnswerIncomingCallAct *NewL(CTelephonyFunctions *, MIncomingCallNameSubject &, RArray< RMobileCall > &, RArray< CTelephonyFunctions::TCallPoolOperation > &)
Protected Member Functions
voidComplete()
voidDoCancel()
TInt RunError(TInt)
Private Member Functions
CAnswerIncomingCallAct(CTelephonyFunctions *, MIncomingCallNameSubject &, RArray< RMobileCall > &, RArray< CTelephonyFunctions::TCallPoolOperation > &)
voidConstructL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CAsyncRequestBaseAct::CAsyncRequestBaseAct()
CAsyncRequestBaseAct::RunL()
CAsyncRequestBaseAct::~CAsyncRequestBaseAct()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTAnswerIncomingCallState { EAnswerIncomingCallStateIdle, EAnswerIncomingCallStateAnswering, EAnswerIncomingCallStateWaiting }
Inherited Enumerations
CActive:TPriority
Private Attributes
CTelephony::TCallId *iCallId
RArray< RMobileCall > &iCallPool
RArray< CTelephonyFunctions::TCallPoolOperation > &iCallPoolStatus
MIncomingCallNameSubject &iIncomingCallNameSubject
RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg iMMCallParamsPckg
RMobileCall::TEtel3rdPartyMobileCallParamsV1 iMMcallParams
TAnswerIncomingCallState iState
CTelephonyFunctions *iTelephonyFunctions
CTelephony::TCallId iTempCallId
RTimer iTimer
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CAnswerIncomingCallAct(CTelephonyFunctions *, MIncomingCallNameSubject &, RArray< RMobileCall > &, RArray< CTelephonyFunctions::TCallPoolOperation > &)

CAnswerIncomingCallAct(CTelephonyFunctions *aTelephonyFunctions,
MIncomingCallNameSubject &aIncomingCallNameSubject,
RArray< RMobileCall > &aCallPool,
RArray< CTelephonyFunctions::TCallPoolOperation > &aCallPoolStatus
)[private]

First-phase constructor which cannot Leave().

Parameters

CTelephonyFunctions * aTelephonyFunctionsPointer to the CTelephonyFunctions object that constructs this object.
MIncomingCallNameSubject & aIncomingCallNameSubjectReference to an AO owned by iTelephonyFunctions which implements the MIncomingCallNameSubject interface. Used by this object to retrieve the call name of the incoming call.
RArray< RMobileCall > & aCallPoolReference to the call pool array owned by iTelephonyFunctions.
RArray< CTelephonyFunctions::TCallPoolOperation > & aCallPoolStatusReference to the call pool status array owned by iTelephonyFunctions.

~CAnswerIncomingCallAct()

~CAnswerIncomingCallAct()

Default destructor.

Member Functions Documentation

AnswerIncomingCall(CTelephony::TCallId &, CTelephony::TCallId &)

voidAnswerIncomingCall(CTelephony::TCallId &aCallId,
CTelephony::TCallId &aTempCallId
)

Issue Request.

This AO starts off in the EAnswerIncomingCallStateIdle state. In order to answer the incoming call, the line must be ringing and the CNotifyIncomingCallAct AO must have completed. When this function is called, it checks if CNotifyIncomingCallAct has a valid call name available. This means that the notify incoming call event has completed and the call object has been created. When this happens, the call can be answered. This AO then moves into the EAnswerIncomingCallStateAnswering state and proceeds to answer the call. If CNotifyIncomingCallAct does not have a valid call name available, then there is no guarantee that the call object exists and hence the call cannot be answered yet. If this happens, this AO will move into the EAnswerIncomingCallStateWaiting state and will wait for up to 1 second for CNotifyIncomingCallAct AO to complete. If it does complete during or when this one second interval is up, an attempt to answer the call will be made, otherwise KErrTimedOut will be returned back to the client.

Parameters

CTelephony::TCallId & aCallIdStores the call ID which will be returned to the client.
CTelephony::TCallId & aTempCallIdStores free call ID.

Complete()

voidComplete()[protected, virtual]

Service completed request.

Two different requests could have been issued by AnswerIncomingCall() depending on the state of this AO. If it is in the EAnswerIncomingCallStateAnswering state, then it has just finished answering the incoming call. If it is in the EAnswerIncomingCallStateWaiting state, then it was waiting for the CNotifyIncomingCallAct AO to complete and the 1 second timeout has finished. When this happens, it checks to see if CNotifyIncomingCallAct contains a valid call name. If so, it has completed, and this AO will post a request to answer the incoming call. If not, then there is a problem and the KErrAccessDenied error is returned via the iStatus status variable.

ConstructL()

voidConstructL()[private]

Second phase constructor.

DoCancel()

voidDoCancel()[protected, virtual]

Cancel request.

Async request to answer the call and timer are cancelled.

EventCompleted()

voidEventCompleted()

Implementation of the MEventObserver interface. If this object is in the EAnswerIncomingCallStateWaiting state, it is waiting for up to 1 second for CNotifyIncomingCallAct to complete so that it can answer the incoming call. When CNotifyIncomingCallAct completes during this 1 second period, this function is called to stop the timer and proceed to answer the call. After the timer is cancelled, the Active Scheduler will automatically complete this AO.

NewL(CTelephonyFunctions *, MIncomingCallNameSubject &, RArray< RMobileCall > &, RArray< CTelephonyFunctions::TCallPoolOperation > &)

CAnswerIncomingCallAct *NewL(CTelephonyFunctions *aTelephonyFunctions,
MIncomingCallNameSubject &aIncomingCallNameSubject,
RArray< RMobileCall > &aCallPool,
RArray< CTelephonyFunctions::TCallPoolOperation > &aCallPoolStatus
)[static]

Public constructor which can Leave().

leave
Leaves if no memory.

Parameters

CTelephonyFunctions * aTelephonyFunctionsObject that constructs this object.
MIncomingCallNameSubject & aIncomingCallNameSubjectReference to an active object owned by iTelephonyFunctions. Used to retrieve the call name of the new incoming call.
RArray< RMobileCall > & aCallPoolReference to the call pool array owned by aTelephonyFunctions
RArray< CTelephonyFunctions::TCallPoolOperation > & aCallPoolStatusReference to the call pool status array owned by aTelephonyFunction

RunError(TInt)

TInt RunError(TIntaLeaveCode)[protected, virtual]

Handle any Leave() from inside RunL().

Parameters

TInt aLeaveCodepassed in if RunL Leaves.

Member Enumerations Documentation

Enum TAnswerIncomingCallState

The state a CAnswerIncomingCallAct object is in.

Enumerators

EAnswerIncomingCallStateIdle

Idle. Default state when a CAnswerIncomingCallAct object is created.

EAnswerIncomingCallStateAnswering

Answering an incoming call. Enters this state when the line status is ringing and there is a valid call name stored in CNotifyIncomingCallAct object.

EAnswerIncomingCallStateWaiting

Waiting for CNotifyIncomingCallAct::NotifyIncomingCall() to complete.

Member Data Documentation

CTelephony::TCallId * iCallId

CTelephony::TCallId *iCallId[private]

RArray< RMobileCall > & iCallPool

RArray< RMobileCall > &iCallPool[private]

Reference to the call pool array owned by iTelephonyFunctions.

RArray< CTelephonyFunctions::TCallPoolOperation > & iCallPoolStatus

RArray< CTelephonyFunctions::TCallPoolOperation > &iCallPoolStatus[private]

Reference to the call pool status array owned by iTelephonyFunctions.

MIncomingCallNameSubject & iIncomingCallNameSubject

MIncomingCallNameSubject &iIncomingCallNameSubject[private]

Reference to active object owned by iTelephonyFunctions which implements MIncomingCallNameSubject interface. Allows this AO to retrieve the call name of an incoming call.

RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg iMMCallParamsPckg

RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg iMMCallParamsPckg[private]

RMobileCall::TEtel3rdPartyMobileCallParamsV1 iMMcallParams

RMobileCall::TEtel3rdPartyMobileCallParamsV1 iMMcallParams[private]

TAnswerIncomingCallState iState

TAnswerIncomingCallState iState[private]

State this active object is currently in.

CTelephonyFunctions * iTelephonyFunctions

CTelephonyFunctions *iTelephonyFunctions[private]

CTelephony::TCallId iTempCallId

CTelephony::TCallId iTempCallId[private]

RTimer iTimer

RTimer iTimer[private]

Timer object used to wait for NotifyIncomingCall to complete.