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

Public Member Functions
~CSIPRefresh ()
void AddTransaction ( CSIPClientTransaction &)
void ChangeState ( CSIPRefresh::TState )
TBool DoesMatch ( TUint32 )
IMPORT_C TUint IntervalL ()
IMPORT_C TBool IsStandAlone ()
IMPORT_C CSIPRefresh * NewL ()
IMPORT_C CSIPRefresh * NewLC ()
TUint32 RefreshId ()
void RemoveRefreshOwner (const MSIPRefreshAssociation &)
void RemoveTransaction ()
RStringF RequestType ()
IMPORT_C const CSIPClientTransaction * SIPTransaction ()
IMPORT_C void SetIntervalL ( TUint )
void SetRefreshIdIfEmpty ( TUint32 )
void SetRefreshOwner ( MSIPRefreshAssociation &)
void SetRequestType ( RStringF )
IMPORT_C CSIPRefresh::TState State ()
IMPORT_C CSIPClientTransaction * TerminateL ( CSIPMessageElements *)
CSIPClientTransaction * Transaction ()
IMPORT_C CSIPClientTransaction * UpdateL ( CSIPMessageElements *)
void UpdateRefreshState ( TUint )
IMPORT_C TBool operator== (const CSIPRefresh &)
Private Member Functions
CSIPRefresh ()
void CheckStateL ()
void ConstructL ()
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()
Public Member Enumerations
enum TState { EInactive , EActive , ETerminated , EConstructing }
Private Attributes
CSIPClientTransaction * iClientTransaction
MSIPRefreshAssociation * iOwner
TUint32 iRefreshId
RStringF iRequestType
TState iState

Constructor & Destructor Documentation

CSIPRefresh()

CSIPRefresh ( ) [private]

~CSIPRefresh()

IMPORT_C ~CSIPRefresh ( )

Destructor

Member Functions Documentation

AddTransaction(CSIPClientTransaction &)

void AddTransaction ( CSIPClientTransaction & aTransaction )

Parameters

CSIPClientTransaction & aTransaction

ChangeState(CSIPRefresh::TState)

void ChangeState ( CSIPRefresh::TState aNextState )

Parameters

CSIPRefresh::TState aNextState

CheckStateL()

void CheckStateL ( ) const [private]

ConstructL()

void ConstructL ( ) [private]

DoesMatch(TUint32)

TBool DoesMatch ( TUint32 aRefreshId ) const

Parameters

TUint32 aRefreshId

IntervalL()

IMPORT_C TUint IntervalL ( ) 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 TBool IsStandAlone ( ) 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 &)

void RemoveRefreshOwner ( const MSIPRefreshAssociation & aAssoc )

Parameters

const MSIPRefreshAssociation & aAssoc

RemoveTransaction()

void RemoveTransaction ( )

RequestType()

RStringF RequestType ( ) const

SIPTransaction()

IMPORT_C const CSIPClientTransaction * SIPTransaction ( ) const

Gets the associated SIP transaction with this refresh.

SetIntervalL(TUint)

IMPORT_C void SetIntervalL ( TUint aInterval )
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 aInterval a new interval in seconds

SetRefreshIdIfEmpty(TUint32)

void SetRefreshIdIfEmpty ( TUint32 aRefreshId )

Parameters

TUint32 aRefreshId

SetRefreshOwner(MSIPRefreshAssociation &)

void SetRefreshOwner ( MSIPRefreshAssociation & aAssoc )

Associate the CSIPRefresh with another object.

Parameters

MSIPRefreshAssociation & aAssoc Object associated with the CSIPRefresh

SetRequestType(RStringF)

void SetRequestType ( RStringF aType )

Parameters

RStringF aType

State()

IMPORT_C CSIPRefresh::TState State ( ) 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 = 0 contains 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 = 0 contains optional SIP message headers and body. Ownership is transferred.

UpdateRefreshState(TUint)

void UpdateRefreshState ( TUint aStatusCode )

Parameters

TUint aStatusCode

operator==(const CSIPRefresh &)

IMPORT_C TBool operator== ( const CSIPRefresh & aRefresh ) const

Compares this object to another object

Parameters

const CSIPRefresh & aRefresh a 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]