CSIPRefresh Class Reference

#include <mw/siprefresh.h>

Link against: sipclient.lib

class CSIPRefresh : public CBase

Inherits from

Detailed 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.

Member Enumeration Documentation

Enum TState

SIP refresh states

EnumeratorValueDescription
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

Constructor & Destructor Documentation

~CSIPRefresh ( )

IMPORT_C~CSIPRefresh()

Destructor

Member Function Documentation

AddTransaction ( CSIPClientTransaction & )

voidAddTransaction(CSIPClientTransaction &aTransaction)

ChangeState ( CSIPRefresh::TState )

voidChangeState(CSIPRefresh::TStateaNextState)

DoesMatch ( TUint32 )

TBool DoesMatch(TUint32aRefreshId)const

IntervalL ( )

IMPORT_C TUintIntervalL()const
Gets current refresh interval
Pre-condition
State()==CSIPRefresh::EActive
Return Value
current refresh interval in seconds
Leave Codes
KErrSIPResourceNotAvailableif 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

Return Value
ETrue if refresh is a stand-alone; EFalse otherwise

NewL ( )

IMPORT_C CSIPRefresh *NewL()[static]

Two-phased constructor

Return Value
New object. Ownership is transferred.

NewLC ( )

IMPORT_C CSIPRefresh *NewLC()[static]

Two-phased constructor

Return Value
New object. Ownership is transferred.

RefreshId ( )

TUint32 RefreshId()const

RemoveRefreshOwner ( const MSIPRefreshAssociation & )

voidRemoveRefreshOwner(const MSIPRefreshAssociation &aAssoc)

RemoveTransaction ( )

voidRemoveTransaction()

RequestType ( )

RStringF RequestType()const

SIPTransaction ( )

IMPORT_C const CSIPClientTransaction *SIPTransaction()const

Gets the associated SIP transaction with this refresh.

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

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()==CSIPRefresh::EActive

aInterval > 0

Parameters
aIntervala new interval in seconds
Leave Codes
KErrArgumentif aInterval == 0
KErrSIPInvalidTransactionStateif
KErrSIPResourceNotAvailableif SIP server can't be contacted because a required resource has been deleted.

SetRefreshIdIfEmpty ( TUint32 )

voidSetRefreshIdIfEmpty(TUint32aRefreshId)

SetRefreshOwner ( MSIPRefreshAssociation & )

voidSetRefreshOwner(MSIPRefreshAssociation &aAssoc)

Associate the CSIPRefresh with another object.

Parameters
aAssocObject associated with the CSIPRefresh
Return Value
ETrue if the objects are equal otherwise EFalse

SetRequestType ( RStringF )

voidSetRequestType(RStringFaType)

State ( )

IMPORT_C CSIPRefresh::TStateState()const

Gets the state of the refresh

Return Value
refresh state

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

Parameters
aElementscontains optional SIP message headers and body. Ownership is transferred.
Return Value
SIP client transaction. Ownership is transferred.
Leave Codes
KErrSIPInvalidTransactionStateif
Capability
NetworkServices

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

Parameters
aElementscontains optional SIP message headers and body. Ownership is transferred.
Return Value
SIP client transaction. Ownership is transferred.
Leave Codes
KErrSIPInvalidTransactionStateif
Capability
NetworkServices

UpdateRefreshState ( TUint )

voidUpdateRefreshState(TUintaStatusCode)

operator== ( const CSIPRefresh & )

IMPORT_C TBooloperator==(const CSIPRefresh &aRefresh)const

Compares this object to another object

Parameters
aRefresha CSIPRefresh type object to compare
Return Value
ETrue if the objects are equal otherwise EFalse