Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: siprefresh.h
Link against: sipclient.lib

Class CSIPRefresh

class CSIPRefresh : public CBase;

Description

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

Derivation

Members

Defined in CSIPRefresh:
EActive, EConstructing, EInactive, ETerminated, IntervalL(), IsStandAlone(), NewL(), NewLC(), SIPTransaction(), SetIntervalL(), State(), TState, TerminateL(), UpdateL(), operator==(), ~CSIPRefresh()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CSIPRefresh *NewL();

Description

Two-phased constructor

Return value

CSIPRefresh *

New object. Ownership is transferred.


NewLC()

static IMPORT_C CSIPRefresh *NewLC();

Description

Two-phased constructor

Return value

CSIPRefresh *

New object. Ownership is transferred.


~CSIPRefresh()

IMPORT_C ~CSIPRefresh();

Description

Destructor

[Top]


Member functions


State()

IMPORT_C CSIPRefresh::TState State() const;

Description

Gets the state of the refresh

Return value

CSIPRefresh::TState

refresh state


IsStandAlone()

IMPORT_C TBool IsStandAlone() const;

Description

Tests if the refresh is a stand-alone refresh

Return value

TBool

ETrue if refresh is a stand-alone; EFalse otherwise


SIPTransaction()

IMPORT_C const CSIPClientTransaction *SIPTransaction() const;

Description

Gets the associated SIP transaction with this refresh.

Return value

const CSIPClientTransaction *

Associated SIP transaction or 0-pointer. Ownership is not transferred.


TerminateL()

Capability: NetworkServices

IMPORT_C CSIPClientTransaction *TerminateL(CSIPMessageElements *aElements=0);

Pre-Condition

State()==EActive

IsStandAlone()==ETrue

Description

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.

Parameters

CSIPMessageElements *aElements

contains optional SIP message headers and body. Ownership is transferred.

Return value

CSIPClientTransaction *

SIP client transaction. Ownership is transferred.

Leave codes

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.


UpdateL()

Capability: NetworkServices

IMPORT_C CSIPClientTransaction *UpdateL(CSIPMessageElements *aElements=0);

Pre-Condition

State()==EActive

IsStandAlone()==ETrue

Description

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.

Parameters

CSIPMessageElements *aElements

contains optional SIP message headers and body. Ownership is transferred.

Return value

CSIPClientTransaction *

SIP client transaction. Ownership is transferred.

Leave codes

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.


operator==()

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

Description

Compares this object to another object

Parameters

const CSIPRefresh &aRefresh

a CSIPRefresh type object to compare

Return value

TBool

ETrue if the objects are equal otherwise EFalse


IntervalL()

IMPORT_C TUint IntervalL() const;

Pre-Condition

State()==CSIPRefresh::EActive

Description

Gets current refresh interval

Return value

TUint

current refresh interval in seconds

Leave codes

KErrSIPInvalidTransactionState

if State() is not EActive

KErrSIPResourceNotAvailable

if SIP server can't be contacted because a required resource has been deleted.


SetIntervalL()

IMPORT_C void SetIntervalL(TUint aInterval);

Pre-Condition

State()==CSIPRefresh::EActive

aInterval > 0

Description

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.

Parameters

TUint aInterval

a new interval in seconds

Leave codes

KErrArgument

if aInterval == 0

KErrSIPInvalidTransactionState

if State() is not EActive

KErrSIPResourceNotAvailable

if SIP server can't be contacted because a required resource has been deleted.

[Top]


Member enumerations


Enum TState

TState

Description

SIP refresh states

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