CSIPRefresh Class Reference

class CSIPRefresh : public CBase

Class for managing SIP refresh. It provides functions for getting associated sip transaction and state. Class also provides functions for updating and terminating stand-alone refreshes.

Note that only stand-alone refreshes (i.e. refreshes that are not associated with registration binding or dialog associations) can be terminated or updated using functions defined in this class.

sipclient.lib

Inherits from

Constructor & Destructor Documentation

CSIPRefresh()

CSIPRefresh()[private]

~CSIPRefresh()

IMPORT_C~CSIPRefresh()

Destructor

Member Functions Documentation

AddTransaction(CSIPClientTransaction &)

voidAddTransaction(CSIPClientTransaction &aTransaction)

Parameters

CSIPClientTransaction & aTransaction

ChangeState(CSIPRefresh::TState)

voidChangeState(CSIPRefresh::TStateaNextState)

Parameters

CSIPRefresh::TState aNextState

CheckStateL()

voidCheckStateL()const [private]

ConstructL()

voidConstructL()[private]

DoesMatch(TUint32)

TBool DoesMatch(TUint32aRefreshId)const

Parameters

TUint32 aRefreshId

IntervalL()

IMPORT_C TUintIntervalL()const
Gets current refresh interval
Pre-condition
State()==CSIPRefreshEActive
leave
KErrSIPResourceNotAvailable if SIP server can't be contacted because a required resource has been deleted.

IsStandAlone()

IMPORT_C TBoolIsStandAlone()const

Tests if the refresh is a stand-alone refresh

NewL()

IMPORT_C CSIPRefresh *NewL()[static]

Two-phased constructor

NewLC()

IMPORT_C CSIPRefresh *NewLC()[static]

Two-phased constructor

RefreshId()

TUint32 RefreshId()const

RemoveRefreshOwner(const MSIPRefreshAssociation &)

voidRemoveRefreshOwner(const MSIPRefreshAssociation &aAssoc)

Parameters

const MSIPRefreshAssociation & aAssoc

RemoveTransaction()

voidRemoveTransaction()

RequestType()

RStringF RequestType()const

SIPTransaction()

IMPORT_C const CSIPClientTransaction *SIPTransaction()const

Gets the associated SIP transaction with this refresh.

SetIntervalL(TUint)

IMPORT_C voidSetIntervalL(TUintaInterval)
Sets refresh interval. Note that SIP server choses the refresh interval. This function should be used only if SIP server has indicated new refresh interval using SIP messages that are not associated to the refresh needing the update.
Pre-condition
State()==CSIPRefreshEActive
aInterval > 0
leave
KErrArgument if aInterval == 0
leave
KErrSIPInvalidTransactionState if State() is not EActive
leave
KErrSIPResourceNotAvailable if SIP server can't be contacted because a required resource has been deleted.

Parameters

TUint aIntervala new interval in seconds

SetRefreshIdIfEmpty(TUint32)

voidSetRefreshIdIfEmpty(TUint32aRefreshId)

Parameters

TUint32 aRefreshId

SetRefreshOwner(MSIPRefreshAssociation &)

voidSetRefreshOwner(MSIPRefreshAssociation &aAssoc)

Associate the CSIPRefresh with another object.

Parameters

MSIPRefreshAssociation & aAssocObject associated with the CSIPRefresh

SetRequestType(RStringF)

voidSetRequestType(RStringFaType)

Parameters

RStringF aType

State()

IMPORT_C CSIPRefresh::TStateState()const

Gets the state of the refresh

TerminateL(CSIPMessageElements *)

IMPORT_C CSIPClientTransaction *TerminateL(CSIPMessageElements *aElements = 0)
Terminates the refresh by sending SIP request to the remote destination. The new client transactation will be of the same type as the first transaction associated with this request.
Pre-condition
State()==EActive
IsStandAlone()==ETrue
leave
KErrSIPInvalidTransactionState if State() is not EActive KErrNotFound if the CSIPRefresh is no longer associated to anything KSIPErrInvalidRegistrationState if trying to terminate a REGISTER refresh. KErrSIPInvalidDialogState if trying to terminate a dialog association being refreshed.
capability
NetworkServices

Parameters

CSIPMessageElements * aElements = 0contains optional SIP message headers and body. Ownership is transferred.

Transaction()

CSIPClientTransaction *Transaction()

UpdateL(CSIPMessageElements *)

IMPORT_C CSIPClientTransaction *UpdateL(CSIPMessageElements *aElements = 0)
Updates the refresh by sending SIP request to the remote destination. The new client transactation will be of the same type as the first transaction associated with this request.
Pre-condition
State()==EActive
IsStandAlone()==ETrue
leave
KErrSIPInvalidTransactionState if State() is not EActive KErrNotFound if the CSIPRefresh is no longer associated to anything KErrSIPInvalidRegistrationState if trying to update a REGISTER refresh. KSIPErrInvalidDialogState if trying to update a dialog association being refreshed.
capability
NetworkServices

Parameters

CSIPMessageElements * aElements = 0contains optional SIP message headers and body. Ownership is transferred.

UpdateRefreshState(TUint)

voidUpdateRefreshState(TUintaStatusCode)

Parameters

TUint aStatusCode

operator==(const CSIPRefresh &)

IMPORT_C TBooloperator==(const CSIPRefresh &aRefresh)const

Compares this object to another object

Parameters

const CSIPRefresh & aRefresha CSIPRefresh type object to compare

Member Enumerations Documentation

Enum TState

SIP refresh states

Enumerators

EInactive

SIP refresh is inactive

EActive

SIP refresh active

ETerminated

SIP refresh is terminated

EConstructing

Object is being constructed and is not yet ready for use

Member Data Documentation

CSIPClientTransaction * iClientTransaction

CSIPClientTransaction *iClientTransaction[private]

MSIPRefreshAssociation * iOwner

MSIPRefreshAssociation *iOwner[private]

TUint32 iRefreshId

TUint32 iRefreshId[private]

RStringF iRequestType

RStringF iRequestType[private]

TState iState

TState iState[private]