Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: sipnotifydialogassoc.h
Link against: sipclient.lib

Class CSIPNotifyDialogAssoc

class CSIPNotifyDialogAssoc : public CSIPDialogAssocBase;

Description

Class for managing SIP NOTIFY dialog associations. It provides services for creating, using and terminating SIP NOTIFY dialog associations. The user can have multiple NOTIFY 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 "Event" and "Subscription-State" header semantics. sipclient.lib

Derivation

Members

Defined in CSIPNotifyDialogAssoc:
Event(), NewL(), NewL(), NewLC(), NewLC(), SendNotifyL(), SubscriptionState(), SubscriptionState(), ~CSIPNotifyDialogAssoc()

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

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


Construction and destruction


NewL()

static IMPORT_C CSIPNotifyDialogAssoc *NewL(CSIPServerTransaction &aTransaction, CSIPEventHeader *aEvent, CSIPSubscriptionStateHeader *aState);

Pre-Condition

aTransaction.State()==ETrying || EProceeding

aTransaction.Type() == SipStrConsts::ESubscribe || SipStrConsts::ERefer

aEvent != 0 && aState != 0

Description

Two-phased constructor. The response to the received SIP request will create a SIP NOTIFY dialog association that will be correlated with the SIP dialog in which SIP server transaction was received. If the server transaction was not received within a SIP dialog, a new SIP dialog is created. The server transaction must be either SUBSCRIBE or REFER transaction.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

CSIPEventHeader *aEvent

an event to send a notification about; the ownership is transferred.

CSIPSubscriptionStateHeader *aState

a subscription state; the ownership is transferred.

Return value

CSIPNotifyDialogAssoc *

New object; the ownership is transferred

Leave codes

KErrArgument

if aTransaction is not a SUBSCRIBE or REFER transaction, or aEvent == 0 or aState == 0.

KErrSIPInvalidTransactionState

if aTransaction is in a wrong state


NewLC()

static IMPORT_C CSIPNotifyDialogAssoc *NewLC(CSIPServerTransaction &aTransaction, CSIPEventHeader *aEvent, CSIPSubscriptionStateHeader *aState);

Pre-Condition

aTransaction.State()==ETrying || EProceeding

aTransaction.Type() == SipStrConsts::ESubscribe || SipStrConsts::ERefer

aEvent != 0 && aState != 0

Description

Two-phased constructor. The response to the received SIP request will create a SIP NOTIFY dialog association that will be correlated with the SIP dialog in which SIP server transaction was received. If the server transaction was not received within a SIP dialog, a new SIP dialog is created. The server transaction must be either SUBSCRIBE or REFER transaction.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

CSIPEventHeader *aEvent

an event to send a notification about; the ownership is transferred.

CSIPSubscriptionStateHeader *aState

a subscription state; the ownership is transferred.

Return value

CSIPNotifyDialogAssoc *

New object; the ownership is transferred

Leave codes

KErrArgument

if aTransaction is not a SUBSCRIBE or REFER transaction, or aEvent == 0 or aState == 0.

KErrSIPInvalidTransactionState

if aTransaction is in a wrong state


NewL()

static IMPORT_C CSIPNotifyDialogAssoc *NewL(CSIPServerTransaction &aTransaction, const MSIPRegistrationContext &aContext, CSIPEventHeader *aEvent, CSIPSubscriptionStateHeader *aState);

Pre-Condition

aTransaction.State()==ETrying || EProceeding

aTransaction.Type() == SipStrConsts::ESubscribe || SipStrConsts::ERefer

aContext.IsContextActive() == ETrue

aEvent != 0 && aState != 0

Description

Two-phased constructor. The response to the received SIP request will create a SIP NOTIFY dialog association that will be correlated with the SIP dialog in which SIP server transaction was received. If the server transaction was not received within a SIP dialog, a new SIP dialog is created. The server transaction must be either SUBSCRIBE or REFER transaction.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

const MSIPRegistrationContext &aContext

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

CSIPEventHeader *aEvent

an event to send a notification about; the ownership is transferred.

CSIPSubscriptionStateHeader *aState

a subscription state; the ownership is transferred.

Return value

CSIPNotifyDialogAssoc *

New object; the ownership is transferred

Leave codes

KErrArgument

if aTransaction is not a SUBSCRIBE or REFER transaction, or aEvent == 0 or aState == 0.

KErrSIPInvalidTransactionState

if aTransaction is in a wrong state


NewLC()

static IMPORT_C CSIPNotifyDialogAssoc *NewLC(CSIPServerTransaction &aTransaction, const MSIPRegistrationContext &aContext, CSIPEventHeader *aEvent, CSIPSubscriptionStateHeader *aState);

Pre-Condition

aTransaction.State()==ETrying || EProceeding

aTransaction.Type() == SipStrConsts::ESubscribe || SipStrConsts::ERefer

aContext.IsContextActive() == ETrue

aEvent != 0 && aState != 0

Description

Two-phased constructor. The response to the received SIP request will create a SIP NOTIFY dialog association that will be correlated with the SIP dialog in which SIP server transaction was received. If the server transaction was not received within a SIP dialog, a new SIP dialog is created. The server transaction must be either SUBSCRIBE or REFER transaction.

Parameters

CSIPServerTransaction &aTransaction

a SIP server transaction

const MSIPRegistrationContext &aContext

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

CSIPEventHeader *aEvent

an event to send a notification about; the ownership is transferred.

CSIPSubscriptionStateHeader *aState

a subscription state; the ownership is transferred.

Return value

CSIPNotifyDialogAssoc *

New object; the ownership is transferred

Leave codes

KErrArgument

if aTransaction is not a SUBSCRIBE or REFER transaction, or aEvent == 0 or aState == 0.

KErrSIPInvalidTransactionState

if aTransaction is in a wrong state


~CSIPNotifyDialogAssoc()

IMPORT_C ~CSIPNotifyDialogAssoc();

Description

Destructor

[Top]


Member functions


SendNotifyL()

Capability: NetworkServices

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

Pre-Condition

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

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

Description

Creates NOTIFY and sends it to the remote target. If client provides optional SIP headers they must not contain Event and Subscription-State headers.

Parameters

CSIPMessageElements *aElements

optional SIP message headers and body. Ownership is transferred.

Return value

CSIPClientTransaction *

NOTIFY SIP UAC transaction

Leave codes

KErrSIPInvalidDialogState

if dialog's state is incorrect

KErrSIPResourceNotAvailable

if a required SIP Client API object has been deleted.


Event()

IMPORT_C const CSIPEventHeader &Event() const;

Description

Gets an event about which the notification is done

Return value

const CSIPEventHeader &

an event


SubscriptionState()

IMPORT_C CSIPSubscriptionStateHeader &SubscriptionState();

Description

Gets subscription state

Return value

CSIPSubscriptionStateHeader &

subscription state


SubscriptionState()

IMPORT_C const CSIPSubscriptionStateHeader &SubscriptionState() const;

Description

Gets subscription state

Return value

const CSIPSubscriptionStateHeader &

subscription state