Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: sipinvitedialogassoc.h
Link against: sipclient.lib

Class CSIPInviteDialogAssoc

class CSIPInviteDialogAssoc : public CSIPDialogAssocBase;

Description

Class for managing SIP dialog association created with INVITE. It provides services for creating, using and terminating SIP INVITE dialog association.

The user can have only one INVITE dialog association per dialog.

sipclient.lib

Derivation

Members

Defined in CSIPInviteDialogAssoc:
NewL(), NewL(), NewL(), NewL(), NewL(), NewLC(), NewLC(), NewLC(), NewLC(), NewLC(), SendAckL(), SendByeL(), SendInviteL(), SendPrackL(), SendUpdateL(), ~CSIPInviteDialogAssoc()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CSIPDialogAssocBase:
Dialog(), IsNonTargetRefreshRequest(), SendNonTargetRefreshRequestL(), Type()


Construction and destruction


NewL()

static IMPORT_C CSIPInviteDialogAssoc *NewL(CSIPDialog &aDialog);

Description

Two-phased constructor.

Parameters

CSIPDialog &aDialog

a dialog to be associated with

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.


NewLC()

static IMPORT_C CSIPInviteDialogAssoc *NewLC(CSIPDialog &aDialog);

Description

Two-phased constructor.

Parameters

CSIPDialog &aDialog

a dialog to be associated with

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.


NewL()

static IMPORT_C CSIPInviteDialogAssoc *NewL(CSIPServerTransaction &aTransaction);

Pre-Condition

aTransaction.State() == CSIPTransactionBase::EProceeding

aTransaction.Type() == SipStrConsts::EInvite

Description

Two-phased constructor. Should be used if response to the received SIP request will create a SIP dialog association. The server transaction must be a INVITE transaction. If SIP server transaction was received within an existing SIP dialog the created SIP dialog association will be correlated to that SIP dialog. Otherwise a new SIP dialog is created.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aTransaction.Type() != SipStrConsts::EInvite

KErrSIPInvalidTransactionState

if aTransaction.State() != CSIPTransactionBase::EProceeding

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


NewLC()

static IMPORT_C CSIPInviteDialogAssoc *NewLC(CSIPServerTransaction &aTransaction);

Pre-Condition

aTransaction.State() == CSIPTransactionBase::EProceeding

aTransaction.Type() == SipStrConsts::EInvite

Description

Two-phased constructor. Should be used if response to the received SIP request will create a SIP dialog association. The server transaction must be a INVITE transaction. If SIP server transaction was received within the existing SIP dialog the created SIP dialog association will be correlated to that SIP dialog. Otherwise a new SIP dialog is created.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aTransaction.Type() != SipStrConsts::EInvite

KErrSIPInvalidTransactionState

if aTransaction.State() != CSIPTransactionBase::EProceeding

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


NewL()

static IMPORT_C CSIPInviteDialogAssoc *NewL(CSIPServerTransaction &aTransaction, const MSIPRegistrationContext &aContext);

Pre-Condition

aTransaction.State() == CSIPTransactionBase::EProceeding

aTransaction.Type() == SipStrConsts::EInvite

aContext.IsContextActive() == ETrue

Description

Two-phased constructor. Should be used if response to the received SIP request will create a SIP dialog association. The server transaction must be a INVITE transaction. If SIP server transaction was received within an existing SIP dialog the created SIP dialog association will be correlated to that SIP dialog. Otherwise a new SIP dialog is created.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

const MSIPRegistrationContext &aContext

that will be used for populating the Contact-header of the response to aTransaction

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aTransaction.Type() != SipStrConsts::EInvite

KErrSIPInvalidTransactionState

if aTransaction.State() != CSIPTransactionBase::EProceeding

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


NewLC()

static IMPORT_C CSIPInviteDialogAssoc *NewLC(CSIPServerTransaction &aTransaction, const MSIPRegistrationContext &aContext);

Pre-Condition

aTransaction.State() == CSIPTransactionBase::EProceeding

aTransaction.Type() == SipStrConsts::EInvite

aContext.IsContextActive() == ETrue

Description

Two-phased constructor. Should be used if response to the received SIP request will create a SIP dialog association. The server transaction must be a INVITE transaction. If SIP server transaction was received within the existing SIP dialog the created SIP dialog association will be correlated to that SIP dialog. Otherwise a new SIP dialog is created.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

const MSIPRegistrationContext &aContext

that will be used for populating the Contact-header of the response to aTransaction

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aTransaction.Type() != SipStrConsts::EInvite

KErrSIPInvalidTransactionState

if aTransaction.State() != CSIPTransactionBase::EProceeding

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


NewL()

static IMPORT_C CSIPInviteDialogAssoc *NewL(CSIPConnection &aConnection, CSIPFromHeader *aFrom, CUri8 *aRemoteUri, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0);

Pre-Condition

aFrom != 0

aRemoteUri != 0 The user of the class must not define tags in From-header and To-header.

Description

Two-phased constructor

Parameters

CSIPConnection &aConnection

a SIP connection to be used with dialog association

CSIPFromHeader *aFrom

originator's address; the ownership is transfered

CUri8 *aRemoteUri

a remote target URI that identifies a resource that the request is addressed to. The ownership is transferred.

CSIPToHeader *aTo

logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered

CSIPContactHeader *aContact

a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aFrom == 0 or aRemoteUri == 0


NewLC()

static IMPORT_C CSIPInviteDialogAssoc *NewLC(CSIPConnection &aConnection, CSIPFromHeader *aFrom, CUri8 *aRemoteUri, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0);

Pre-Condition

aFrom != 0

aRemoteUri != 0 The user of the class must not define tags in From-header and To-header.

Description

Two-phased constructor

Parameters

CSIPConnection &aConnection

CSIPFromHeader *aFrom

originator's address; the ownership is transfered

CUri8 *aRemoteUri

a remote target URI that identifies a resource that the request is addressed to. The ownership is transferred.

CSIPToHeader *aTo

logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered

CSIPContactHeader *aContact

a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aFrom == 0 or aRemoteUri == 0


NewL()

static IMPORT_C CSIPInviteDialogAssoc *NewL(CSIPConnection &aConnection, CUri8 *aRemoteUri, const MSIPRegistrationContext &aContext, CSIPFromHeader *aFrom=0, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0);

Pre-Condition

aRemoteUri != 0 The user of the class must not define tags in From-header and To-header.

aContext.IsContextActive() == ETrue

Description

Two-phased constructor

Parameters

CSIPConnection &aConnection

a SIP connection to be used with dialog association

CUri8 *aRemoteUri

a remote target URI that identifies a resource that the request is targeted to. The ownership is transferred.

const MSIPRegistrationContext &aContext

used for selecting outbound proxy and originator's address (AOR) and contact

CSIPFromHeader *aFrom

originator's address. If not defined it will constructed using registration context (User's AOR); the ownership is transfered

CSIPToHeader *aTo

logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered

CSIPContactHeader *aContact

a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aRemoteUri == 0

KErrSIPInvalidRegistrationState

if aContext.IsContextActive() == EFalse


NewLC()

static IMPORT_C CSIPInviteDialogAssoc *NewLC(CSIPConnection &aConnection, CUri8 *aRemoteUri, const MSIPRegistrationContext &aContext, CSIPFromHeader *aFrom=0, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0);

Pre-Condition

aRemoteUri != 0 The user of the class must not define tags in From-header and To-header.

aContext.IsContextActive() == ETrue

Description

Two-phased constructor

Parameters

CSIPConnection &aConnection

a SIP connection to be used with dialog association

CUri8 *aRemoteUri

a remote target URI that identifies a resource that the request is targeted to. The ownership is transferred.

const MSIPRegistrationContext &aContext

used for selecting outbound proxy and originator's address (AOR) and contact

CSIPFromHeader *aFrom

originator's address. If not defined it will constructed using registration context (User's AOR); the ownership is transfered

CSIPToHeader *aTo

logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered

CSIPContactHeader *aContact

a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

Return value

CSIPInviteDialogAssoc *

New object, ownership is transferred.

Leave codes

KErrArgument

if aRemoteUri == 0

KErrSIPInvalidRegistrationState

if aContext.IsContextActive() == EFalse


~CSIPInviteDialogAssoc()

IMPORT_C ~CSIPInviteDialogAssoc();

Description

Destructor

[Top]


Member functions


SendInviteL()

Capability: NetworkServices

IMPORT_C CSIPClientTransaction *SendInviteL(CSIPMessageElements *aElements=0);

Pre-Condition

Dialog().Connection().State()==EActive

Dialog().State()==CSIPDialogEInit || Dialog().State()==CSIPDialog::EConfirmed

Description

Creates INVITE and sends it to the remote target. 101-199 or 2xx response will create INVITE dialog association in case of first INVITE within this dialog association. Subsequent INVITE requests are re-INVITEs.

Parameters

CSIPMessageElements *aElements

contains user SIP headers and content. Ownership is transferred.

Return value

CSIPClientTransaction *

INVITE SIP transaction. Ownership is transferred.

Leave codes

KErrSIPInvalidDialogState

if dialog is not in a correct state

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


SendPrackL()

Capability: NetworkServices

IMPORT_C CSIPClientTransaction *SendPrackL(CSIPMessageElements *aElements=0);

Pre-Condition

Dialog().Connection().State()==EActive

Dialog().State()==CSIPDialog::EEarly || Dialog().State()==CSIPDialog::EConfirmed

aElements must not contain Contact headers

Description

Creates PRACK and sends it to the remote target.

Parameters

CSIPMessageElements *aElements

contains user SIP headers and content. Ownership is transferred.

Return value

CSIPClientTransaction *

PRACK SIP transaction. Ownership is transferred.

Leave codes

KErrSIPInvalidDialogState

if dialog is not in a correct state

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


SendUpdateL()

Capability: NetworkServices

IMPORT_C CSIPClientTransaction *SendUpdateL(CSIPMessageElements *aElements=0);

Pre-Condition

Dialog().Connection().State()==EActive

Dialog().State()==CSIPDialog::EEarly || Dialog().State()==CSIPDialog::EConfirmed

Description

Creates UPDATE and sends it to the remote target.

Parameters

CSIPMessageElements *aElements

contains user SIP headers and content. Ownership is transferred.

Return value

CSIPClientTransaction *

UPDATE SIP transaction. Ownership is transferred.

Leave codes

KErrSIPInvalidDialogState

if dialog is not in a correct state

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


SendAckL()

Capability: NetworkServices

IMPORT_C void SendAckL(const CSIPClientTransaction &aTransaction, CSIPMessageElements *aElements=0);

Pre-Condition

Dialog().Connection().State()==EActive

Dialog().State()==CSIPDialog::EConfirmed

Description

Creates SIP ACK request and sends it to the remote target. The client transaction must be an INVITE transaction.

Parameters

const CSIPClientTransaction &aTransaction

a SIP INVITE client transaction to acknowledge

CSIPMessageElements *aElements

optional SIP message headers and body. Ownership is transferred.

Leave codes

KErrArgument

if aTransaction is not an INVITE transaction.

KErrSIPInvalidDialogState

if ACK can't be sent in the current dialog state

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted


SendByeL()

Capability: NetworkServices

IMPORT_C CSIPClientTransaction *SendByeL(CSIPMessageElements *aElements=0);

Pre-Condition

Dialog().Connection().State()==EActive

Dialog().State()==CSIPDialog::EEarly || Dialog().State()==CSIPDialog::EConfirmed

Description

Creates SIP BYE request and sends it to the remote target.

Parameters

CSIPMessageElements *aElements

contains user SIP headers and content. Ownership is transferred.

Return value

CSIPClientTransaction *

SIP BYE transaction. Ownership is transferred.

Leave codes

KErrSIPInvalidDialogState

if BYE can't be sent in the current dialog state

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted