CSIPRegistrationBinding Class Reference

#include <mw/sipregistrationbinding.h>

Link against: sipclient.lib

class CSIPRegistrationBinding : public CSIPRegistrationBindingBase, public MTransactionOwner, public MExpirationHandler, public CBase, public MSIPRegistrationContext

Inherits from

Public Member Functions
~CSIPRegistrationBinding()
IMPORT_C const CSIPToHeader &Aor()
voidClearTransactionOwner(TBool)
IMPORT_C CSIPConnection *Connection()
IMPORT_C const CSIPConnection *Connection()
IMPORT_C const CSIPContactHeader &ContactHeader()
IMPORT_C CSIPContactHeader &ContactHeader()
virtual IMPORT_C TUint32ContextId()
IMPORT_C CSIPClientTransaction *DeregisterL(CSIPMessageElements *)
virtual voidDoRegisterL(TTransactionId &, CSIPRequest *, CSIPRouteHeader *)
virtual voidDoUnregisterL(TTransactionId &, CSIPRequest *)
virtual voidDoUpdateL(TTransactionId &, CSIPRequest *)
CRegBindingImplementation &Implementation()
virtual IMPORT_C TBoolIsContextActive()
virtual TBool IsRefresh()
IMPORT_C CSIPRegistrationBinding *NewL(CSIPConnection &, CSIPToHeader *, CSIPContactHeader *, CSIPRefresh *, CSIPRouteHeader *, CUri8 *, CSIPFromHeader *)
CSIPRegistrationBinding *NewLC(CSIPRequest *, MSigComp &, CSIPSec &, MTimerManager &, MTransactionUser &, CSIPRegistrationBindingStore &, MRegistrationOwner *, MSIPSecUser &, MSIPTransportMgr &, CURIContainer &, TBool, TBool)
IMPORT_C CSIPRegistrationBinding *NewLC(CSIPConnection &, CSIPToHeader *, CSIPContactHeader *, CSIPRefresh *, CSIPRouteHeader *, CUri8 *, CSIPFromHeader *)
virtual TInt NextCSeq(TUint &)
IMPORT_C const CSIPRouteHeader *OutboundProxy()
virtual voidReceiveL(TUint32, TTransactionId, CSIPRequest *)
virtual voidReceiveL(TTransactionId, CSIPResponse *)
IMPORT_C CSIPClientTransaction *RegisterL(CSIPMessageElements *)
IMPORT_C const CSIPContactHeader *RegisteredContact()
IMPORT_C const CSIPRefresh *SIPRefresh()
IMPORT_C CSIPRefresh *SIPRefresh()
virtual const MSIPSecUser *SIPSecUser()
virtual IMPORT_C voidSetOutboundProxyL(CSIPRouteHeader *)
IMPORT_C TIntSetProperty(TUint32, TBool)
voidStartTimerL(TUint)
virtual voidTimerExpiredL(TTimerId, TAny *)
virtual TInt TransactionEnded(TUint32, TTransactionId, TInt)
IMPORT_C CSIPClientTransaction *UpdateL(CSIPMessageElements *)
IMPORT_C CSIPClientTransaction *UpdateL(TUint, CSIPMessageElements *)
IMPORT_C TBooloperator==(const CSIPRegistrationBinding &)
Inherited Attributes
CSIPRegistrationBindingBase::iContact
CSIPRegistrationBindingBase::iCurrentState
CSIPRegistrationBindingBase::iOwner
CSIPRegistrationBindingBase::iRegistered
CSIPRegistrationBindingBase::iRegistering
CSIPRegistrationBindingBase::iRegistrar
CSIPRegistrationBindingBase::iRegistrationId
CSIPRegistrationBindingBase::iRemoteTarget
CSIPRegistrationBindingBase::iResponse423Received
CSIPRegistrationBindingBase::iRetryTransactionId
CSIPRegistrationBindingBase::iRouteSet
CSIPRegistrationBindingBase::iSIPSecUser
CSIPRegistrationBindingBase::iSigCompCompartmentId
CSIPRegistrationBindingBase::iTransactionId
CSIPRegistrationBindingBase::iTransactionUser
CSIPRegistrationBindingBase::iTransportId
CSIPRegistrationBindingBase::iUnregistered
CSIPRegistrationBindingBase::iUnregistering
CSIPRegistrationBindingBase::iUpdating
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()
CSIPRegistrationBindingBase::AOR()const
CSIPRegistrationBindingBase::ByPassSIPSec()const
CSIPRegistrationBindingBase::CSIPRegistrationBindingBase(MTransactionUser &,MSigComp &,CSIPSec &,CSIPRegistrationBindingStore &,MRegistrationOwner *,MSIPSecUser &,MSIPTransportMgr &,TBool,TBool)
CSIPRegistrationBindingBase::ChangeState(CSIPRegistrationState *)
CSIPRegistrationBindingBase::ClearRequest()
CSIPRegistrationBindingBase::CompareWithRegisterRequest(const MRegistrationOwner &,CSIPRequest &)
CSIPRegistrationBindingBase::ConstructL(CSIPRequest *,CURIContainer &)
CSIPRegistrationBindingBase::Contact()
CSIPRegistrationBindingBase::CreateProxyTransportResourcesL(CSIPRouteHeader &)
CSIPRegistrationBindingBase::CurrentState()
CSIPRegistrationBindingBase::DetachFromStore()
CSIPRegistrationBindingBase::DetachOutboundProxy(TAny *)
CSIPRegistrationBindingBase::FillToFromL(CSIPRequest &)
CSIPRegistrationBindingBase::FillTransportParams()
CSIPRegistrationBindingBase::FindContactByFromL(const CSIPFromToHeaderBase *,CSIPContactHeader &)
CSIPRegistrationBindingBase::FlowFailure(TInt)
CSIPRegistrationBindingBase::HasOutboundProxy()const
CSIPRegistrationBindingBase::HasTransaction(const TTransactionId &)const
CSIPRegistrationBindingBase::IAPId()const
CSIPRegistrationBindingBase::IsCacheOutboundProxyIPEnabled()
CSIPRegistrationBindingBase::OutboundProxy()
CSIPRegistrationBindingBase::OutboundProxyFailed()
CSIPRegistrationBindingBase::OutboundProxyIPL()
CSIPRegistrationBindingBase::Owner()const
CSIPRegistrationBindingBase::PAssociatedURIHeader()const
CSIPRegistrationBindingBase::PassOnlyRealmsToUser()const
CSIPRegistrationBindingBase::Received2XXResponseL(CSIPResponse &,TTransactionId)
CSIPRegistrationBindingBase::Received423ResponseL(CSIPResponse &)
CSIPRegistrationBindingBase::ReceivedErrorResponseL()
CSIPRegistrationBindingBase::RefreshId()const
CSIPRegistrationBindingBase::RegisterL(TTransactionId &,CSIPRequest *,CSIPRouteHeader *)
CSIPRegistrationBindingBase::RegisterPending()const
CSIPRegistrationBindingBase::Registrar()
CSIPRegistrationBindingBase::RegistrationId()const
CSIPRegistrationBindingBase::RemoveBinding()
CSIPRegistrationBindingBase::RemoveOutboundProxy()
CSIPRegistrationBindingBase::Request()
CSIPRegistrationBindingBase::RequestCredentialsL(CSIPResponse &,TTransactionId,TRefreshId)
CSIPRegistrationBindingBase::RequestCredentialsL(const TDesC8 &)
CSIPRegistrationBindingBase::RouteSet()
CSIPRegistrationBindingBase::SelfDetach(TBool)
CSIPRegistrationBindingBase::SelfDetach(TBool,TBool)
CSIPRegistrationBindingBase::ServiceRouteOk(CSIPResponse &)const
CSIPRegistrationBindingBase::SetExpiresValueL(CSIPRequest &)
CSIPRegistrationBindingBase::SetOutboundProxy(CSIPRouteHeader *)
CSIPRegistrationBindingBase::SetRequest(CSIPRequest *)
CSIPRegistrationBindingBase::SetRouteHeaderFromResponseL(CSIPResponse &)
CSIPRegistrationBindingBase::SigCompCompartmentId()const
CSIPRegistrationBindingBase::TrustedUser(TRegistrationId)
CSIPRegistrationBindingBase::UnregisterL(TTransactionId &,CSIPRequest *)
CSIPRegistrationBindingBase::UpdateContactFromRequestL()
CSIPRegistrationBindingBase::UpdateL(TTransactionId &,CSIPRequest *)
CSIPRegistrationBindingBase::~CSIPRegistrationBindingBase()
MExpirationHandler::~MExpirationHandler()
MRegistrationContext::~MRegistrationContext()
MSIPRegistrationContext::~MSIPRegistrationContext()
MTransactionOwner::~MTransactionOwner()

Detailed Description

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

Constructor & Destructor Documentation

~CSIPRegistrationBinding ( )

~CSIPRegistrationBinding()

Member Function Documentation

Aor ( )

IMPORT_C const CSIPToHeader &Aor()const

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

Return Value
address-of-record (AOR)

ClearTransactionOwner ( TBool )

voidClearTransactionOwner(TBoolaUseRetryId = EFalse)

Connection ( )

IMPORT_C CSIPConnection *Connection()

Gets the SIP connection used for the registration.

Return Value
SIP connection used for the registration, or 0-pointer if the connection has been deleted. Ownership is not transferred.

Connection ( )

IMPORT_C const CSIPConnection *Connection()const

Gets the SIP connection used for the registration.

Return Value
SIP connection used for the registration, or 0-pointer if the connection has been deleted. Ownership is not transferred.

ContactHeader ( )

IMPORT_C const CSIPContactHeader &ContactHeader()const

Gets Contact header associated with the registration binding

Return Value
Contact header

ContactHeader ( )

IMPORT_C CSIPContactHeader &ContactHeader()

Gets Contact header associated with the registration binding

Return Value
Contact header

ContextId ( )

IMPORT_C TUint32ContextId()const [virtual]

Gets the context id

Return Value
context id For internal use only

DeregisterL ( CSIPMessageElements * )

IMPORT_C CSIPClientTransaction *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.
Pre-condition
Connection().State()==EActive

IsContextActive()==ETrue

Parameters
aElementscontains user SIP headers and content; the ownership is transfered. If set, user SIP headers must not contain any Contact-header nor Expires-header
Return Value
SIP REGISTER transaction; the ownership is transfered
Leave Codes
KErrSIPInvalidRegistrationStateif
Capability
NetworkServices

DoRegisterL ( TTransactionId &, CSIPRequest *, CSIPRouteHeader * )

voidDoRegisterL(TTransactionId &aTransactionId,
CSIPRequest *aSIPRequest,
CSIPRouteHeader *aOutboundProxy
)[virtual]

Reimplemented from CSIPRegistrationBindingBase::DoRegisterL(TTransactionId &,CSIPRequest *,CSIPRouteHeader *)

DoUnregisterL ( TTransactionId &, CSIPRequest * )

voidDoUnregisterL(TTransactionId &aTransactionId,
CSIPRequest *aSIPRequest
)[virtual]

Reimplemented from CSIPRegistrationBindingBase::DoUnregisterL(TTransactionId &,CSIPRequest *)

DoUpdateL ( TTransactionId &, CSIPRequest * )

voidDoUpdateL(TTransactionId &aTransactionId,
CSIPRequest *aSIPRequest
)[virtual]

Reimplemented from CSIPRegistrationBindingBase::DoUpdateL(TTransactionId &,CSIPRequest *)

Implementation ( )

CRegBindingImplementation &Implementation()

Returns the implementation instance.

Return Value
CRegBindingImplementation

IsContextActive ( )

IMPORT_C TBoolIsContextActive()const [virtual]

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

Return Value
ETrue if the registration binding exists; EFalse otherwise

IsRefresh ( )

TBool IsRefresh()const [virtual]

Reimplemented from CSIPRegistrationBindingBase::IsRefresh()const

NewL ( CSIPConnection &, CSIPToHeader *, CSIPContactHeader *, CSIPRefresh *, CSIPRouteHeader *, CUri8 *, CSIPFromHeader * )

IMPORT_C CSIPRegistrationBinding *NewL(CSIPConnection &aConnection,
CSIPToHeader *aAor,
CSIPContactHeader *aContact,
CSIPRefresh *aRefresh = 0,
CSIPRouteHeader *aOutboundProxy = 0,
CUri8 *aRemoteUri = 0,
CSIPFromHeader *aFrom = 0
)[static]
Two-phased constructor.
Pre-condition
aAor != 0 && aContact != 0

"Expires" parameter in aContact must be >= KSIPMinExpirationValue

Parameters
aConnectiona SIP connection to be used
aAorcontains user's address-of-record to register; the ownership is transfered
aContactcontact(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
aRefreshif set, created binding will be refreshed; the ownership is transfered
aOutboundProxyan outbound proxy address; the ownership is transfered
aRemoteUriif set, will be used in request-uri construction; the ownership is transfered
aFromFrom header, the ownership is transferred
Return Value
New object, ownership is transferred.
Leave Codes
KErrArgumentif aAor == 0, aContact == 0 or if "Expires" parameter in aContact is less than KSIPMinExpirationValue

NewLC ( CSIPRequest *, MSigComp &, CSIPSec &, MTimerManager &, MTransactionUser &, CSIPRegistrationBindingStore &, MRegistrationOwner *, MSIPSecUser &, MSIPTransportMgr &, CURIContainer &, TBool, TBool )

CSIPRegistrationBinding *NewLC(CSIPRequest *aSIPRequest,
MSigComp &aSigComp,
CSIPSec &aSIPSec,
MTimerManager &aTimerMgr,
MTransactionUser &aTransactionUser,
CSIPRegistrationBindingStore &aBindingStore,
MRegistrationOwner *aRegistrationOwner,
MSIPSecUser &aSIPSecUser,
MSIPTransportMgr &aTransportMgr,
CURIContainer &aRemoteTarget,
TBoolaSendWithExpires,
TBoolaCacheOutboundProxyIP
)[static]

NewLC ( CSIPConnection &, CSIPToHeader *, CSIPContactHeader *, CSIPRefresh *, CSIPRouteHeader *, CUri8 *, CSIPFromHeader * )

IMPORT_C CSIPRegistrationBinding *NewLC(CSIPConnection &aConnection,
CSIPToHeader *aAor,
CSIPContactHeader *aContact,
CSIPRefresh *aRefresh = 0,
CSIPRouteHeader *aOutboundProxy = 0,
CUri8 *aRemoteUri = 0,
CSIPFromHeader *aFrom = 0
)[static]
Two-phased constructor.
Pre-condition
aAor != 0 && aContact != 0

"Expires" parameter in aContact must be >= KSIPMinExpirationValue

Parameters
aConnectiona SIP connection to be used
aAorcontains user's address-of-record to register; the ownership is transfered
aContactcontact 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
aRefreshif set, created binding will be refreshed; the ownership is transfered
aOutboundProxyan outbound proxy address; the ownership is transfered
aRemoteUriif set, will be used in request-uri construction; the ownership is transfered
aFromFrom header, the ownership is transferred
Return Value
New object, ownership is transferred.
Leave Codes
KErrArgumentif aAor == 0, aContact == 0 or if "Expires" parameter in aContact is less than KSIPMinExpirationValue

NextCSeq ( TUint & )

TInt NextCSeq(TUint &aCSeq)[virtual]

Reimplemented from MTransactionOwner::NextCSeq(TUint &)

TransactionUser is going to send the SIP request either after modifications to the request, or to another address, and asks the next CSeq sequence number to use for the request.

Pre-condition
Post-condition

See also:

Parameters
aCSeqan in-out parameter. While entering the function contains the current CSeq of the caller. On return contains the incremented CSeq of the callee. If the subsystem implementing the interface does not keep track of the CSeqs it should simply increment aCSeq by one.
Return Value
KErrNone or a system wide error code.

OutboundProxy ( )

IMPORT_C const CSIPRouteHeader *OutboundProxy()const

Gets used outbound proxy

Return Value
outbound proxy or a 0-pointer if not set. Ownership is not transferred.

ReceiveL ( TUint32, TTransactionId, CSIPRequest * )

voidReceiveL(TUint32aIapId,
TTransactionIdaTransactionId,
CSIPRequest *aRequest
)[virtual]

Reimplemented from MTransactionOwner::ReceiveL(TUint32,TTransactionId,CSIPRequest *)

Transaction has received a SIP request from a remote endpoint and passes it to the upper layer.

Pre-condition
aRequest != 0
Parameters
aIapIdThe IAP using which the request was received.
aTransactionIdIdentifies the transaction
aRequestIN: SIP request message. The ownership is transferred. If the function leaves, the ownership of aRequest is NOT transferred.

ReceiveL ( TTransactionId, CSIPResponse * )

voidReceiveL(TTransactionIdaTransactionId,
CSIPResponse *aResponse
)[virtual]

Reimplemented from MTransactionOwner::ReceiveL(TTransactionId,CSIPResponse *)

Transaction has received a SIP response message from remote endpoint and passes it to the upper layer.

Pre-condition
aResponse != 0
Parameters
aTransactionIdIdentifies the transaction
aResponseIN: SIP response message. The ownership is transferred. If the function leaves, the ownership of aResponse is NOT transferred.

RegisterL ( CSIPMessageElements * )

IMPORT_C CSIPClientTransaction *RegisterL(CSIPMessageElements *aElements = 0)
Creates SIP REGISTER request, sends it to the given destination. Received 2xx response will create at least one registration binding.
Pre-condition
Connection().State()==EActive
Parameters
aElementscontains user SIP headers and content; the ownership is taken
Return Value
SIP REGISTER transaction; the ownership is transfered
Leave Codes
KErrSIPMalformedMessageif aElements contains contact or expires headers
KErrSIPInvalidRegistrationStateif already registered or registering is in progress or deregistering is in progress.
Capability
NetworkServices

RegisteredContact ( )

IMPORT_C const CSIPContactHeader *RegisteredContact()const

Gets the registered Contact-header received in the 200 OK response.

Return Value
Contact header, or NULL if IsContextActive() is EFalse. Ownership is not transferred.

SIPRefresh ( )

IMPORT_C const CSIPRefresh *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.

Return Value
Associated refresh or a 0-pointer if the user has not requested a refresh of registration binding. Ownership is not transferred.

SIPRefresh ( )

IMPORT_C CSIPRefresh *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.

Return Value
Associated refresh or a 0-pointer if the user has not requested a refresh of registration binding. Ownership is not transferred.

SIPSecUser ( )

const MSIPSecUser *SIPSecUser()const [virtual]

Reimplemented from MTransactionOwner::SIPSecUser()const

Returns a pointer to the MSIPSecUser that is used to map the SIPSec cache entries to their users and can be used to query credentials from the user.

Return Value
A pointer to MSIPSecUser. The ownership is not transferred.

SetOutboundProxyL ( CSIPRouteHeader * )

IMPORT_C voidSetOutboundProxyL(CSIPRouteHeader *aOutboundProxy)[virtual]

Reimplemented from CSIPRegistrationBindingBase::SetOutboundProxyL(CSIPRouteHeader *)

Sets/resets outbound proxy. If a 0-pointer is given the outbound proxy will be reset.
Parameters
aOutboundProxyan outbound proxy. Ownership is transferred.
Leave Codes
KErrSIPResourceNotAvailableif a required SIP Client API object has been deleted

SetProperty ( TUint32, TBool )

IMPORT_C TIntSetProperty(TUint32aProperty,
TBoolaValue
)

Sets/resets properties.

Return Value
KErrSIPInvalidRegistrationState if IsContextActive() is ETrue KErrNotFound if property is not found, KErrNone otherwise

StartTimerL ( TUint )

voidStartTimerL(TUintaExpiresValue)

TimerExpiredL ( TTimerId, TAny * )

voidTimerExpiredL(TTimerIdaTimerId,
TAny *aTimerParam
)[virtual]

Reimplemented from MExpirationHandler::TimerExpiredL(TTimerId,TAny *)

Indicates that a timer has expired.

Parameters
aTimerIdIdentifies the expired timer
aTimerParamUser specified value which was given when the timer was set. It can be used to identify the timer in case multiple timers are running simultaneously. Value is NULL if the timer was set using CTimerManager::StartL without parameter aTimerParam. Ownership isn't transferred.

TransactionEnded ( TUint32, TTransactionId, TInt )

TInt TransactionEnded(TUint32aIapId,
TTransactionIdaTransaction,
TIntaReason
)[virtual]

Reimplemented from MTransactionOwner::TransactionEnded(TUint32,TTransactionId,TInt)

The specified transaction has ended and no more events from that transaction will come through the MTransactionOwner interface.

Pre-condition
Post-condition

See also:

Parameters
aIapIdThe IAP used.
aTransactionIdentifies the transaction that ended
aReasonTells why the transaction ended. KErrNone means the transaction ended normally.
Return Value
value KErrNone if successful, otherwise a system wide error code

UpdateL ( CSIPMessageElements * )

IMPORT_C CSIPClientTransaction *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.
Pre-condition
aElements!=0

Connection().State()==EActive IsContextActive()==ETrue

Parameters
aElementscontains user SIP header and content, must not contain any Contact-header nor Expires-header; the ownership is transferred.
Return Value
SIP REGISTER transaction; the ownership is transfered
Leave Codes
KErrArgumentif aElements == NULL
KErrSIPInvalidRegistrationStateif
Capability
NetworkServices

UpdateL ( TUint, CSIPMessageElements * )

IMPORT_C CSIPClientTransaction *UpdateL(TUintaExpirationValue,
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.
Pre-condition
aExpirationValue >= KSIPMinExpirationValue

Connection().State()==EActive IsContextActive()==ETrue

Parameters
aExpirationValuea new expiration value in seconds
aElementscontains user SIP headers and content; must not contain any Contact-header nor Expires-header; the ownership is transferred.
Return Value
SIP REGISTER transaction; the ownership is transfered
Leave Codes
KErrSIPInvalidRegistrationStateif
Capability
NetworkServices

operator== ( const CSIPRegistrationBinding & )

IMPORT_C TBooloperator==(const CSIPRegistrationBinding &aRegistration)const

Compares this object to another object

Parameters
aRegistrationCSIPRegistrationBinding object to compare
Return Value
ETrue if the objects are equal, otherwise EFalse