CSIPDialogImplementation Class Reference
class CSIPDialogImplementation : public CBase
|
Implementation class for managing SIP dialogs.
Public Member Functions
|
|
~CSIPDialogImplementation
()
|
void
|
AddAssocL
(
CSIPDialogAssocBase
&,
RStringF
)
|
const
CSIPCallIDHeader
&
|
CallIdL
()
|
void
|
ChangeRefreshesToActive
()
|
void
|
ChangeState
(const
CDialogState
*)
|
void
|
CheckNoTransactionExistsL
()
|
CSIPConnection
*
|
Connection
()
|
const
CSIPConnection
*
|
Connection
()
|
void
|
ConnectionDeleted
()
|
void
|
ConnectionLost
()
|
const
CSIPContactHeader
*
|
ContactHeader
()
|
void
|
CopyCallIdL
(const
CSIPDialogImplementation
&)
|
CSIPClientTransaction
*
|
CreateClientTransactionL
(
RStringF
,
CSIPDialogAssocImplementation
&,
CSIPRefresh
*)
|
CSIPDialog
&
|
Dialog
()
|
TUint32
|
DialogId
()
|
TBool
|
DoesNotifyConfirmDialog
()
|
TBool
|
ErrorOccured
(
TInt
,
TUint32
,
CConnectionCallback
&)
|
TBool
|
ErrorOccured
(
TInt
,
TUint32
,
TUint32
,
CConnectionCallback
&)
|
void
|
FillLocalTagL
(
TBool
)
|
void
|
FillRemoteTagL
(const
CSIPToHeader
&)
|
TBool
|
FindAssocAndRefresh
(
TUint32
,
CSIPDialogAssocBase
**,
CSIPRefresh
**)
|
TBool
|
FindAssocAndRefreshL
(
TUint32
,
TUint32
,
CSIPDialogAssocBase
**,
CSIPRefresh
**,
CSIPTransactionBase
**)
|
CSIPRefresh
*
|
FindRefresh
(
TUint32
,
TUint32
)
|
CSIPTransactionBase
*
|
FindTransaction
(
TUint32
)
|
TBool
|
FindTransactionAndAssoc
(
TUint32
,
CSIPTransactionBase
**,
CSIPDialogAssocBase
**)
|
const
CSIPFromHeader
&
|
FromHeader
()
|
CUri8
*
|
GetUriFromContactL
(const
CSIPMessageElements
&)
|
TBool
|
IncomingRequestL
(
CSIPServerTransaction
*,
CConnectionCallback
&)
|
TBool
|
IncomingResponseL
(
CSIPResponseElements
*,
TUint32
,
TUint32
,
CConnectionCallback
&)
|
TBool
|
IncomingResponseL
(
CSIPResponseElements
*,
TUint32
,
TUint32
,
TUint32
,
CConnectionCallback
&)
|
void
|
InitialTransactionReceivedL
(
CSIPServerTransaction
&)
|
void
|
InitialTransactionStarted
(
TUint32
)
|
TBool
|
IsAssociated
(const
CSIPDialogAssocBase
&)
|
CSIPDialogImplementation
*
|
NewL
(
CSIPDialog
*,
CSIPConnectionImplementation
&)
|
CSIPDialogImplementation
*
|
NewL
(
CSIPDialog
*,
CSIPConnectionImplementation
&, const
MSIPRegistrationContext
&)
|
CSIPDialogImplementation
*
|
NewLC
(
CSIPConnectionImplementation
&, const
MSIPRegistrationContext
*)
|
const
MSIPRegistrationContext
*
|
RegistrationContext
()
|
TUint32
|
RegistrationId
()
|
const
CUri8
&
|
RemoteURI
()
|
void
|
RemoveAssoc
(const
CSIPDialogAssocBase
&)
|
TBool
|
ResponseToRefreshL
(
CSIPResponseElements
*,
TUint32
,
TUint32
,
CConnectionCallback
&, const
CDialogState
&, const
CDialogState
&, const
CDialogState
&,
TBool
)
|
TInt
|
ReuseInitialRequestData
()
|
const
RPointerArray
<
CSIPDialogAssocBase
> &
|
SIPDialogAssociations
()
|
void
|
SendAckL
(
CSIPInviteDialogAssoc
&, const
CSIPClientTransaction
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendByeL
(
CSIPInviteDialogAssoc
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendCancelL
(
TUint32
)
|
CSIPClientTransaction
*
|
SendDialogCreatingRequestL
(
CSIPDialogAssocImplementation
&,
CSIPMessageElements
*,
CSIPRefresh
*)
|
CSIPClientTransaction
*
|
SendInviteL
(
CSIPInviteDialogAssoc
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendNonTargetRefreshRequestL
(
CSIPDialogAssocImplementation
&,
RStringF
,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendNotifyL
(
CSIPNotifyDialogAssoc
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendPrackL
(
CSIPInviteDialogAssoc
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendReferL
(
CSIPReferDialogAssoc
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendRequestInDialogL
(
CSIPDialogAssocImplementation
&,
RStringF
,
CSIPMessageElements
*)
|
void
|
SendResponseL
(const
CSIPResponseElements
&,
TUint32
,
TBool
,
TBool
)
|
CSIPClientTransaction
*
|
SendSubscribeL
(
CSIPSubscribeDialogAssoc
&,
CSIPMessageElements
*,
CSIPRefresh
*)
|
CSIPClientTransaction
*
|
SendUnsubscribeL
(
CSIPSubscribeDialogAssoc
&,
CSIPMessageElements
*)
|
CSIPClientTransaction
*
|
SendUpdateL
(
CSIPInviteDialogAssoc
&,
CSIPMessageElements
*)
|
void
|
SetDialogId
(
TUint32
)
|
void
|
SetHeadersL
(
CSIPFromHeader
*,
CSIPToHeader
*,
CUri8
*,
CSIPContactHeader
*)
|
CSIPDialog::TState
|
State
()
|
void
|
StoreCallIdL
()
|
const
CSIPToHeader
&
|
ToHeader
()
|
CSIPClientTransaction
*
|
UpdateL
(
CSIPSubscribeDialogAssoc
&,
CSIPMessageElements
*)
|
void
|
UpdateRemoteTargetL
(
RStringF
, const
CSIPMessageElements
&)
|
void
|
UpdateState
(const
CSIPClientTransaction
&, const
CDialogState
&, const
CDialogState
&, const
CDialogState
&)
|
TBool
|
operator==
(const
CSIPDialogImplementation
&)
|
Constructor & Destructor Documentation
CSIPDialogImplementation(CSIPConnectionImplementation &)
CSIPDialogImplementation(CSIPConnectionImplementation &, const MSIPRegistrationContext &)
~CSIPDialogImplementation()
~CSIPDialogImplementation
|
(
|
)
|
|
Member Functions Documentation
AddAssocL(CSIPDialogAssocBase &, RStringF)
Add a dialog association to this dialog. A dialog can have only one INVITE association at a time.
-
leave
-
KErrAlreadyExists If aAssoc is already associated with this dialog or if attempting to add another INVITE dialog association.
CallIdL()
Gets the Call-ID of the dialog.
ChangeRefreshesToActive()
void
|
ChangeRefreshesToActive
|
(
|
)
|
const
|
ChangeState(const CDialogState *)
Changes the dialog's current state.
CheckConnectionL()
void
|
CheckConnectionL
|
(
|
)
|
const [private]
|
CheckNoTransactionExistsL()
void
|
CheckNoTransactionExistsL
|
(
|
)
|
const
|
Connection()
Gets the SIP connection used for this dialog
Connection()
Gets the SIP connection used for this dialog.
ConnectionDeleted()
void
|
ConnectionDeleted
|
(
|
)
|
|
ConnectionLost()
Connection state is no longer available.
ConstructL(CSIPDialog *)
void
|
ConstructL
|
(
|
CSIPDialog
*
|
aDialog
|
)
|
[private]
|
CopyCallIdL(const CSIPDialogImplementation &)
Copies Call-ID from aDialog.
-
Pre-condition
-
iCallID == NULL
CreateClientTransactionL(RStringF, CSIPDialogAssocImplementation &, CSIPRefresh *)
Creates a client transaction.
Parameters
RStringF
aType
|
Transaction type
|
CSIPDialogAssocImplementation
& aAssoc
|
Dialog association with which the transaction will be associated
|
CSIPRefresh
* aRefresh
|
If transaction is refreshed, this points to a CSIPRefresh, otherwise this is NULL. Ownership is not transferred.
|
DoesNotifyConfirmDialog()
TBool
|
DoesNotifyConfirmDialog
|
(
|
)
|
const
|
Determine if an incoming NOTIFY causes dialog to enter confirmed state.
ErrorOccured(TInt, TUint32, CConnectionCallback &)
ErrorOccured(TInt, TUint32, TUint32, CConnectionCallback &)
FillLocalTagL(TBool)
void
|
FillLocalTagL
|
(
|
TBool
|
aClientInitiatedDialog
|
)
|
const
|
If the local tag is not yet known, obtain it from the SIP server via an ITC operation.
Parameters
TBool
aClientInitiatedDialog
|
ETrue if the dialog creating request was sent by the local endpoint EFalse otherwise
|
FillRemoteTagL(const CSIPToHeader &)
void
|
FillRemoteTagL
|
(
|
const
CSIPToHeader
&
|
aToHeader
|
)
|
const
|
If aToHeader has a tag parameter, the tag is stored as a remote-tag in the To-header of the dialog.
Parameters
const
CSIPToHeader
& aToHeader
|
To-header of a response from remote endpoint.
|
FindAssocAndRefresh(TUint32, CSIPDialogAssocBase **, CSIPRefresh **)
Searches for the dialog association and refresh by the aRefreshId.
FindAssocAndRefreshL(TUint32, TUint32, CSIPDialogAssocBase **, CSIPRefresh **, CSIPTransactionBase **)
Searches for the dialog association, refresh and transaction. Both aRequestId and aRefreshId are used for search, because either of them might not yet be stored in the SIP API.
FindRefresh(TUint32, TUint32)
Finds a refresh by first the given request ID and the the refresh ID. All dialog associations are searched through.
Parameters
TUint32
aRequestId
|
RequestId associated with the refresh instance
|
TUint32
aRefreshId
|
RefreshId associated with the refresh instance
|
FindTransaction(TUint32)
Searches for a transaction having the specified id.
Parameters
TUint32
aRequestId
|
Identifier used for searching the transaction.
|
FindTransactionAndAssoc(TUint32, CSIPTransactionBase **, CSIPDialogAssocBase **)
Searches for a transaction having the specified id.
Parameters
TUint32
aRequestId
|
Identifier used for searching the transaction
|
CSIPTransactionBase
** aTransaction
|
OUT: pointer is set to the found transaction
|
CSIPDialogAssocBase
** aAssoc
|
OUT: pointer is set to the dialog association related to the found transaction
|
FromHeader()
Gets originator's address
GetUriFromContactL(const CSIPMessageElements &)
Creates a copy of the URI in Contact-header, if aElements contains exactly one Contact-header.
HasInviteAssoc()
TBool
|
HasInviteAssoc
|
(
|
)
|
const [private]
|
Checks whether the dialog has an INVITE assocation.
IncomingRequestL(CSIPServerTransaction *, CConnectionCallback &)
Handle an incoming SIP request.
IncomingResponseL(CSIPResponseElements *, TUint32, TUint32, CConnectionCallback &)
IncomingResponseL(CSIPResponseElements *, TUint32, TUint32, TUint32, CConnectionCallback &)
InitialTransactionReceivedL(CSIPServerTransaction &)
Stores the To and From headers of the server transaction and marks the transaction to affect the dialog state.
InitialTransactionStarted(TUint32)
void
|
InitialTransactionStarted
|
(
|
TUint32
|
aRequestId
|
)
|
|
The dialog creating transaction has been initiated.
-
Pre-condition
-
aRequestId != 0
-
iInitialRequestId == 0
-
Post-condition
-
iInitialRequestId == aRequestId
Parameters
TUint32
aRequestId
|
RequestId of the transaction that creates the dialog
|
InitialTransactionStarted(CSIPTransactionBase &)
The dialog creating transaction has been created. The SIP responses to aTransaction will affect the state of dialog.
-
Pre-condition
-
iInitialRequestId == 0
IsAssociated(const CSIPDialogAssocBase &)
Checks if the dialog association belongs to this dialog
NewL(CSIPDialog *, CSIPConnectionImplementation &)
Two-phased constructor. This constructor should be used if the user has received SIP request that creates a SIP dialog association.
Parameters
CSIPDialog
* aDialog
|
Dialog which creates this CSIPDialogImplementation. Ownership is transferred.
|
CSIPConnectionImplementation
& aConnImplementation
|
Implementation of the used SIP connection
|
NewL(CSIPDialog *, CSIPConnectionImplementation &, const MSIPRegistrationContext &)
Two-phased constructor This constructor should be used if the user has received SIP request that creates a SIP dialog association.
Parameters
CSIPDialog
* aDialog
|
Dialog which creates this CSIPDialogImplementation. Ownership is transferred.
|
CSIPConnectionImplementation
& aConnImplementation
|
Implementation of the used SIP connection
|
const
MSIPRegistrationContext
& aContext
|
Registration context whose outbound proxy and other parameters are to be used.
|
NewLC(CSIPConnectionImplementation &, const MSIPRegistrationContext *)
Parameters
CSIPConnectionImplementation
& aConnImplementation
|
Connection implementation to use with the new dialog.
|
const
MSIPRegistrationContext
* aContext = 0
|
Registration context whose outbound proxy and other parameters are to be used. If NULL, context isn't used. Ownership is not transferred.
|
RegistrationContext()
Gets used registration context for this dialog
RemoteURI()
const
CUri8
&
|
RemoteURI
|
(
|
)
|
const
|
Gets remote-uri used during dialog creation
RemoveAssoc(const CSIPDialogAssocBase &)
Remove a dialog association from this dialog. When there are no associations left, the dialog is deleted.
ResponseToRefreshL(CSIPResponseElements *, TUint32, TUint32, CConnectionCallback &, const CDialogState &, const CDialogState &, const CDialogState &, TBool)
ReuseInitialRequestData()
TInt
|
ReuseInitialRequestData
|
(
|
)
|
|
SIPDialogAssociations()
Gets all dialog associations.
SendAckL(CSIPInviteDialogAssoc &, const CSIPClientTransaction &, CSIPMessageElements *)
SendByeL(CSIPInviteDialogAssoc &, CSIPMessageElements *)
SendDialogCreatingRequestL(CSIPDialogAssocImplementation &, CSIPMessageElements *, CSIPRefresh *)
Send a request that creates the dialog.
SendInviteL(CSIPInviteDialogAssoc &, CSIPMessageElements *)
SendNonTargetRefreshRequestL(CSIPDialogAssocImplementation &, RStringF, CSIPMessageElements *)
SendNotifyL(CSIPNotifyDialogAssoc &, CSIPMessageElements *)
SendPrackL(CSIPInviteDialogAssoc &, CSIPMessageElements *)
SendReferL(CSIPReferDialogAssoc &, CSIPMessageElements *)
SendRequestInDialogL(CSIPDialogAssocImplementation &, RStringF, CSIPMessageElements *)
Sends a SIP request described by aElements withing dialog and creates a client transaction representing the request.
-
Pre-condition
-
aMethod.Length() > 0
SendResponseL(const CSIPResponseElements &, TUint32, TBool, TBool)
Send a SIP response to network. Application can't send a 100 response. That has already been checked by
CSIPResponseElements
.
Parameters
const
CSIPResponseElements
& aElements
|
Response elements
|
TUint32
aRequestId
|
Identifies the request to which this response is for
|
TBool
aAffectsDialogState
|
Tells if the response can cause dialog to enter another state.
|
TBool
aTargetRefresh = EFalse
|
Tells if this is a response to a target refresh request.
|
SendSubscribeL(CSIPSubscribeDialogAssoc &, CSIPMessageElements *, CSIPRefresh *)
SendUnsubscribeL(CSIPSubscribeDialogAssoc &, CSIPMessageElements *)
SendUpdateL(CSIPInviteDialogAssoc &, CSIPMessageElements *)
SetDialogId(TUint32)
void
|
SetDialogId
|
(
|
TUint32
|
aDialogId
|
)
|
|
SetHeadersL(CSIPFromHeader *, CSIPToHeader *, CUri8 *, CSIPContactHeader *)
Sets the dialog related headers when a SIP request that creates a SIP dialog association, is sent. Headers can be set only once. If aTo is NULL, aRemoteUri is used as To-header.
-
Pre-condition
-
aRemoteUri != NULL && iRemoteUri == NULL && iFrom == NULL && iTo == NULL && iContact == NULL
Parameters
CSIPFromHeader
* aFrom
|
Originator's address, can be NULL. Ownership is transferred.
|
CSIPToHeader
* aTo
|
Recipient's address, can be NULL. Ownership is transferred
|
CUri8
* aRemoteUri
|
|
CSIPContactHeader
* aContact
|
Contact to be used in dialog creation, can be NULL. Must be given only if user intends to re-direct future requests. Ownership is transferred.
|
StateL()
Returns the current dialog state. If state handler is not available, meaning user has deleted a resource needed by
CSIPDialogImplementation
, this function leaves.
StoreCallIdL()
Get the Call-ID from SIP Client and store it.
UNIT_TEST(CSIP_Test)
UNIT_TEST
|
(
|
CSIP_Test
|
|
)
|
const [private]
|
UpdateL(CSIPSubscribeDialogAssoc &, CSIPMessageElements *)
UpdateRemoteTargetL(RStringF, const CSIPMessageElements &)
If aMethod is a target refresh request, and aElements contains a Contact-header, the remote target URI of the dialog is updated.
UpdateState(const CSIPClientTransaction &, const CDialogState &, const CDialogState &, const CDialogState &)
Based on the received response, dialog may enter another state. A 100 response should not have a To-tag, so dialog won't enter Early-state when a 100 is received.
Parameters
const
CSIPClientTransaction
& aTransaction
|
Client transaction carrying the received response
|
const
CDialogState
& aEarly
|
Early-state of the dialog state machine
|
const
CDialogState
& aConfirmed
|
Confirmed-state of the dialog state machine
|
const
CDialogState
& aTerminated
|
Terminated-state of the dialog state machine
|
operator==(const CSIPDialogImplementation &)
Compares this object to another object
Member Data Documentation
CSIPCallIDHeader * iCallID
CSIPConnectionImplementation * iConnection
CSIPContactHeader * iContact
RPointerArray< CSIPDialogAssocBase > iDialogAssocs
TUint32
iInitialRequestId
TUint32
|
iInitialRequestId
|
[private]
|
const MSIPRegistrationContext * iRegistration
CUri8 * iRemoteUri
CUri8
*
|
iRemoteUri
|
[private]
|
const CDialogState * iState
TBool
iStringPoolOpened
TBool
|
iStringPoolOpened
|
[private]
|
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.