CRegBindingImplementation Class Reference
class CRegBindingImplementation : public CBase
|
Implementation class for managing SIP registration binding.
Inherits from
-
CRegBindingImplementation
Public Member Functions
|
|
~CRegBindingImplementation
()
|
void
|
AddTransactionL
(
CSIPTransactionBase
&)
|
const
CSIPToHeader
&
|
Aor
()
|
CSIPRegistrationBinding
&
|
Binding
()
|
void
|
ChangeState
(const
CRegistrationState
*)
|
TInt
|
CheckIfStandAlone
()
|
CSIPClientConnection
*
|
ClientConnection
()
|
CSIPClientConnection
&
|
ClientConnectionL
()
|
CSIPConnection
*
|
Connection
()
|
const
CSIPConnection
*
|
Connection
()
|
void
|
ConnectionDeleted
()
|
void
|
ConnectionLost
()
|
const
CSIPContactHeader
&
|
ContactHeader
()
|
CSIPContactHeader
&
|
ContactHeader
()
|
TUint32
|
ContextId
()
|
CSIPClientTransaction
*
|
CreateClientTransactionL
()
|
void
|
DeletingRefresh
(
CSIPRefresh
&,
TUint32
)
|
CSIPClientTransaction
*
|
DeregisterL
(
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
DoDeregisterL
(
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
DoRegisterL
(
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
DoUpdateL
(
CSIPMessageElements
*,
TUint
*)
|
TBool
|
ErrorOccured
(
TInt
,
TUint32
,
CConnectionCallback
&)
|
CSIPClientTransaction
*
|
FindTransaction
(
TUint32
)
|
TBool
|
HandleError
(
CConnectionCallback
&,
TInt
,
TUint32
, const
CRegistrationState
&)
|
TBool
|
IncomingResponseL
(
CSIPResponseElements
*,
TUint32
,
TUint32
,
TUint32
,
CConnectionCallback
&)
|
TBool
|
IsContextActive
()
|
CRegBindingImplementation
*
|
NewL
(
CSIPRegistrationBinding
&,
CSIPConnection
&,
CSIPToHeader
*,
CSIPContactHeader
*,
CSIPRefresh
*,
CSIPRouteHeader
*,
CUri8
*,
CSIPFromHeader
*)
|
const
CSIPRouteHeader
*
|
OutboundProxy
()
|
CSIPClientTransaction
*
|
RegisterL
(
CSIPMessageElements
*)
|
const
CSIPContactHeader
*
|
RegisteredContact
()
|
void
|
RemoveRegisteredContact
()
|
void
|
RemoveTransaction
(const
CSIPTransactionBase
&)
|
CSIPConnection
&
|
SIPConnectionL
()
|
const
CSIPRefresh
*
|
SIPRefresh
()
|
CSIPRefresh
*
|
SIPRefresh
()
|
void
|
SetOutboundProxyL
(
CSIPRouteHeader
*)
|
void
|
SetPropertyL
(
TUint32
,
TBool
)
|
void
|
SetRegistrationId
(
TUint32
)
|
MTransactionAssociation
&
|
TransactionAssociation
()
|
CSIPClientTransaction
*
|
UpdateL
(
CSIPMessageElements
*,
TUint
*)
|
CSIPClientTransaction
*
|
UpdateRefreshL
(
CSIPRefresh
&,
CSIPMessageElements
*,
TBool
)
|
void
|
UpdateRefreshState
(
TUint
)
|
void
|
UpdateRegisteredContactL
()
|
TBool
|
operator==
(const
CRegBindingImplementation
&)
|
Constructor & Destructor Documentation
CRegBindingImplementation(CSIPRegistrationBinding &, CSIPConnection &)
~CRegBindingImplementation()
~CRegBindingImplementation
|
(
|
)
|
|
Member Functions Documentation
AddTransactionL(CSIPTransactionBase &)
Aor()
Gets the address-of-record (AOR) used for creating binding
ChangeState(const CRegistrationState *)
Change the registration binding state.
Parameters
const
CRegistrationState
* aNewState
|
State to enter, can be NULL. Ownership is not transferred.
|
CheckConnectionL()
void
|
CheckConnectionL
|
(
|
)
|
const [private]
|
CheckElementsL(const CSIPMessageElements *)
Checks that aElements don't contain Contact or Expires headers.
-
leave
-
KErrSIPMalformedMessage If Contact or Expires header is present in aElements.
CheckIfStandAlone()
TInt
|
CheckIfStandAlone
|
(
|
)
|
|
Connection()
Gets the SIP connection used for the registration.
Connection()
Gets the SIP connection used for the registration.
ConnectionDeleted()
void
|
ConnectionDeleted
|
(
|
)
|
|
ConstructL(CSIPToHeader *, CSIPContactHeader *, CSIPRefresh *, CSIPRouteHeader *, CUri8 *, CSIPFromHeader *)
ContactHeader()
Gets Contact header associated with the registration binding
ContactHeader()
Gets Contact header associated with the registration binding
CreateClientTransactionL()
DeletingRefresh(CSIPRefresh &, TUint32)
DeregisterL(CSIPMessageElements *)
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
Parameters
CSIPMessageElements
* aElements = 0
|
contains user SIP headers and content; the ownership is transfered. If set, user SIP headers must not contain any Contact-header nor Expires-header
|
DetachContactHeader(TAny *)
void
|
DetachContactHeader
|
(
|
TAny
*
|
aElements
|
)
|
[private, static]
|
Removes, does not delete, Contact headers from aElements.
-
Pre-condition
-
aElements != NULL
Parameters
TAny
* aElements
|
Message elements. Ownership is not transferred.
|
DetachHeaders(TAny *, RStringF)
void
|
DetachHeaders
|
(
|
TAny
*
|
aElements,
|
|
RStringF
|
aName
|
|
)
|
[private, static]
|
Removes, does not delete, the headers identified by aName, from aElements.
-
Pre-condition
-
aElements != NULL
Parameters
TAny
* aElements
|
Message elements. Ownership is not transferred.
|
RStringF
aName
|
Header name
|
DoDeregisterL(CSIPMessageElements *)
DoRegisterL(CSIPMessageElements *)
DoUpdateL(CSIPMessageElements *, TUint *)
ErrorOccured(TInt, TUint32, CConnectionCallback &)
FindTransaction(TUint32)
Searches for a transaction matching the given aRequestId.
HandleError(CConnectionCallback &, TInt, TUint32, const CRegistrationState &)
IncomingResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32, CConnectionCallback &)
IsContextActive()
TBool
|
IsContextActive
|
(
|
)
|
const
|
Checks if the registration context can be used for creating SIP messages/dialogs
NewL(CSIPRegistrationBinding &, CSIPConnection &, CSIPToHeader *, CSIPContactHeader *, CSIPRefresh *, CSIPRouteHeader *, CUri8 *, CSIPFromHeader *)
Two-phased constructor.
-
Pre-condition
-
aAor != 0 && aContact != 0
-
"Expires" parameter in aContact must be >= KSIPMinExpirationValue
Parameters
CSIPRegistrationBinding
& aRegistration
|
Registration binding who creates this CRegBindingImplementation instance.
|
CSIPConnection
& aConnection
|
The SIP connection to be used
|
CSIPToHeader
* aAor
|
contains user's address-of-record to register; the ownership is transfered
|
CSIPContactHeader
* 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
|
CSIPRefresh
* aRefresh
|
if set, created binding will be refreshed; the ownership is transfered
|
CSIPRouteHeader
* aOutboundProxy
|
an outbound proxy address; the ownership is transfered
|
CUri8
* aRemoteUri
|
if set, will be used in request-uri construction; the ownership is transfered
|
CSIPFromHeader
* aFrom
|
From header, the ownership is transferred
|
RegisterL(CSIPMessageElements *)
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
-
leave
-
KErrSIPMalformedMessage if aElements contain contact or expires headers
Parameters
CSIPMessageElements
* aElements = 0
|
contains user SIP headers and content; the ownership is taken
|
RegisteredContact()
Gets the registered Contact-header received in the 200 OK response.
RemoveRegisteredContact()
void
|
RemoveRegisteredContact
|
(
|
)
|
|
RemoveTransaction(const CSIPTransactionBase &)
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.
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.
SetOutboundProxyL(CSIPRouteHeader *)
Sets/resets outbound proxy. If a 0-pointer is given the outbound proxy will be reset.
Parameters
CSIPRouteHeader
* aOutboundProxy
|
an outbound proxy. Ownership is transferred.
|
SetPropertyL(TUint32, TBool)
Sets/resets properties.
-
Pre-condition
-
IsContextActive()
==EFalse
-
leave
-
KErrSIPInvalidRegistrationState if
IsContextActive()
is ETrue
-
leave
-
KErrNotFound if property is not found
SetRegistrationId(TUint32)
void
|
SetRegistrationId
|
(
|
TUint32
|
aRegistrationId
|
)
|
|
StateL()
Returns the current registration state. If state handler is not available, meaning user has deleted a resource needed by
CRegBindingImplementation
, this function leaves.
UNIT_TEST(CSIP_Test)
UNIT_TEST
|
(
|
CSIP_Test
|
|
)
|
const [private]
|
UpdateL(CSIPMessageElements *, TUint *)
UpdateRefreshL(CSIPRefresh &, CSIPMessageElements *, TBool)
UpdateRefreshState(TUint)
void
|
UpdateRefreshState
|
(
|
TUint
|
aStatusCode
|
)
|
const
|
UpdateRegisteredContactL()
void
|
UpdateRegisteredContactL
|
(
|
)
|
|
operator==(const CRegBindingImplementation &)
Compares this object to another object
Member Data Documentation
TBool
iCacheOutboundProxyIP
TBool
|
iCacheOutboundProxyIP
|
[private]
|
CSIPConnection * iConnection
CSIPContactHeader * iContact
CSIPRouteHeader * iOutboundProxy
CSIPContactHeader * iRegisteredContact
CSIPRegistrationBinding & iRegistration
CUri8 * iRemoteUri
CUri8
*
|
iRemoteUri
|
[private]
|
TBool
iSendWithExpires
TBool
|
iSendWithExpires
|
[private]
|
const CRegistrationState * iState
RPointerArray< CSIPClientTransaction > iTransactions
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.