CSIPConnectionImplementation Class Reference

class CSIPConnectionImplementation : public CBase

Implementation class for managing a connection.

Inherits from

  • CSIPConnectionImplementation
Public Member Functions
~CSIPConnectionImplementation ()
void AddDialogL ( CSIPDialogImplementation &)
void AddRegistrationL ( CRegBindingImplementation &)
void AddTransactionL ( CSIPTransactionBase &)
void CSIPDeleted ()
TInt CheckIfStandAlone ()
CSIPClientConnection * ClientConnection ()
CSIPClientConnection & ClientConnectionL ()
void ConnectionStateChanged ( CSIPConnection::TState )
void DeletingRefresh ( CSIPRefresh &, TUint32 )
void DialogErrorOccured ( TInt , TUint32 , TUint32 )
void DialogErrorOccured ( TInt , TUint32 , TUint32 , TUint32 )
void ErrorOccured ( TInt , TUint32 )
CSIPClientTransaction * FetchRegistrationsL ( CSIPRequestElements *)
CSIPClientTransaction * FindClientTransaction ( TUint32 )
CSIPDialogImplementation * FindDialogByRequestId ( TUint32 )
CSIPRefresh * FindRefresh ( TUint32 , TUint32 )
CSIPTransactionBase * FindTransaction ( TUint32 )
TUint32 IapId ()
void IncomingDialogRequestL ( CSIPRequestElements *, TUint32 , TUint32 )
void IncomingDialogResponseL ( CSIPResponseElements *, TUint32 , TUint32 )
void IncomingDialogResponseL ( CSIPResponseElements *, TUint32 , TUint32 , TUint32 )
void IncomingRefreshResponseL ( CSIPResponseElements *, TUint32 , TUint32 )
void IncomingRegistrationResponseL ( CSIPResponseElements *, TUint32 , TUint32 , TUint32 )
void IncomingRequestL ( CSIPRequestElements *, TUint32 )
void IncomingResponseL ( CSIPResponseElements *, TUint32 )
void IncomingResponseToDialogL ( CSIPResponseElements *, TUint32 , TUint32 , TUint32 *)
CDialogState * InitialDialogStateL ()
CRegistrationState * InitialRegisterStateL ()
void InviteCompleted ( TUint32 )
CSIPConnectionImplementation * NewL ( CSIP &, CSIPConnection &, TUint32 , MSIPConnectionObserver &)
void RefreshErrorOccured ( TInt , TUint32 )
void RegistrationErrorOccured ( TInt , TUint32 , TUint32 )
void RemoveDialog (const CSIPDialogImplementation &)
void RemoveRegistration (const CRegBindingImplementation &)
void RemoveTransaction (const CSIPTransactionBase &)
CSIP * SIP ()
const CSIP * SIP ()
CSIPConnection & SIPConnectionL ()
CSIPClientTransaction * SendRequestL ( CSIPRequestElements *, TUint32 *, CSIPRefresh *)
void SetOptL ( TUint , TUint , const TDesC8 &)
void SetOptL ( TUint , TUint , TInt )
CSIPConnection::TState State ()
MTransactionAssociation & TransactionAssociation ()
CSIPClientTransaction * UpdateRefreshL ( CSIPRefresh &, CSIPMessageElements *, TBool )
Private Member Functions
CSIPConnectionImplementation ( CSIP &, CSIPConnection &, TUint32 , MSIPConnectionObserver &)
void CheckCSipL ()
void ConnectionLost ()
void ConstructL ()
CSIPDialogImplementation * FindDialog ( TUint32 )
TBool FindRefresh ( TUint32 , TUint32 , CSIPRefresh **, CSIPClientTransaction **)
CRegBindingImplementation * FindRegistration ( TUint32 , TUint32 )
CRegBindingImplementation * FindRegistration ( TUint32 )
CSIPServerTransaction * GetStoredTransaction ( TUint32 )
void IncomingRequestBeforeDialogExistsL ( 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,
TUint32 aIapId,
MSIPConnectionObserver & aObserver
) [private]

Parameters

CSIP & aSIP
CSIPConnection & aConnection
TUint32 aIapId
MSIPConnectionObserver & aObserver

~CSIPConnectionImplementation()

~CSIPConnectionImplementation ( )

Destructor

Member Functions Documentation

AddDialogL(CSIPDialogImplementation &)

void AddDialogL ( CSIPDialogImplementation & aDialog )

Parameters

CSIPDialogImplementation & aDialog

AddRegistrationL(CRegBindingImplementation &)

void AddRegistrationL ( CRegBindingImplementation & aRegistration )

Parameters

CRegBindingImplementation & aRegistration

AddTransactionL(CSIPTransactionBase &)

void AddTransactionL ( CSIPTransactionBase & aTransaction )

Parameters

CSIPTransactionBase & aTransaction

CSIPDeleted()

void CSIPDeleted ( )

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

CheckCSipL()

void CheckCSipL ( ) 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()

void ConnectionLost ( ) const [private]

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

ConnectionStateChanged(CSIPConnection::TState)

void ConnectionStateChanged ( CSIPConnection::TState aState )

Parameters

CSIPConnection::TState aState

ConstructL()

void ConstructL ( ) [private]

DeletingRefresh(CSIPRefresh &, TUint32)

void DeletingRefresh ( CSIPRefresh & aRefresh,
TUint32 aRefreshId
)

Parameters

CSIPRefresh & aRefresh
TUint32 aRefreshId

DialogErrorOccured(TInt, TUint32, TUint32)

void DialogErrorOccured ( TInt aError,
TUint32 aDialogId,
TUint32 aRequestId
)

Parameters

TInt aError
TUint32 aDialogId
TUint32 aRequestId

DialogErrorOccured(TInt, TUint32, TUint32, TUint32)

void DialogErrorOccured ( TInt aError,
TUint32 aDialogId,
TUint32 aRefreshId,
TUint32 aRequestId
)

Parameters

TInt aError
TUint32 aDialogId
TUint32 aRefreshId
TUint32 aRequestId

ErrorOccured(TInt, TUint32)

void ErrorOccured ( TInt aError,
TUint32 aRequestId
)

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 * aElements contains 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 ( TUint32 aRequestId ) const

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

Parameters

TUint32 aRequestId request ID of the client transaction

FindDialog(TUint32)

CSIPDialogImplementation * FindDialog ( TUint32 aDialogId ) const [private]

Searches for a dialog, using aDialogId as a key.

Parameters

TUint32 aDialogId DialogId of the dialog.

FindDialogByRequestId(TUint32)

CSIPDialogImplementation * FindDialogByRequestId ( TUint32 aRequestId ) const

Searches for a dialog, using aRequestId as a key.

Parameters

TUint32 aRequestId RequestId of a transaction associated with the dialog

FindRefresh(TUint32, TUint32)

CSIPRefresh * FindRefresh ( TUint32 aRequestId,
TUint32 aRefreshId
) const

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

Parameters

TUint32 aRequestId RequestId associated with the refresh instance
TUint32 aRefreshId RefreshId associated with the refresh instance

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

TBool FindRefresh ( TUint32 aRequestId,
TUint32 aRefreshId,
CSIPRefresh ** aRefresh,
CSIPClientTransaction ** aTransaction
) const [private]

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

Parameters

TUint32 aRequestId RequestId associated with the refreshed transaction
TUint32 aRefreshId RefreshId associated with the refresh instance
CSIPRefresh ** aRefresh OUT: if refresh was found, this pointer is set to the refresh instance. Ownership is not transferred.
CSIPClientTransaction ** aTransaction OUT: if transaction was found, this pointer is set to the refreshed client transaction. Ownership is not transferred.

FindRegistration(TUint32, TUint32)

CRegBindingImplementation * FindRegistration ( TUint32 aRegistrationId,
TUint32 aRequestId
) 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 aRegistrationId RegistrationId of the registration
TUint32 aRequestId RequestId of a transaction associated with the registration

FindRegistration(TUint32)

CRegBindingImplementation * FindRegistration ( TUint32 aRequestId ) const [private]

Searches for a registration, using aRequestId as a key.

Parameters

TUint32 aRequestId RequestId of a transaction associated with the registration

FindTransaction(TUint32)

CSIPTransactionBase * FindTransaction ( TUint32 aRequestId ) const

Searches for a transaction with the matching aRequestId.

Parameters

TUint32 aRequestId RequestId associated with the transaction

GetStoredTransaction(TUint32)

CSIPServerTransaction * GetStoredTransaction ( TUint32 aDialogId ) [private]

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

Parameters

TUint32 aDialogId DialogId

IapId()

TUint32 IapId ( ) const

Gets Iap-id used for this connection

IncomingDialogRequestL(CSIPRequestElements *, TUint32, TUint32)

void IncomingDialogRequestL ( CSIPRequestElements * aElements,
TUint32 aRequestId,
TUint32 aDialogId
)

Parameters

CSIPRequestElements * aElements
TUint32 aRequestId
TUint32 aDialogId

IncomingDialogResponseL(CSIPResponseElements *, TUint32, TUint32)

void IncomingDialogResponseL ( CSIPResponseElements * aElements,
TUint32 aRequestId,
TUint32 aDialogId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aDialogId

IncomingDialogResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32)

void IncomingDialogResponseL ( CSIPResponseElements * aElements,
TUint32 aRequestId,
TUint32 aRefreshId,
TUint32 aDialogId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aRefreshId
TUint32 aDialogId

IncomingRefreshResponseL(CSIPResponseElements *, TUint32, TUint32)

void IncomingRefreshResponseL ( CSIPResponseElements * aElements,
TUint32 aRequestId,
TUint32 aRefreshId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aRefreshId

IncomingRegistrationResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32)

void IncomingRegistrationResponseL ( CSIPResponseElements * aElements,
TUint32 aRequestId,
TUint32 aRefreshId,
TUint32 aRegistrationId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId
TUint32 aRefreshId
TUint32 aRegistrationId

IncomingRequestBeforeDialogExistsL(CSIPServerTransaction *, TUint32)

void IncomingRequestBeforeDialogExistsL ( CSIPServerTransaction * aTransaction,
TUint32 aDialogId
) [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 * aTransaction Server transaction, ownership is transferred
TUint32 aDialogId DialogId

IncomingRequestL(CSIPRequestElements *, TUint32)

void IncomingRequestL ( CSIPRequestElements * aElements,
TUint32 aRequestId
)

Parameters

CSIPRequestElements * aElements
TUint32 aRequestId

IncomingResponseL(CSIPResponseElements *, TUint32)

void IncomingResponseL ( CSIPResponseElements * aElements,
TUint32 aRequestId
)

Parameters

CSIPResponseElements * aElements
TUint32 aRequestId

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

void IncomingResponseToDialogL ( CSIPResponseElements * aElements,
TUint32 aRequestId,
TUint32 aDialogId,
TUint32 * aRefreshId
)

Response related to a dialog has been received.

Parameters

CSIPResponseElements * aElements SIP response elements. Ownership is transferred.
TUint32 aRequestId Identifies the transaction
TUint32 aDialogId DialogId
TUint32 * aRefreshId NULL 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)

void InviteCompleted ( TUint32 aRequestId )

Parameters

TUint32 aRequestId

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

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

Two-phased constructor.

Parameters

CSIP & aSIP Handle to the SIP server
CSIPConnection & aConnection Associated CSIPConnection
TUint32 aIapId IAP-id
MSIPConnectionObserver & aObserver a observer for receiving asynchonous events on this connection

RefreshErrorOccured(TInt, TUint32)

void RefreshErrorOccured ( TInt aError,
TUint32 aRefreshId
)

Parameters

TInt aError
TUint32 aRefreshId

RegistrationErrorOccured(TInt, TUint32, TUint32)

void RegistrationErrorOccured ( TInt aError,
TUint32 aRegistrationId,
TUint32 aRequestId
)

Parameters

TInt aError
TUint32 aRegistrationId
TUint32 aRequestId

RemoveDialog(const CSIPDialogImplementation &)

void RemoveDialog ( const CSIPDialogImplementation & aDialog )

Parameters

const CSIPDialogImplementation & aDialog

RemoveRegistration(const CRegBindingImplementation &)

void RemoveRegistration ( const CRegBindingImplementation & aRegistration )

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

Parameters

const CRegBindingImplementation & aRegistration Registration binding to be removed

RemoveTransaction(const CSIPTransactionBase &)

void RemoveTransaction ( 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 * aElements SIP headers. Ownership is transferred.
TUint32 * aRegistrationId If non-NULL, request will use the outbound proxy and some SIP headers from the registration identified by aRegistrationId. Ownership is not transferred.
CSIPRefresh * aRefresh If non-NULL, the request will be refreshed. Otherwise NULL. Ownership is not transferred.

SetOptL(TUint, TUint, const TDesC8 &)

void SetOptL ( TUint aOptionName,
TUint aOptionLevel,
const TDesC8 & aOption
)

Parameters

TUint aOptionName
TUint aOptionLevel
const TDesC8 & aOption

SetOptL(TUint, TUint, TInt)

void SetOptL ( TUint aOptionName,
TUint aOptionLevel,
TInt aOption
)

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,
TBool aTerminate
)

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]