CSIPSubscribeDialogAssoc Class Reference

class CSIPSubscribeDialogAssoc : public CSIPDialogAssocBase

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

sipclient.lib

Inherits from

Public Member Functions
~CSIPSubscribeDialogAssoc ()
void ConnectionLost ()
void DeletingRefresh ( CSIPRefresh &, TUint32 )
CSIPClientTransaction * DoSendSubscribeL ( CSIPMessageElements *, CSIPRefresh *, TBool )
CSIPClientTransaction * DoSendUnsubscribeL ( CSIPMessageElements *)
IMPORT_C const CSIPEventHeader & Event ()
CSIPRefresh * FindRefresh ( TUint32 )
IMPORT_C CSIPSubscribeDialogAssoc * NewL ( CSIPDialog &, CSIPEventHeader *)
IMPORT_C CSIPSubscribeDialogAssoc * NewL ( CSIPConnection &, CSIPFromHeader *, CUri8 *, CSIPEventHeader *, CSIPToHeader *, CSIPContactHeader *)
IMPORT_C CSIPSubscribeDialogAssoc * NewL ( CSIPConnection &, CUri8 *, const MSIPRegistrationContext &, CSIPEventHeader *, CSIPFromHeader *, CSIPToHeader *, CSIPContactHeader *)
IMPORT_C CSIPSubscribeDialogAssoc * NewLC ( CSIPDialog &, CSIPEventHeader *)
IMPORT_C CSIPSubscribeDialogAssoc * NewLC ( CSIPConnection &, CSIPFromHeader *, CUri8 *, CSIPEventHeader *, CSIPToHeader *, CSIPContactHeader *)
IMPORT_C CSIPSubscribeDialogAssoc * NewLC ( CSIPConnection &, CUri8 *, const MSIPRegistrationContext &, CSIPEventHeader *, CSIPFromHeader *, CSIPToHeader *, CSIPContactHeader *)
CSIPSubscribeDialogAssoc * NewLC ( CSIPConnection &, CUri8 *, CSIPEventHeader *, CSIPFromHeader *, CSIPToHeader *, CSIPContactHeader *, const MSIPRegistrationContext *)
IMPORT_C const CSIPRefresh * SIPRefresh ()
IMPORT_C CSIPClientTransaction * SendSubscribeL ( CSIPMessageElements *, CSIPRefresh *)
IMPORT_C CSIPClientTransaction * SendUnsubscribeL ( CSIPMessageElements *)
IMPORT_C CSIPClientTransaction * UpdateL ( CSIPMessageElements *)
Private Member Functions
CSIPSubscribeDialogAssoc ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CSIPDialogAssocBase::CSIPDialogAssocBase()
CSIPDialogAssocBase::ConstructL(RStringF,CSIPDialog &)
CSIPDialogAssocBase::ConstructL(RStringF,CSIPDialog &,CSIPServerTransaction &)
CSIPDialogAssocBase::Dialog()
CSIPDialogAssocBase::Dialog()const
CSIPDialogAssocBase::Implementation()
CSIPDialogAssocBase::IsNonTargetRefreshRequest(RStringF)const
CSIPDialogAssocBase::SendNonTargetRefreshRequestL(RStringF,CSIPMessageElements *)
CSIPDialogAssocBase::Type()const
CSIPDialogAssocBase::~CSIPDialogAssocBase()
Private Attributes
CSIPEventHeader * iEvent
CSIPRefresh * iRefresh
Inherited Attributes
CSIPDialogAssocBase::iImplementation

Constructor & Destructor Documentation

CSIPSubscribeDialogAssoc()

CSIPSubscribeDialogAssoc ( ) [private]

~CSIPSubscribeDialogAssoc()

IMPORT_C ~CSIPSubscribeDialogAssoc ( )

Destructor

Member Functions Documentation

ConnectionLost()

void ConnectionLost ( )

DeletingRefresh(CSIPRefresh &, TUint32)

void DeletingRefresh ( CSIPRefresh & aRefresh,
TUint32 aRefreshId
) [virtual]

Parameters

CSIPRefresh & aRefresh
TUint32 aRefreshId

DoSendSubscribeL(CSIPMessageElements *, CSIPRefresh *, TBool)

CSIPClientTransaction * DoSendSubscribeL ( CSIPMessageElements * aElements,
CSIPRefresh * aRefresh,
TBool aWithinDialog
)

Parameters

CSIPMessageElements * aElements
CSIPRefresh * aRefresh
TBool aWithinDialog

DoSendUnsubscribeL(CSIPMessageElements *)

CSIPClientTransaction * DoSendUnsubscribeL ( CSIPMessageElements * aElements )

Parameters

CSIPMessageElements * aElements

Event()

IMPORT_C const CSIPEventHeader & Event ( ) const

Gets an event to which the subscription is done

FindRefresh(TUint32)

CSIPRefresh * FindRefresh ( TUint32 aRefreshId ) [virtual]

Parameters

TUint32 aRefreshId

NewL(CSIPDialog &, CSIPEventHeader *)

IMPORT_C 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.
Pre-condition
aEvent != 0
leave
KErrArgument if aEvent == 0
leave
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted

Parameters

CSIPDialog & aDialog a dialog to be associated with
CSIPEventHeader * aEvent an event to subscribe to; the ownership is transferred

NewL(CSIPConnection &, CSIPFromHeader *, CUri8 *, CSIPEventHeader *, CSIPToHeader *, CSIPContactHeader *)

IMPORT_C CSIPSubscribeDialogAssoc * NewL ( CSIPConnection & aConnection,
CSIPFromHeader * aFrom,
CUri8 * aRemoteUri,
CSIPEventHeader * aEvent,
CSIPToHeader * aTo = 0,
CSIPContactHeader * aContact = 0
) [static]
Two-phased constructor
Pre-condition
aFrom != 0
aRemoteUri != 0
aEvent != 0 The user of the class must not define tags in From-header and To-header.
leave
KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0
leave
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted

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.
CSIPEventHeader * aEvent an event to subscribe to; the ownership is transferred
CSIPToHeader * aTo = 0 logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
CSIPContactHeader * aContact = 0 a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

NewL(CSIPConnection &, CUri8 *, const MSIPRegistrationContext &, CSIPEventHeader *, CSIPFromHeader *, CSIPToHeader *, CSIPContactHeader *)

IMPORT_C CSIPSubscribeDialogAssoc * NewL ( CSIPConnection & aConnection,
CUri8 * aRemoteUri,
const MSIPRegistrationContext & aContext,
CSIPEventHeader * aEvent,
CSIPFromHeader * aFrom = 0,
CSIPToHeader * aTo = 0,
CSIPContactHeader * aContact = 0
) [static]
Two-phased constructor
Pre-condition
aRemoteUri != 0
aEvent != 0 The user of the class must not define tags in From-header and To-header.
aContext.IsContextActive()==ETrue
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

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
CSIPEventHeader * aEvent an event to subscribe to; the ownership is transferred
CSIPFromHeader * aFrom = 0 originator's address. If not defined it will be constructed using registration context (User's AOR); the ownership is transfered
CSIPToHeader * aTo = 0 logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
CSIPContactHeader * aContact = 0 a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

NewLC(CSIPDialog &, CSIPEventHeader *)

IMPORT_C 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.
leave
KErrArgument if aEvent == 0
leave
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted

Parameters

CSIPDialog & aDialog a dialog to be associated with
CSIPEventHeader * aEvent an event to subscribe to; the ownership is transferred

NewLC(CSIPConnection &, CSIPFromHeader *, CUri8 *, CSIPEventHeader *, CSIPToHeader *, CSIPContactHeader *)

IMPORT_C CSIPSubscribeDialogAssoc * NewLC ( CSIPConnection & aConnection,
CSIPFromHeader * aFrom,
CUri8 * aRemoteUri,
CSIPEventHeader * aEvent,
CSIPToHeader * aTo = 0,
CSIPContactHeader * aContact = 0
) [static]
Two-phased constructor
Pre-condition
aFrom != 0
aRemoteUri != 0
aEvent != 0 The user of the class must not define tags in From-header and To-header.
leave
KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0
leave
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted

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.
CSIPEventHeader * aEvent an event to subscribe to; the ownership is transferred
CSIPToHeader * aTo = 0 logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
CSIPContactHeader * aContact = 0 a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

NewLC(CSIPConnection &, CUri8 *, const MSIPRegistrationContext &, CSIPEventHeader *, CSIPFromHeader *, CSIPToHeader *, CSIPContactHeader *)

IMPORT_C CSIPSubscribeDialogAssoc * NewLC ( CSIPConnection & aConnection,
CUri8 * aRemoteUri,
const MSIPRegistrationContext & aContext,
CSIPEventHeader * aEvent,
CSIPFromHeader * aFrom = 0,
CSIPToHeader * aTo = 0,
CSIPContactHeader * aContact = 0
) [static]
Two-phased constructor
Pre-condition
aRemoteUri != 0
aEvent != 0 The user of the class must not define tags in From-header and To-header.
aContext.IsContextActive()==ETrue
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

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
CSIPEventHeader * aEvent an event to subscribe to; the ownership is transferred
CSIPFromHeader * aFrom = 0 originator's address. If not defined it will be constructed using registration context (User's AOR); the ownership is transfered
CSIPToHeader * aTo = 0 logical recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
CSIPContactHeader * aContact = 0 a contact to be used in dialog creation. Must be given only if user intends to re-direct future requests; the ownership is transfered

NewLC(CSIPConnection &, CUri8 *, CSIPEventHeader *, CSIPFromHeader *, CSIPToHeader *, CSIPContactHeader *, const MSIPRegistrationContext *)

CSIPSubscribeDialogAssoc * NewLC ( CSIPConnection & aConnection,
CUri8 * aRemoteUri,
CSIPEventHeader * aEvent,
CSIPFromHeader * aFrom,
CSIPToHeader * aTo,
CSIPContactHeader * aContact,
const MSIPRegistrationContext * aContext
) [static]

Parameters

CSIPConnection & aConnection
CUri8 * aRemoteUri
CSIPEventHeader * aEvent
CSIPFromHeader * aFrom
CSIPToHeader * aTo
CSIPContactHeader * aContact
const MSIPRegistrationContext * aContext

SIPRefresh()

IMPORT_C const CSIPRefresh * 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.

SendSubscribeL(CSIPMessageElements *, CSIPRefresh *)

IMPORT_C CSIPClientTransaction * 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.

Pre-condition
Dialog() .Connection().State()==EActive
Dialog() .State()==CSIPDialogEInit || Dialog() .State()==CSIPDialogEConfirmed
leave
KErrSIPInvalidDialogState if Dialog() .State() is incorrect
capability
NetworkServices

Parameters

CSIPMessageElements * aElements = 0 optional SIP message headers and body. Ownership is transferred.
CSIPRefresh * aRefresh = 0 if set the transaction will be refreshed at given interval. Interval must be defined by including Expires-header. Ownership is transferred.

SendUnsubscribeL(CSIPMessageElements *)

IMPORT_C CSIPClientTransaction * 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.
Pre-condition
Dialog() .Connection().State()==EActive
Dialog() .State()==CSIPDialogEConfirmed
leave
KErrSIPInvalidDialogState if Dialog() .State() is incorrect
capability
NetworkServices

Parameters

CSIPMessageElements * aElements = 0 optional SIP message headers and body. Ownership is transferred.

UpdateL(CSIPMessageElements *)

IMPORT_C CSIPClientTransaction * 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.
Pre-condition
aElements != 0
Dialog() .Connection().State()==EActive Dialog() .State()==CSIPDialogEConfirmed
leave
KErrArgument if aElements == 0 or aElements contain Event-header
leave
KErrSIPInvalidDialogState if Dialog() .State() is incorrect
capability
NetworkServices

Parameters

CSIPMessageElements * aElements contains user SIP headers and content; the ownership is transferred

Member Data Documentation

CSIPEventHeader * iEvent

CSIPEventHeader * iEvent [private]

CSIPRefresh * iRefresh

CSIPRefresh * iRefresh [private]