S60 3rd Edition API Reference: CSIPRefresh Class Reference

CSIPRefresh Class Reference

API published in: S60 2nd Ed

Link against: sipclient.lib

Capability Information

Required Capabilities

Location NetworkControl NetworkServices ReadDeviceData WriteDeviceData


#include <siprefresh.h>

Detailed Description

PublishedAll
Released
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.


Public Types

enum  TState { EInactive, EActive, ETerminated, EConstructing }
 SIP refresh states. More...

Public Member Functions

IMPORT_C ~CSIPRefresh ()
 Destructor.
IMPORT_C CSIPRefresh::TState State () const
 Gets the state of the refresh.
IMPORT_C TBool IsStandAlone () const
 Tests if the refresh is a stand-alone refresh.
IMPORT_C const CSIPClientTransactionSIPTransaction () const
 Gets the associated SIP transaction with this refresh.
IMPORT_C CSIPClientTransactionTerminateL (CSIPMessageElements *aElements=0)
 Terminates the refresh by sending SIP request to the remote destination.
IMPORT_C CSIPClientTransactionUpdateL (CSIPMessageElements *aElements=0)
 Updates the refresh by sending SIP request to the remote destination.
IMPORT_C TBool operator== (const CSIPRefresh &aRefresh) const
 Compares this object to another object.
IMPORT_C TUint IntervalL () const
 Gets current refresh interval.
IMPORT_C void SetIntervalL (TUint aInterval)
 Sets refresh interval.
TBool DoesMatch (TUint32 aRefreshId) const
void SetRefreshOwner (MSIPRefreshAssociation &aAssoc)
 Associate the CSIPRefresh with another object.
void RemoveRefreshOwner (const MSIPRefreshAssociation &aAssoc)
void ChangeState (CSIPRefresh::TState aNextState)
void UpdateRefreshState (TUint aStatusCode)
TUint32 RefreshId () const
void SetRefreshIdIfEmpty (TUint32 aRefreshId)
RStringF RequestType () const
void SetRequestType (RStringF aType)
void AddTransaction (CSIPClientTransaction &aTransaction)
void RemoveTransaction ()
CSIPClientTransactionTransaction ()

Static Public Member Functions

static IMPORT_C CSIPRefreshNewL ()
 Two-phased constructor.
static IMPORT_C CSIPRefreshNewLC ()
 Two-phased constructor.

Member Enumeration Documentation

enum CSIPRefresh::TState
 

SIP refresh states.

Enumerator:
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

IMPORT_C CSIPRefresh::~CSIPRefresh  ) 
 

Destructor.


Member Function Documentation

void CSIPRefresh::AddTransaction CSIPClientTransaction aTransaction  ) 
 
void CSIPRefresh::ChangeState CSIPRefresh::TState  aNextState  ) 
 
TBool CSIPRefresh::DoesMatch TUint32  aRefreshId  )  const
 
IMPORT_C TUint CSIPRefresh::IntervalL  )  const
 

Gets current refresh interval.

Precondition:
State()==CSIPRefreshEActive
Returns:
current refresh interval in seconds
Leave:
KErrSIPInvalidTransactionState if State() is not EActive
Leave:
KErrSIPResourceNotAvailable if SIP server can't be contacted because a required resource has been deleted.
IMPORT_C TBool CSIPRefresh::IsStandAlone  )  const
 

Tests if the refresh is a stand-alone refresh.

Returns:
ETrue if refresh is a stand-alone; EFalse otherwise
static IMPORT_C CSIPRefresh* CSIPRefresh::NewL  )  [static]
 

Two-phased constructor.

Returns:
New object. Ownership is transferred.
static IMPORT_C CSIPRefresh* CSIPRefresh::NewLC  )  [static]
 

Two-phased constructor.

Returns:
New object. Ownership is transferred.
IMPORT_C TBool CSIPRefresh::operator== const CSIPRefresh aRefresh  )  const
 

Compares this object to another object.

Parameters:
aRefresh a CSIPRefresh type object to compare
Returns:
ETrue if the objects are equal otherwise EFalse
TUint32 CSIPRefresh::RefreshId  )  const
 
void CSIPRefresh::RemoveRefreshOwner const MSIPRefreshAssociation &  aAssoc  ) 
 
void CSIPRefresh::RemoveTransaction  ) 
 
RStringF CSIPRefresh::RequestType  )  const
 
IMPORT_C void CSIPRefresh::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.

Precondition:
State()==CSIPRefreshEActive

aInterval > 0

Parameters:
aInterval a new interval in seconds
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.
void CSIPRefresh::SetRefreshIdIfEmpty TUint32  aRefreshId  ) 
 
void CSIPRefresh::SetRefreshOwner MSIPRefreshAssociation &  aAssoc  ) 
 

Associate the CSIPRefresh with another object.

Parameters:
aAssoc Object associated with the CSIPRefresh
Returns:
ETrue if the objects are equal otherwise EFalse
void CSIPRefresh::SetRequestType RStringF  aType  ) 
 
IMPORT_C const CSIPClientTransaction* CSIPRefresh::SIPTransaction  )  const
 

Gets the associated SIP transaction with this refresh.

Returns:
Associated SIP transaction or 0-pointer. Ownership is not transferred.
IMPORT_C CSIPRefresh::TState CSIPRefresh::State  )  const
 

Gets the state of the refresh.

Returns:
refresh state
IMPORT_C CSIPClientTransaction* CSIPRefresh::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.

Precondition:
State()==EActive

IsStandAlone()==ETrue

Parameters:
aElements contains optional SIP message headers and body. Ownership is transferred.
Returns:
SIP client transaction. Ownership is transferred.
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. NetworkServices
CSIPClientTransaction* CSIPRefresh::Transaction  ) 
 
IMPORT_C CSIPClientTransaction* CSIPRefresh::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.

Precondition:
State()==EActive

IsStandAlone()==ETrue

Parameters:
aElements contains optional SIP message headers and body. Ownership is transferred.
Returns:
SIP client transaction. Ownership is transferred.
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. NetworkServices
void CSIPRefresh::UpdateRefreshState TUint  aStatusCode  ) 
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top