Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: sipreferdialogassoc.h
Link against: sipclient.lib

Class CSIPReferDialogAssoc

class CSIPReferDialogAssoc : public CSIPDialogAssocBase;

Description

Class for managing SIP REFER dialog associations. It provides services for creating, using and terminating SIP REFER dialog associations. User can have multiple REFER dialog associations per same SIP dialog. Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, local and remote tags; User is responsible for "Refer-to" header semantics. sipclient.lib

Derivation

Members

Defined in CSIPReferDialogAssoc:
NewL(), NewL(), NewL(), NewLC(), NewLC(), NewLC(), ReferTo(), SendReferL(), ~CSIPReferDialogAssoc()

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

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


Construction and destruction


NewL()

static IMPORT_C CSIPReferDialogAssoc *NewL(CSIPDialog &aDialog, CSIPReferToHeader *aReferTo);

Pre-Condition

aReferTo != 0

Description

Two-phased constructor. Should be used if response to the SIP request to be sent will create a SIP dialog association.

Parameters

CSIPDialog &aDialog

a dialog to be associated with

CSIPReferToHeader *aReferTo

referred-to resource

Return value

CSIPReferDialogAssoc *

New object; the ownership is transferred

Leave codes

KErrArgument

if aReferTo == 0


NewLC()

static IMPORT_C CSIPReferDialogAssoc *NewLC(CSIPDialog &aDialog, CSIPReferToHeader *aReferTo);

Pre-Condition

aReferTo != 0

Description

Two-phased constructor. Must be used if response to the SIP request to be sent will create a SIP dialog association.

Parameters

CSIPDialog &aDialog

a dialog to be associated with

CSIPReferToHeader *aReferTo

referred-to resource

Return value

CSIPReferDialogAssoc *

New object; the ownership is transferred

Leave codes

KErrArgument

if aReferTo == 0


NewL()

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

Pre-Condition

aFrom != 0

aReferTo != 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.

CSIPReferToHeader *aReferTo

referred-to resource

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

CSIPReferDialogAssoc *

New object; the ownership is transferred.

Leave codes

KErrArgument

if aFrom == 0 or aRemoteuri == 0 or aReferTo == 0


NewLC()

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

Pre-Condition

aFrom != 0

aReferTo != 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.

CSIPReferToHeader *aReferTo

referred-to resource

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

CSIPReferDialogAssoc *

New object; the ownership is transferred.

Leave codes

KErrArgument

if aFrom == 0 or aRemoteuri == 0 or aReferTo == 0


NewL()

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

Pre-Condition

aReferTo != 0

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.

const MSIPRegistrationContext &aContext

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

CSIPReferToHeader *aReferTo

referred-to resource

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

CSIPReferDialogAssoc *

New object: the ownership is transferred.

Leave codes

KErrArgument

if aRemoteuri == 0 or aReferTo == 0

KErrSIPInvalidRegistrationState

if aContext.IsContextActive() == EFalse


NewLC()

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

Pre-Condition

aReferTo != 0

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.

const MSIPRegistrationContext &aContext

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

CSIPReferToHeader *aReferTo

referred-to resource

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

CSIPReferDialogAssoc *

New object; the ownership is transferred.

Leave codes

KErrArgument

if aRemoteuri == 0 or aReferTo == 0

KErrSIPInvalidRegistrationState

if aContext.IsContextActive() == EFalse


~CSIPReferDialogAssoc()

IMPORT_C ~CSIPReferDialogAssoc();

Description

Destructor

[Top]


Member functions


SendReferL()

Capability: NetworkServices

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

Pre-Condition

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

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

Description

Creates REFER and sends it to the remote target. leaves on failure. 101-199 or 2xx response will create REFER dialog association in case of first REFER request within this dialog association.

Parameters

CSIPMessageElements *aElements

optional SIP message headers and body. Ownership is transferred.

Return value

CSIPClientTransaction *

REFER SIP transaction. Ownership is transferred.

Leave codes

KErrSIPInvalidDialogState

if dialog is in wrong state

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted.


ReferTo()

IMPORT_C const CSIPReferToHeader &ReferTo() const;

Description

Gets referred-to resouce

Return value

const CSIPReferToHeader &

referred-to resource