CSIPConnectionImplementation Class Reference

class CSIPConnectionImplementation : public CBase

Implementation class for managing a connection.

Inherits from

  • CSIPConnectionImplementation
Public Member Functions
~CSIPConnectionImplementation()
voidAddDialogL(CSIPDialogImplementation &)
voidAddRegistrationL(CRegBindingImplementation &)
voidAddTransactionL(CSIPTransactionBase &)
voidCSIPDeleted()
TInt CheckIfStandAlone()
CSIPClientConnection *ClientConnection()
CSIPClientConnection &ClientConnectionL()
voidConnectionStateChanged(CSIPConnection::TState)
voidDeletingRefresh(CSIPRefresh &, TUint32)
voidDialogErrorOccured(TInt, TUint32, TUint32)
voidDialogErrorOccured(TInt, TUint32, TUint32, TUint32)
voidErrorOccured(TInt, TUint32)
CSIPClientTransaction *FetchRegistrationsL(CSIPRequestElements *)
CSIPClientTransaction *FindClientTransaction(TUint32)
CSIPDialogImplementation *FindDialogByRequestId(TUint32)
CSIPRefresh *FindRefresh(TUint32, TUint32)
CSIPTransactionBase *FindTransaction(TUint32)
TUint32 IapId()
voidIncomingDialogRequestL(CSIPRequestElements *, TUint32, TUint32)
voidIncomingDialogResponseL(CSIPResponseElements *, TUint32, TUint32)
voidIncomingDialogResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32)
voidIncomingRefreshResponseL(CSIPResponseElements *, TUint32, TUint32)
voidIncomingRegistrationResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32)
voidIncomingRequestL(CSIPRequestElements *, TUint32)
voidIncomingResponseL(CSIPResponseElements *, TUint32)
voidIncomingResponseToDialogL(CSIPResponseElements *, TUint32, TUint32, TUint32 *)
CDialogState *InitialDialogStateL()
CRegistrationState *InitialRegisterStateL()
voidInviteCompleted(TUint32)
CSIPConnectionImplementation *NewL(CSIP &, CSIPConnection &, TUint32, MSIPConnectionObserver &)
voidRefreshErrorOccured(TInt, TUint32)
voidRegistrationErrorOccured(TInt, TUint32, TUint32)
voidRemoveDialog(const CSIPDialogImplementation &)
voidRemoveRegistration(const CRegBindingImplementation &)
voidRemoveTransaction(const CSIPTransactionBase &)
CSIP *SIP()
const CSIP *SIP()
CSIPConnection &SIPConnectionL()
CSIPClientTransaction *SendRequestL(CSIPRequestElements *, TUint32 *, CSIPRefresh *)
voidSetOptL(TUint, TUint, const TDesC8 &)
voidSetOptL(TUint, TUint, TInt)
CSIPConnection::TState State()
MTransactionAssociation &TransactionAssociation()
CSIPClientTransaction *UpdateRefreshL(CSIPRefresh &, CSIPMessageElements *, TBool)
Private Member Functions
CSIPConnectionImplementation(CSIP &, CSIPConnection &, TUint32, MSIPConnectionObserver &)
voidCheckCSipL()
voidConnectionLost()
voidConstructL()
CSIPDialogImplementation *FindDialog(TUint32)
TBool FindRefresh(TUint32, TUint32, CSIPRefresh **, CSIPClientTransaction **)
CRegBindingImplementation *FindRegistration(TUint32, TUint32)
CRegBindingImplementation *FindRegistration(TUint32)
CSIPServerTransaction *GetStoredTransaction(TUint32)
voidIncomingRequestBeforeDialogExistsL(CSIPServerTransaction *, TUint32)
UNIT_TEST(CSIP_Test)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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 Attributes
CConnectionCallback *iCallbackInfo
CSIPClientConnection *iClientConnection
CSIPConnection &iConnection
RPointerArray< CSIPDialogImplementation >iDialogs
TUint32 iIapId
MSIPConnectionObserver &iObserver
RPointerArray< CSIPRefresh >iRefreshes
RPointerArray< CRegBindingImplementation >iRegistrations
CSIP *iSIP
RPointerArray< CSIPTransactionBase >iTransactions

Constructor & Destructor Documentation

CSIPConnectionImplementation(CSIP &, CSIPConnection &, TUint32, MSIPConnectionObserver &)

CSIPConnectionImplementation(CSIP &aSIP,
CSIPConnection &aConnection,
TUint32aIapId,
MSIPConnectionObserver &aObserver
)[private]

Parameters

CSIP & aSIP
CSIPConnection & aConnection
TUint32 aIapId
MSIPConnectionObserver & aObserver

~CSIPConnectionImplementation()

~CSIPConnectionImplementation()

Destructor

Member Functions Documentation

AddDialogL(CSIPDialogImplementation &)

voidAddDialogL(CSIPDialogImplementation &aDialog)

Parameters

CSIPDialogImplementation & aDialog

AddRegistrationL(CRegBindingImplementation &)

voidAddRegistrationL(CRegBindingImplementation &aRegistration)

Parameters

CRegBindingImplementation & aRegistration

AddTransactionL(CSIPTransactionBase &)

voidAddTransactionL(CSIPTransactionBase &aTransaction)

Parameters

CSIPTransactionBase & aTransaction

CSIPDeleted()

voidCSIPDeleted()

Informs CSIPConnection that the associated CSIP instance has been deleted. After this the CSIPConnection object can't be used anymore.

CheckCSipL()

voidCheckCSipL()const [private]

Checks that CSIP is available for use (not NULL). If iSIP is NULL, it means user has deleted a resource needed by CSIPConnectionImplementation, and this function leaves.

CheckIfStandAlone()

TInt CheckIfStandAlone()

ClientConnection()

CSIPClientConnection *ClientConnection()

ClientConnectionL()

CSIPClientConnection &ClientConnectionL()

ConnectionLost()

voidConnectionLost()const [private]

Connection is no longer available. All registrations, dialogs, transactions and refreshes using this connection are terminated, but not deleted.

ConnectionStateChanged(CSIPConnection::TState)

voidConnectionStateChanged(CSIPConnection::TStateaState)

Parameters

CSIPConnection::TState aState

ConstructL()

voidConstructL()[private]

DeletingRefresh(CSIPRefresh &, TUint32)

voidDeletingRefresh(CSIPRefresh &aRefresh,
TUint32aRefreshId
)

Parameters

CSIPRefresh & aRefresh
TUint32 aRefreshId

DialogErrorOccured(TInt, TUint32, TUint32)

voidDialogErrorOccured(TIntaError,
TUint32aDialogId,
TUint32aRequestId
)

Parameters

TInt aError
TUint32 aDialogId
TUint32 aRequestId

DialogErrorOccured(TInt, TUint32, TUint32, TUint32)

voidDialogErrorOccured(TIntaError,
TUint32aDialogId,
TUint32aRefreshId,
TUint32aRequestId
)

Parameters

TInt aError
TUint32 aDialogId
TUint32 aRefreshId
TUint32 aRequestId

ErrorOccured(TInt, TUint32)

voidErrorOccured(TIntaError,
TUint32aRequestId
)

Parameters

TInt aError
TUint32 aRequestId

FetchRegistrationsL(CSIPRequestElements *)

CSIPClientTransaction *FetchRegistrationsL(CSIPRequestElements *aElements)
Creates SIP REGISTER request and sends it to the given destination. User must no define any Contact or Expires-headers in the provided elements.
Pre-condition
State() == EActive
aElements != 0
aElements->Method().DesC().Length()==0

Parameters

CSIPRequestElements * aElementscontains local and remote addresses, optional SIP message headers and body. User must not set any expires values to aElements. The ownership is transferred.

FindClientTransaction(TUint32)

CSIPClientTransaction *FindClientTransaction(TUint32aRequestId)const

Finds a client transaction by its ID. All connection, registration and dialog related transactions are searched through.

Parameters

TUint32 aRequestIdrequest ID of the client transaction

FindDialog(TUint32)

CSIPDialogImplementation *FindDialog(TUint32aDialogId)const [private]

Searches for a dialog, using aDialogId as a key.

Parameters

TUint32 aDialogIdDialogId of the dialog.

FindDialogByRequestId(TUint32)

CSIPDialogImplementation *FindDialogByRequestId(TUint32aRequestId)const

Searches for a dialog, using aRequestId as a key.

Parameters

TUint32 aRequestIdRequestId of a transaction associated with the dialog

FindRefresh(TUint32, TUint32)

CSIPRefresh *FindRefresh(TUint32aRequestId,
TUint32aRefreshId
)const

Finds a refresh by its id. All connection, registration and dialog related refreshes are searched through.

Parameters

TUint32 aRequestIdRequestId associated with the refresh instance
TUint32 aRefreshIdRefreshId associated with the refresh instance

FindRefresh(TUint32, TUint32, CSIPRefresh **, CSIPClientTransaction **)

TBool FindRefresh(TUint32aRequestId,
TUint32aRefreshId,
CSIPRefresh **aRefresh,
CSIPClientTransaction **aTransaction
)const [private]

Searches for a refresh and transaction, using aRequestId and aRefreshId as keys.

Parameters

TUint32 aRequestIdRequestId associated with the refreshed transaction
TUint32 aRefreshIdRefreshId associated with the refresh instance
CSIPRefresh ** aRefreshOUT: if refresh was found, this pointer is set to the refresh instance. Ownership is not transferred.
CSIPClientTransaction ** aTransactionOUT: if transaction was found, this pointer is set to the refreshed client transaction. Ownership is not transferred.

FindRegistration(TUint32, TUint32)

CRegBindingImplementation *FindRegistration(TUint32aRegistrationId,
TUint32aRequestId
)const [private]

Searches for a registration, using aRegistrationId and aRequestId as keys. Registration might not yet have received RegistrationId from SIP client, so the aRequestId may be needed for searching.

Parameters

TUint32 aRegistrationIdRegistrationId of the registration
TUint32 aRequestIdRequestId of a transaction associated with the registration

FindRegistration(TUint32)

CRegBindingImplementation *FindRegistration(TUint32aRequestId)const [private]

Searches for a registration, using aRequestId as a key.

Parameters

TUint32 aRequestIdRequestId of a transaction associated with the registration

FindTransaction(TUint32)

CSIPTransactionBase *FindTransaction(TUint32aRequestId)const

Searches for a transaction with the matching aRequestId.

Parameters

TUint32 aRequestIdRequestId associated with the transaction

GetStoredTransaction(TUint32)

CSIPServerTransaction *GetStoredTransaction(TUint32aDialogId)[private]

Extracts the oldest stored transaction for the dialog identified by aDialogId.

Parameters

TUint32 aDialogIdDialogId

IapId()

TUint32 IapId()const

Gets Iap-id used for this connection

IncomingDialogRequestL(CSIPRequestElements *, TUint32, TUint32)

voidIncomingDialogRequestL(CSIPRequestElements *aElements,
TUint32aRequestId,
TUint32aDialogId
)

Parameters

CSIPRequestElements * aElements
TUint32 aRequestId
TUint32 aDialogId

IncomingDialogResponseL(CSIPResponseElements *, TUint32, TUint32)

voidIncomingDialogResponseL(CSIPResponseElements *aElements,
TUint32aRequestId,
TUint32aDialogId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aDialogId

IncomingDialogResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32)

voidIncomingDialogResponseL(CSIPResponseElements *aElements,
TUint32aRequestId,
TUint32aRefreshId,
TUint32aDialogId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aRefreshId
TUint32 aDialogId

IncomingRefreshResponseL(CSIPResponseElements *, TUint32, TUint32)

voidIncomingRefreshResponseL(CSIPResponseElements *aElements,
TUint32aRequestId,
TUint32aRefreshId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aRefreshId

IncomingRegistrationResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32)

voidIncomingRegistrationResponseL(CSIPResponseElements *aElements,
TUint32aRequestId,
TUint32aRefreshId,
TUint32aRegistrationId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aRefreshId
TUint32 aRegistrationId

IncomingRequestBeforeDialogExistsL(CSIPServerTransaction *, TUint32)

voidIncomingRequestBeforeDialogExistsL(CSIPServerTransaction *aTransaction,
TUint32aDialogId
)[private]

A request has been received with a dialogId, but no matching dialog exists. If the request is NOTIFY, it is stored until a response with the same dialogId is received. Then the response is passed to dialog and after that all the stored NOTIFY are passed to the same dialog. This is needed since NOTIFY can be received before a sent SUBSCRIBE receives a response with dialogId.

Parameters

CSIPServerTransaction * aTransactionServer transaction, ownership is transferred
TUint32 aDialogIdDialogId

IncomingRequestL(CSIPRequestElements *, TUint32)

voidIncomingRequestL(CSIPRequestElements *aElements,
TUint32aRequestId
)

Parameters

CSIPRequestElements * aElements
TUint32 aRequestId

IncomingResponseL(CSIPResponseElements *, TUint32)

voidIncomingResponseL(CSIPResponseElements *aElements,
TUint32aRequestId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId

IncomingResponseToDialogL(CSIPResponseElements *, TUint32, TUint32, TUint32 *)

voidIncomingResponseToDialogL(CSIPResponseElements *aElements,
TUint32aRequestId,
TUint32aDialogId,
TUint32 *aRefreshId
)

Response related to a dialog has been received.

Parameters

CSIPResponseElements * aElementsSIP response elements. Ownership is transferred.
TUint32 aRequestIdIdentifies the transaction
TUint32 aDialogIdDialogId
TUint32 * aRefreshIdNULL if the response is not related to a refresh, otherwise the RefreshId. Ownership is not transferred.

InitialDialogStateL()

CDialogState *InitialDialogStateL()const

Obtains the initial state for dialog state machine.

InitialRegisterStateL()

CRegistrationState *InitialRegisterStateL()const

Obtains the initial state for registration state machine.

InviteCompleted(TUint32)

voidInviteCompleted(TUint32aRequestId)

Parameters

TUint32 aRequestId

NewL(CSIP &, CSIPConnection &, TUint32, MSIPConnectionObserver &)

CSIPConnectionImplementation *NewL(CSIP &aSIP,
CSIPConnection &aConnection,
TUint32aIapId,
MSIPConnectionObserver &aObserver
)[static]

Two-phased constructor.

Parameters

CSIP & aSIPHandle to the SIP server
CSIPConnection & aConnectionAssociated CSIPConnection
TUint32 aIapIdIAP-id
MSIPConnectionObserver & aObservera observer for receiving asynchonous events on this connection

RefreshErrorOccured(TInt, TUint32)

voidRefreshErrorOccured(TIntaError,
TUint32aRefreshId
)

Parameters

TInt aError
TUint32 aRefreshId

RegistrationErrorOccured(TInt, TUint32, TUint32)

voidRegistrationErrorOccured(TIntaError,
TUint32aRegistrationId,
TUint32aRequestId
)

Parameters

TInt aError
TUint32 aRegistrationId
TUint32 aRequestId

RemoveDialog(const CSIPDialogImplementation &)

voidRemoveDialog(const CSIPDialogImplementation &aDialog)

Parameters

const CSIPDialogImplementation & aDialog

RemoveRegistration(const CRegBindingImplementation &)

voidRemoveRegistration(const CRegBindingImplementation &aRegistration)

Removes a registration from the array, but doesn't delete it.

Parameters

const CRegBindingImplementation & aRegistrationRegistration binding to be removed

RemoveTransaction(const CSIPTransactionBase &)

voidRemoveTransaction(const CSIPTransactionBase &aTransaction)

Parameters

const CSIPTransactionBase & aTransaction

SIP()

CSIP *SIP()

Gets SIP server handle

SIP()

const CSIP *SIP()const

Gets SIP server handle

SIPConnectionL()

CSIPConnection &SIPConnectionL()

SendRequestL(CSIPRequestElements *, TUint32 *, CSIPRefresh *)

CSIPClientTransaction *SendRequestL(CSIPRequestElements *aElements,
TUint32 *aRegistrationId,
CSIPRefresh *aRefresh
)

Send a SIP request.

Parameters

CSIPRequestElements * aElementsSIP headers. Ownership is transferred.
TUint32 * aRegistrationIdIf non-NULL, request will use the outbound proxy and some SIP headers from the registration identified by aRegistrationId. Ownership is not transferred.
CSIPRefresh * aRefreshIf non-NULL, the request will be refreshed. Otherwise NULL. Ownership is not transferred.

SetOptL(TUint, TUint, const TDesC8 &)

voidSetOptL(TUintaOptionName,
TUintaOptionLevel,
const TDesC8 &aOption
)

Parameters

TUint aOptionName
TUint aOptionLevel
const TDesC8 & aOption

SetOptL(TUint, TUint, TInt)

voidSetOptL(TUintaOptionName,
TUintaOptionLevel,
TIntaOption
)

Parameters

TUint aOptionName
TUint aOptionLevel
TInt aOption

State()

CSIPConnection::TState State()const

Gets current state of the connection

TransactionAssociation()

MTransactionAssociation &TransactionAssociation()

UNIT_TEST(CSIP_Test)

UNIT_TEST(CSIP_Test)const [private]

Parameters

CSIP_Test

UpdateRefreshL(CSIPRefresh &, CSIPMessageElements *, TBool)

CSIPClientTransaction *UpdateRefreshL(CSIPRefresh &aRefresh,
CSIPMessageElements *aElements,
TBoolaTerminate
)

Parameters

CSIPRefresh & aRefresh
CSIPMessageElements * aElements
TBool aTerminate

Member Data Documentation

CConnectionCallback * iCallbackInfo

CConnectionCallback *iCallbackInfo[private]

CSIPClientConnection * iClientConnection

CSIPClientConnection *iClientConnection[private]

CSIPConnection & iConnection

CSIPConnection &iConnection[private]

RPointerArray< CSIPDialogImplementation > iDialogs

RPointerArray< CSIPDialogImplementation >iDialogs[private]

TUint32 iIapId

TUint32 iIapId[private]

MSIPConnectionObserver & iObserver

MSIPConnectionObserver &iObserver[private]

RPointerArray< CSIPRefresh > iRefreshes

RPointerArray< CSIPRefresh >iRefreshes[private]

RPointerArray< CRegBindingImplementation > iRegistrations

RPointerArray< CRegBindingImplementation >iRegistrations[private]

CSIP * iSIP

CSIP *iSIP[private]

RPointerArray< CSIPTransactionBase > iTransactions

RPointerArray< CSIPTransactionBase >iTransactions[private]