CSIPSubscribeDialogAssoc Class Reference

#include <mw/sipsubscribedialogassoc.h>

Link against: sipclient.lib

class CSIPSubscribeDialogAssoc : public CSIPDialogAssocBase

Inherits from

Public Member Functions
~CSIPSubscribeDialogAssoc()
voidConnectionLost()
virtual voidDeletingRefresh(CSIPRefresh &, TUint32)
CSIPClientTransaction *DoSendSubscribeL(CSIPMessageElements *, CSIPRefresh *, TBool)
CSIPClientTransaction *DoSendUnsubscribeL(CSIPMessageElements *)
IMPORT_C const CSIPEventHeader &Event()
virtual 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 *)
Inherited Attributes
CSIPDialogAssocBase::iImplementation
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()

Detailed Description

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

Constructor & Destructor Documentation

~CSIPSubscribeDialogAssoc ( )

IMPORT_C~CSIPSubscribeDialogAssoc()

Destructor

Member Function Documentation

ConnectionLost ( )

voidConnectionLost()

DeletingRefresh ( CSIPRefresh &, TUint32 )

voidDeletingRefresh(CSIPRefresh &aRefresh,
TUint32aRefreshId
)[virtual]

DoSendSubscribeL ( CSIPMessageElements *, CSIPRefresh *, TBool )

CSIPClientTransaction *DoSendSubscribeL(CSIPMessageElements *aElements,
CSIPRefresh *aRefresh,
TBoolaWithinDialog
)

DoSendUnsubscribeL ( CSIPMessageElements * )

CSIPClientTransaction *DoSendUnsubscribeL(CSIPMessageElements *aElements)

Event ( )

IMPORT_C const CSIPEventHeader &Event()const

Gets an event to which the subscription is done

Returns: an event

FindRefresh ( TUint32 )

CSIPRefresh *FindRefresh(TUint32aRefreshId)[virtual]

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
ParameterDescription
aDialoga dialog to be associated with
aEventan event to subscribe to; the ownership is transferred

Returns: New object; 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
ParameterDescription
aConnectiona SIP connection to be used with dialog association
aFromoriginator's address; the ownership is transfered
aRemoteUria remote target URI that identifies a resource that the request is addressed to.
aEventan event to subscribe to; the ownership is transferred
aTological recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
aContacta 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.

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
ParameterDescription
aConnectiona SIP connection to be used with dialog association
aRemoteUria remote target URI that identifies a resource that the request is targeted to.
aContextused for selecting outbound proxy and originator's address (AOR) and contact
aEventan event to subscribe to; the ownership is transferred
aFromoriginator's address. If not defined it will be constructed using registration context (User's AOR); the ownership is transfered
aTological recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
aContacta 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.

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
ParameterDescription
aDialoga dialog to be associated with
aEventan event to subscribe to; the ownership is transferred

Returns: New object, 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
ParameterDescription
aConnectiona SIP connection to be used with dialog association
aFromoriginator's address; the ownership is transfered
aRemoteUria remote target URI that identifies a resource that the request is addressed to.
aEventan event to subscribe to; the ownership is transferred
aTological recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
aContacta 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.

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
ParameterDescription
aConnectiona SIP connection to be used with dialog association
aRemoteUria remote target URI that identifies a resource that the request is targeted to.
aContextused for selecting outbound proxy and originator's address (AOR) and contact
aEventan event to subscribe to; the ownership is transferred
aFromoriginator's address. If not defined it will be constructed using registration context (User's AOR); the ownership is transfered
aTological recipient's address; if not defined the remote target uri will be used for To-header construction; the ownership is transfered
aContacta 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.

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]

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.

Returns: Associated refresh or 0 pointer if the user has not requested a refresh. Ownership is not transferred.

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
ParameterDescription
aElementsoptional SIP message headers and body. Ownership is transferred.
aRefreshif 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.

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
ParameterDescription
aElementsoptional SIP message headers and body. Ownership is transferred.

Returns: SUBSCRIBE SIP transaction. 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
ParameterDescription
aElementscontains user SIP headers and content; the ownership is transferred

Returns: SUBSCRIBE SIP client transaction; the ownership is transferred