S60 3rd Edition API Reference: CSIPSubscribeDialogAssoc Class Reference

CSIPSubscribeDialogAssoc Class Reference

API published in: S60 2nd Ed

Link against: sipclient.lib

Capability Information

Required Capabilities

Location NetworkControl NetworkServices ReadDeviceData WriteDeviceData


#include <sipsubscribedialogassoc.h>

Inherits CSIPDialogAssocBase.


Detailed Description

PublishedAll
Released
Class for managing SIP SUBSCRIBE dialog associations. It provides services for creating, using and terminating SIP SUBSCRIBE dialog associations. The client can have multiple SUBSRIBE dialog associations per same SIP dialog. Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, local and remote tags; "Event" header semantics are client's responsibility

Public Member Functions

IMPORT_C ~CSIPSubscribeDialogAssoc ()
 Destructor.
IMPORT_C CSIPClientTransactionSendSubscribeL (CSIPMessageElements *aElements=0, CSIPRefresh *aRefresh=0)
 Creates SUBSCRIBE and sends it to the remote target.
IMPORT_C CSIPClientTransactionUpdateL (CSIPMessageElements *aElements)
 Updates the subscription.
IMPORT_C CSIPClientTransactionSendUnsubscribeL (CSIPMessageElements *aElements=0)
 Creates (un)SUBSCRIBE and sends it to the remote target.
IMPORT_C const CSIPRefreshSIPRefresh () const
 Gets associated refresh in case the user has requested the refresh of the SIP subscription.
IMPORT_C const CSIPEventHeaderEvent () const
 Gets an event to which the subscription is done.
CSIPRefreshFindRefresh (TUint32 aRefreshId)
 Searches for a refresh with the matching id.
void ConnectionLost ()
CSIPClientTransactionDoSendSubscribeL (CSIPMessageElements *aElements, CSIPRefresh *aRefresh, TBool aWithinDialog)
CSIPClientTransactionDoSendUnsubscribeL (CSIPMessageElements *aElements)
void DeletingRefresh (CSIPRefresh &aRefresh, TUint32 aRefreshId)

Static Public Member Functions

static IMPORT_C CSIPSubscribeDialogAssocNewL (CSIPDialog &aDialog, CSIPEventHeader *aEvent)
 Two-phased constructor.
static IMPORT_C CSIPSubscribeDialogAssocNewLC (CSIPDialog &aDialog, CSIPEventHeader *aEvent)
 Two-phased constructor.
static IMPORT_C CSIPSubscribeDialogAssocNewL (CSIPConnection &aConnection, CSIPFromHeader *aFrom, CUri8 *aRemoteUri, CSIPEventHeader *aEvent, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0)
 Two-phased constructor.
static IMPORT_C CSIPSubscribeDialogAssocNewLC (CSIPConnection &aConnection, CSIPFromHeader *aFrom, CUri8 *aRemoteUri, CSIPEventHeader *aEvent, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0)
 Two-phased constructor.
static IMPORT_C CSIPSubscribeDialogAssocNewL (CSIPConnection &aConnection, CUri8 *aRemoteUri, const MSIPRegistrationContext &aContext, CSIPEventHeader *aEvent, CSIPFromHeader *aFrom=0, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0)
 Two-phased constructor.
static IMPORT_C CSIPSubscribeDialogAssocNewLC (CSIPConnection &aConnection, CUri8 *aRemoteUri, const MSIPRegistrationContext &aContext, CSIPEventHeader *aEvent, CSIPFromHeader *aFrom=0, CSIPToHeader *aTo=0, CSIPContactHeader *aContact=0)
 Two-phased constructor.
static CSIPSubscribeDialogAssocNewLC (CSIPConnection &aConnection, CUri8 *aRemoteUri, CSIPEventHeader *aEvent, CSIPFromHeader *aFrom, CSIPToHeader *aTo, CSIPContactHeader *aContact, const MSIPRegistrationContext *aContext)

Constructor & Destructor Documentation

IMPORT_C CSIPSubscribeDialogAssoc::~CSIPSubscribeDialogAssoc  ) 
 

Destructor.


Member Function Documentation

void CSIPSubscribeDialogAssoc::ConnectionLost  ) 
 
void CSIPSubscribeDialogAssoc::DeletingRefresh CSIPRefresh aRefresh,
TUint32  aRefreshId
[virtual]
 

Reimplemented from CSIPDialogAssocBase.

CSIPClientTransaction* CSIPSubscribeDialogAssoc::DoSendSubscribeL CSIPMessageElements aElements,
CSIPRefresh aRefresh,
TBool  aWithinDialog
 
CSIPClientTransaction* CSIPSubscribeDialogAssoc::DoSendUnsubscribeL CSIPMessageElements aElements  ) 
 
IMPORT_C const CSIPEventHeader& CSIPSubscribeDialogAssoc::Event  )  const
 

Gets an event to which the subscription is done.

Returns:
an event
CSIPRefresh* CSIPSubscribeDialogAssoc::FindRefresh TUint32  aRefreshId  )  [virtual]
 

Searches for a refresh with the matching id.

Default implementation returns NULL. Those classes derived from CSIPDialogAssocBase, which can contain refreshes must implement this function for searching the correct refresh.

Returns:
CSIPRefresh if found, NULL otherwise. Ownership is not transferred

Reimplemented from CSIPDialogAssocBase.

static IMPORT_C CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewL CSIPConnection aConnection,
CUri8 *  aRemoteUri,
const MSIPRegistrationContext aContext,
CSIPEventHeader aEvent,
CSIPFromHeader aFrom = 0,
CSIPToHeader aTo = 0,
CSIPContactHeader aContact = 0
[static]
 

Two-phased constructor.

Precondition:
aRemoteUri != 0

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

aContext.IsContextActive()==ETrue

Parameters:
aConnection a SIP connection to be used with dialog association
aRemoteUri a remote target URI that identifies a resource that the request is targeted to.
aContext used for selecting outbound proxy and originator's address (AOR) and contact
aEvent an event to subscribe to; the ownership is transferred
aFrom originator's address. If not defined it will be constructed using registration context (User's AOR); the ownership is transfered
aTo logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
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
Returns:
New object; the ownership is transferred.
Leave:
KErrArgument if aRemoteUri == 0 or aEvent == 0
Leave:
KErrSIPInvalidRegistrationState if aContext.IsContextActive()==EFalse
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
static IMPORT_C CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewL CSIPConnection aConnection,
CSIPFromHeader aFrom,
CUri8 *  aRemoteUri,
CSIPEventHeader aEvent,
CSIPToHeader aTo = 0,
CSIPContactHeader aContact = 0
[static]
 

Two-phased constructor.

Precondition:
aFrom != 0

aRemoteUri != 0

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

Parameters:
aConnection a SIP connection to be used with dialog association
aFrom originator's address; the ownership is transfered
aRemoteUri a remote target URI that identifies a resource that the request is addressed to.
aEvent an event to subscribe to; the ownership is transferred
aTo logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
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
Returns:
New object; the ownership is transferred.
Leave:
KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
static IMPORT_C CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewL CSIPDialog aDialog,
CSIPEventHeader aEvent
[static]
 

Two-phased constructor.

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

Precondition:
aEvent != 0
Parameters:
aDialog a dialog to be associated with
aEvent an event to subscribe to; the ownership is transferred
Returns:
New object; the ownership is transferred
Leave:
KErrArgument if aEvent == 0
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
static CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewLC CSIPConnection aConnection,
CUri8 *  aRemoteUri,
CSIPEventHeader aEvent,
CSIPFromHeader aFrom,
CSIPToHeader aTo,
CSIPContactHeader aContact,
const MSIPRegistrationContext aContext
[static]
 
static IMPORT_C CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewLC CSIPConnection aConnection,
CUri8 *  aRemoteUri,
const MSIPRegistrationContext aContext,
CSIPEventHeader aEvent,
CSIPFromHeader aFrom = 0,
CSIPToHeader aTo = 0,
CSIPContactHeader aContact = 0
[static]
 

Two-phased constructor.

Precondition:
aRemoteUri != 0

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

aContext.IsContextActive()==ETrue

Parameters:
aConnection a SIP connection to be used with dialog association
aRemoteUri a remote target URI that identifies a resource that the request is targeted to.
aContext used for selecting outbound proxy and originator's address (AOR) and contact
aEvent an event to subscribe to; the ownership is transferred
aFrom originator's address. If not defined it will be constructed using registration context (User's AOR); the ownership is transfered
aTo logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
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
Returns:
New object; the ownership is transferred.
Leave:
KErrArgument if aRemoteUri == 0 or aEvent == 0
Leave:
KErrSIPInvalidRegistrationState if aContext.IsContextActive()==EFalse
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
static IMPORT_C CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewLC CSIPConnection aConnection,
CSIPFromHeader aFrom,
CUri8 *  aRemoteUri,
CSIPEventHeader aEvent,
CSIPToHeader aTo = 0,
CSIPContactHeader aContact = 0
[static]
 

Two-phased constructor.

Precondition:
aFrom != 0

aRemoteUri != 0

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

Parameters:
aConnection a SIP connection to be used with dialog association
aFrom originator's address; the ownership is transfered
aRemoteUri a remote target URI that identifies a resource that the request is addressed to.
aEvent an event to subscribe to; the ownership is transferred
aTo logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
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
Returns:
New object; the ownership is transferred.
Leave:
KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
static IMPORT_C CSIPSubscribeDialogAssoc* CSIPSubscribeDialogAssoc::NewLC CSIPDialog aDialog,
CSIPEventHeader aEvent
[static]
 

Two-phased constructor.

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

Parameters:
aDialog a dialog to be associated with
aEvent an event to subscribe to; the ownership is transferred
Returns:
New object, ownership is transferred
Leave:
KErrArgument if aEvent == 0
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted
IMPORT_C CSIPClientTransaction* CSIPSubscribeDialogAssoc::SendSubscribeL CSIPMessageElements aElements = 0,
CSIPRefresh aRefresh = 0
 

Creates SUBSCRIBE and sends it to the remote target.

101-199 or 2xx response to SUBSCRIBE will create a dialog association in case of the first SUBSCRIBE request within this dialog. Client must not provide Event-header in the optional message headers.

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

Dialog().State()==CSIPDialogEInit || Dialog().State()==CSIPDialogEConfirmed

Parameters:
aElements optional SIP message headers and body. Ownership is transferred.
aRefresh if set the transaction will be refreshed at given interval. Interval must be defined by including Expires-header. Ownership is transferred.
Returns:
SUBSCRIBE SIP transaction. Ownership is transferred.
Leave:
KErrSIPInvalidDialogState if Dialog().State() is incorrect NetworkServices
IMPORT_C CSIPClientTransaction* CSIPSubscribeDialogAssoc::SendUnsubscribeL CSIPMessageElements aElements = 0  ) 
 

Creates (un)SUBSCRIBE and sends it to the remote target.

Possible associated refresh will be terminated as well. Client must not provide Event-header in the optional message headers.

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

Dialog().State()==CSIPDialogEConfirmed

Parameters:
aElements optional SIP message headers and body. Ownership is transferred.
Returns:
SUBSCRIBE SIP transaction. Ownership is transferred.
Leave:
KErrSIPInvalidDialogState if Dialog().State() is incorrect NetworkServices
IMPORT_C const CSIPRefresh* CSIPSubscribeDialogAssoc::SIPRefresh  )  const
 

Gets associated refresh in case the user has requested the refresh of the SIP subscription.

Note that refreshed SUBSCRIBE dialog association cannot be terminated nor updated using the returned object.

Returns:
Associated refresh or 0 pointer if the user has not requested a refresh. Ownership is not transferred.
IMPORT_C CSIPClientTransaction* CSIPSubscribeDialogAssoc::UpdateL CSIPMessageElements aElements  ) 
 

Updates the subscription.

Note that update can be done when 2xx response is received to the initial SUBSCRIBE or to update. Client must not provide Event-header in the optional message headers.

Precondition:
aElements != 0

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

Parameters:
aElements contains user SIP headers and content; the ownership is transferred
Returns:
SUBSCRIBE SIP client transaction; the ownership is transferred
Leave:
KErrArgument if aElements == 0 or aElements contain Event-header
Leave:
KErrSIPInvalidDialogState if Dialog().State() is incorrect NetworkServices

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top