S60 3rd Edition API Reference: CSIPRegistrationBinding Class Reference

CSIPRegistrationBinding Class Reference

API published in: S60 3rd Ed

Link against: sipclient.lib

Capability Information

Required Capabilities

Location NetworkControl NetworkServices ReadDeviceData WriteDeviceData


#include <sipregistrationbinding.h>

Inherits MSIPRegistrationContext.


Detailed Description

PublishedAll
Released
Class for managing SIP registration binding. Class provides functions for creating and updating SIP registration bindings.

Public Member Functions

IMPORT_C ~CSIPRegistrationBinding ()
 Destructor.
IMPORT_C TBool IsContextActive () const
 Checks if the registration context can be used for creating SIP messages/dialogs.
IMPORT_C TUint32 ContextId () const
 Gets the context id.
IMPORT_C CSIPClientTransactionRegisterL (CSIPMessageElements *aElements=0)
 Creates SIP REGISTER request, sends it to the given destination.
IMPORT_C CSIPClientTransactionDeregisterL (CSIPMessageElements *aElements=0)
 Creates SIP (de)REGISTER request, sends it to the given destination.
IMPORT_C CSIPClientTransactionUpdateL (CSIPMessageElements *aElements)
 Updates the registration binding.
IMPORT_C CSIPClientTransactionUpdateL (TUint aExpirationValue, CSIPMessageElements *aElements=0)
 Updates the regisration binding.
IMPORT_C CSIPConnectionConnection ()
 Gets the SIP connection used for the registration.
IMPORT_C const CSIPConnectionConnection () const
 Gets the SIP connection used for the registration.
IMPORT_C void SetOutboundProxyL (CSIPRouteHeader *aOutboundProxy)
 Sets/resets outbound proxy.
IMPORT_C const CSIPToHeaderAor () const
 Gets the address-of-record (AOR) used for creating binding.
IMPORT_C const CSIPContactHeaderContactHeader () const
 Gets Contact header associated with the registration binding.
IMPORT_C CSIPContactHeaderContactHeader ()
 Gets Contact header associated with the registration binding.
IMPORT_C const CSIPRouteHeaderOutboundProxy () const
 Gets used outbound proxy.
IMPORT_C const CSIPRefreshSIPRefresh () const
 Gets associated refresh in case the user has requested the refresh of the registration.
IMPORT_C CSIPRefreshSIPRefresh ()
 Gets associated refresh in case the user has requested the refresh of the registration.
IMPORT_C TBool operator== (const CSIPRegistrationBinding &aRegistration) const
 Compares this object to another object.
CRegBindingImplementation & Implementation ()
 Returns the implementation instance.

Static Public Member Functions

static IMPORT_C CSIPRegistrationBindingNewL (CSIPConnection &aConnection, CSIPToHeader *aAor, CSIPContactHeader *aContact, CSIPRefresh *aRefresh=0, CSIPRouteHeader *aOutboundProxy=0, CUri8 *aRemoteUri=0, CSIPFromHeader *aFrom=0)
 Two-phased constructor.
static IMPORT_C CSIPRegistrationBindingNewLC (CSIPConnection &aConnection, CSIPToHeader *aAor, CSIPContactHeader *aContact, CSIPRefresh *aRefresh=0, CSIPRouteHeader *aOutboundProxy=0, CUri8 *aRemoteUri=0, CSIPFromHeader *aFrom=0)
 Two-phased constructor.

Constructor & Destructor Documentation

IMPORT_C CSIPRegistrationBinding::~CSIPRegistrationBinding  ) 
 

Destructor.


Member Function Documentation

IMPORT_C const CSIPToHeader& CSIPRegistrationBinding::Aor  )  const
 

Gets the address-of-record (AOR) used for creating binding.

Returns:
address-of-record (AOR)
IMPORT_C const CSIPConnection* CSIPRegistrationBinding::Connection  )  const
 

Gets the SIP connection used for the registration.

Returns:
SIP connection used for the registration, or 0-pointer if the connection has been deleted. Ownership is not transferred.
IMPORT_C CSIPConnection* CSIPRegistrationBinding::Connection  ) 
 

Gets the SIP connection used for the registration.

Returns:
SIP connection used for the registration, or 0-pointer if the connection has been deleted. Ownership is not transferred.
IMPORT_C CSIPContactHeader& CSIPRegistrationBinding::ContactHeader  ) 
 

Gets Contact header associated with the registration binding.

Returns:
Contact header
IMPORT_C const CSIPContactHeader& CSIPRegistrationBinding::ContactHeader  )  const
 

Gets Contact header associated with the registration binding.

Returns:
Contact header
IMPORT_C TUint32 CSIPRegistrationBinding::ContextId  )  const [virtual]
 

Gets the context id.

Returns:
context id For internal use only

Implements MSIPRegistrationContext.

IMPORT_C CSIPClientTransaction* CSIPRegistrationBinding::DeregisterL CSIPMessageElements aElements = 0  ) 
 

Creates SIP (de)REGISTER request, sends it to the given destination.

This function will remove registration binding. Any SIP response (2xx - 6xx) to this request removes the binding. Note that deregistration can be done then the 2xx is received to the initial REGISTER transaction and there is no on-going registration updates.

Precondition:
Connection().State()==EActive

IsContextActive()==ETrue

Parameters:
aElements contains user SIP headers and content; the ownership is transfered. If set, user SIP headers must not contain any Contact-header nor Expires-header
Returns:
SIP REGISTER transaction; the ownership is transfered
Leave:
KErrSIPInvalidRegistrationState if IsContextActive()==EFalse NetworkServices
CRegBindingImplementation& CSIPRegistrationBinding::Implementation  ) 
 

Returns the implementation instance.

Returns:
CRegBindingImplementation
IMPORT_C TBool CSIPRegistrationBinding::IsContextActive  )  const [virtual]
 

Checks if the registration context can be used for creating SIP messages/dialogs.

Returns:
ETrue if the registration binding exists; EFalse otherwise

Implements MSIPRegistrationContext.

static IMPORT_C CSIPRegistrationBinding* CSIPRegistrationBinding::NewL CSIPConnection aConnection,
CSIPToHeader aAor,
CSIPContactHeader aContact,
CSIPRefresh aRefresh = 0,
CSIPRouteHeader aOutboundProxy = 0,
CUri8 *  aRemoteUri = 0,
CSIPFromHeader aFrom = 0
[static]
 

Two-phased constructor.

Precondition:
aAor != 0 && aContact != 0

"Expires" parameter in aContact must be >= KSIPMinExpirationValue

Parameters:
aConnection a SIP connection to be used
aAor contains user's address-of-record to register; the ownership is transfered
aContact contact(s) to be registered. The "expires" parameter indicates how long the client would like the binding to be valid. "expires" parameter value must be >= KSIPMinExpirationValue; the ownership is transfered
aRefresh if set, created binding will be refreshed; the ownership is transfered
aOutboundProxy an outbound proxy address; the ownership is transfered
aRemoteUri if set, will be used in request-uri construction; the ownership is transfered
aFrom From header, the ownership is transferred
Returns:
New object, ownership is transferred.
Leave:
KErrArgument if aAor == 0, aContact == 0 or if "Expires" parameter in aContact is less than KSIPMinExpirationValue
static IMPORT_C CSIPRegistrationBinding* CSIPRegistrationBinding::NewLC CSIPConnection aConnection,
CSIPToHeader aAor,
CSIPContactHeader aContact,
CSIPRefresh aRefresh = 0,
CSIPRouteHeader aOutboundProxy = 0,
CUri8 *  aRemoteUri = 0,
CSIPFromHeader aFrom = 0
[static]
 

Two-phased constructor.

Precondition:
aAor != 0 && aContact != 0

"Expires" parameter in aContact must be >= KSIPMinExpirationValue

Parameters:
aConnection a SIP connection to be used
aAor contains user's address-of-record to register; the ownership is transfered
aContact contact to be registered; The "expires" parameter indicates how long the client would like the binding to be valid. "expires" parameter value must be >= KSIPMinExpirationValue; the ownership is transfered
aRefresh if set, created binding will be refreshed; the ownership is transfered
aOutboundProxy an outbound proxy address; the ownership is transfered
aRemoteUri if set, will be used in request-uri construction; the ownership is transfered
aFrom From header, the ownership is transferred
Returns:
New object, ownership is transferred.
Leave:
KErrArgument if aAor == 0, aContact == 0 or if "Expires" parameter in aContact is less than KSIPMinExpirationValue
IMPORT_C TBool CSIPRegistrationBinding::operator== const CSIPRegistrationBinding aRegistration  )  const
 

Compares this object to another object.

Parameters:
aRegistration CSIPRegistrationBinding object to compare
Returns:
ETrue if the objects are equal, otherwise EFalse
IMPORT_C const CSIPRouteHeader* CSIPRegistrationBinding::OutboundProxy  )  const
 

Gets used outbound proxy.

Returns:
outbound proxy or a 0-pointer if not set. Ownership is not transferred.
IMPORT_C CSIPClientTransaction* CSIPRegistrationBinding::RegisterL CSIPMessageElements aElements = 0  ) 
 

Creates SIP REGISTER request, sends it to the given destination.

Received 2xx response will create at least one registration binding.

Precondition:
Connection().State()==EActive
Parameters:
aElements contains user SIP headers and content; the ownership is taken
Returns:
SIP REGISTER transaction; the ownership is transfered
Leave:
KErrSIPMalformedMessage if aElements contains contact or expires headers
Leave:
KErrSIPInvalidRegistrationState if already registered or registering is in progress or deregistering is in progress. NetworkServices
IMPORT_C void CSIPRegistrationBinding::SetOutboundProxyL CSIPRouteHeader aOutboundProxy  ) 
 

Sets/resets outbound proxy.

If a 0-pointer is given the outbound proxy will be reset.

Parameters:
aOutboundProxy an outbound proxy. Ownership is transferred.
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
IMPORT_C CSIPRefresh* CSIPRegistrationBinding::SIPRefresh  ) 
 

Gets associated refresh in case the user has requested the refresh of the registration.

Note that client cannot use update or terminate functions defined in the CSIPRefresh class.

Returns:
Associated refresh or a 0-pointer if the user has not requested a refresh of registration binding. Ownership is not transferred.
IMPORT_C const CSIPRefresh* CSIPRegistrationBinding::SIPRefresh  )  const
 

Gets associated refresh in case the user has requested the refresh of the registration.

Note that client cannot use update or terminate functions defined in the CSIPRefresh class.

Returns:
Associated refresh or a 0-pointer if the user has not requested a refresh of registration binding. Ownership is not transferred.
IMPORT_C CSIPClientTransaction* CSIPRegistrationBinding::UpdateL TUint  aExpirationValue,
CSIPMessageElements aElements = 0
 

Updates the regisration binding.

Note that update can be done then the 2xx is received to the REGISTER transaction that relates to the initial registration or to update.

Precondition:
aExpirationValue >= KSIPMinExpirationValue

Connection().State()==EActive

IsContextActive()==ETrue

Parameters:
aExpirationValue a new expiration value in seconds
aElements contains user SIP headers and content; must not contain any Contact-header nor Expires-header; the ownership is transferred.
Returns:
SIP REGISTER transaction; the ownership is transfered
Leave:
KErrSIPInvalidRegistrationState if IsContextActive()==EFalse NetworkServices
IMPORT_C CSIPClientTransaction* CSIPRegistrationBinding::UpdateL CSIPMessageElements aElements  ) 
 

Updates the registration binding.

Note that update can be done then the 2xx is received to the REGISTER transaction that relates to the initial registration or to update.

Precondition:
aElements!=0

Connection().State()==EActive

IsContextActive()==ETrue

Parameters:
aElements contains user SIP header and content, must not contain any Contact-header nor Expires-header; the ownership is transferred.
Returns:
SIP REGISTER transaction; the ownership is transfered
Leave:
KErrArgument if aElements == NULL
Leave:
KErrSIPInvalidRegistrationState if IsContextActive()==EFalse NetworkServices

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

Copyright © Nokia Corporation 2001-2007
Back to top