CSIPClientConnection Class Reference

class CSIPClientConnection : public CBase

Class provides functions for sending and receiving SIP requests and SIP responses. This class also provides functions for creating and destroying SIP dialogs, sending and receiving SIP requests and responses within SIP dialogs, canceling the SIP requests.

All SIP messages will be sent/received using connection (defined using IAP Id) given by the user.

If the preconditions or postconditions are not met the function will leave with KErrArgument error code.

Inherits from

Public Member Functions
~CSIPClientConnection ()
CSIPFromHeader * AorL ( TUint32 )
CSIPCallIDHeader * CallIDL ( TUint32 )
TInt ConnectionErrorL ()
CSIPContactHeader * ContactL ( TUint32 )
void DetachClient ()
void FetchRegistrationsL (const CSIPRequestElements &, TUint32 &)
void GetLocalAddrL ( TInetAddr &)
TUint32 IapId ()
RStringF LocalTagL ( TUint32 )
CSIPClientConnection * NewL ( CSIPClient &, MSIPClientConnectionObserver &, TUint32 )
CSIPClientConnection * NewLC ( CSIPClient &, MSIPClientConnectionObserver &, TUint32 )
CSIPRouteHeader * OutboundProxyL ( TUint32 )
void RefreshConnection ()
TUint RefreshIntervalL ( TUint32 )
TInt RemoveOutboundProxy ( TUint32 )
TInt ResetDialogState ( TUint32 )
void SendAckL ( TUint32 , TUint32 , const CSIPMessageElements *)
void SendCancelL ( TUint32 , TUint32 &)
void SendRegisterL ( TUint32 &, const CSIPToHeader &, const CSIPFromHeader &, const CSIPMessageElements &, const CUri8 *, const CSIPRouteHeader *, TBool , TBool , TBool )
void SendRequestAndCreateDialogL ( TUint32 &, TUint32 &, TUint32 &, RStringF , const CUri8 &, const CSIPFromHeader *, const CSIPMessageElements *, const CSIPToHeader *, TUint32 , TBool )
void SendRequestAndTerminateRefreshL ( TUint32 , TUint32 &, const CSIPMessageElements *)
void SendRequestAndUpdateRefreshL ( TUint32 , TUint32 &, const CSIPMessageElements *)
void SendRequestL (const CSIPRequestElements &, TUint32 &, TUint32 , TBool )
void SendRequestWithinDialogL ( TUint32 , TUint32 &, TUint32 &, RStringF , const CSIPMessageElements *, TBool , TBool )
void SendRequestWithinDialogL ( TUint32 , TUint32 , TUint32 &, const CSIPMessageElements *)
void SendResponseAndCreateDialogL (const CSIPResponseElements &, TUint32 , TUint32 &, TUint32 )
void SendResponseL (const CSIPResponseElements &, TUint32 )
void SendResponseWithinDialogL (const CSIPResponseElements &, TUint32 , TUint32 , TBool )
void SetOptL ( TUint , TUint , const TDesC8 &)
void SetOptL ( TUint , TUint , TInt )
void SetOutboundProxyL ( TUint32 , const CSIPRouteHeader &)
void SetRefreshIntervalL ( TUint32 , TUint )
CSIPConnection::TState State ()
TInt TerminateDialog ( TUint32 )
TInt TerminateDialogRefresh ( TUint32 , TUint32 )
TInt TerminateRefresh ( TUint32 )
TInt TerminateRegistration ( TUint32 )
void UnregisterL ( TUint32 , TUint32 &, const CSIPMessageElements *)
void UpdateRegistrationL ( TUint32 , TUint32 &, const CSIPMessageElements *)
Private Member Functions
CSIPClientConnection ( CSIPClient &, MSIPClientConnectionObserver &, TUint32 )
void CheckContactExpiresL (const CSIPMessageElements &)
void CheckContactL (const CSIPMessageElements *)
void CheckContactL (const CSIPMessageElements &)
void CheckDialogCreationRequestL (const CSIPToHeader *, const CSIPFromHeader *, const CSIPMessageElements *, TUint32 , TBool )
void CheckExpiresHeaderL (const CSIPMessageElements *, TBool )
void CheckExpiresHeaderL (const CSIPMessageElements &, TBool )
void ConstructL ()
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()
Private Attributes
TBool iAdded
CSIPClient & iClient
RSIPConnection * iConnection
RStringF iContactHeaderName
RStringF iExpiresHeaderName
TUint32 iIapId
MSIPClientConnectionObserver & iObserver
CSIPClientConnectionReceiver * iReceiver
CSIPITCSender * iSender
RStringF iTag

Constructor & Destructor Documentation

CSIPClientConnection(CSIPClient &, MSIPClientConnectionObserver &, TUint32)

CSIPClientConnection ( CSIPClient & aClient,
MSIPClientConnectionObserver & aObserver,
TUint32 aIapId
) [private]

Parameters

CSIPClient & aClient
MSIPClientConnectionObserver & aObserver
TUint32 aIapId

~CSIPClientConnection()

~CSIPClientConnection ( )

Destructor

Member Functions Documentation

AorL(TUint32)

CSIPFromHeader * AorL ( TUint32 aRegistrationId )

Gets the AOR for a given registration id. Leaves on failure with a system wide or a SIP stack specific error code.

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response to an earlier REGISTER request. This value is used to identify the binding for which the AOR is to be fetched.

CallIDL(TUint32)

CSIPCallIDHeader * CallIDL ( TUint32 aDialogId )

Gets the Call-ID for a given dialog id. Leaves on failure with a system wide or a SIP stack specific error code.

Parameters

TUint32 aDialogId a dialog id

CheckContactExpiresL(const CSIPMessageElements &)

void CheckContactExpiresL ( const CSIPMessageElements & aElements ) const [private]

Parameters

const CSIPMessageElements & aElements

CheckContactL(const CSIPMessageElements *)

void CheckContactL ( const CSIPMessageElements * aElements ) const [private]

Parameters

const CSIPMessageElements * aElements

CheckContactL(const CSIPMessageElements &)

void CheckContactL ( const CSIPMessageElements & aElements ) const [private]

Parameters

const CSIPMessageElements & aElements

CheckDialogCreationRequestL(const CSIPToHeader *, const CSIPFromHeader *, const CSIPMessageElements *, TUint32, TBool)

void CheckDialogCreationRequestL ( const CSIPToHeader * aTo,
const CSIPFromHeader * aFrom,
const CSIPMessageElements * aElements,
TUint32 aRegistrationId,
TBool aRefresh = EFalse
) [private]

Parameters

const CSIPToHeader * aTo
const CSIPFromHeader * aFrom
const CSIPMessageElements * aElements
TUint32 aRegistrationId
TBool aRefresh = EFalse

CheckExpiresHeaderL(const CSIPMessageElements *, TBool)

void CheckExpiresHeaderL ( const CSIPMessageElements * aElements,
TBool aZeroAllowed = EFalse
) const [private]

Parameters

const CSIPMessageElements * aElements
TBool aZeroAllowed = EFalse

CheckExpiresHeaderL(const CSIPMessageElements &, TBool)

void CheckExpiresHeaderL ( const CSIPMessageElements & aElements,
TBool aZeroAllowed = EFalse
) const [private]

Parameters

const CSIPMessageElements & aElements
TBool aZeroAllowed = EFalse

ConnectionErrorL()

TInt ConnectionErrorL ( ) const

Returns the connection error code

ConstructL()

void ConstructL ( ) [private]

ContactL(TUint32)

CSIPContactHeader * ContactL ( TUint32 aRegistrationId )

Gets the Contact-header that has been registered with the given registration id.

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response to an earlier REGISTER request. This value is used to identify the binding for which the Contact-header is to be fetched.

DetachClient()

void DetachClient ( )

Clear the link from CSIPClientConnection to CSIPClient .

FetchRegistrationsL(const CSIPRequestElements &, TUint32 &)

void FetchRegistrationsL ( const CSIPRequestElements & aElements,
TUint32 & aRequestId
)

Creates SIP REGISTER request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. User must NOT set any expires values to the request (aMessageOptionalElements).

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
!aElements.RemoteURI()->HasUser()
aElements.ToHeader().SIPAddress().URI().HasUser()
"Contact-headers".Count() == 0

Parameters

const CSIPRequestElements & aElements contains remote address and optionally SIP message headers and body.
TUint32 & aRequestId the returned request Id, to be used to match a response to this request.

GetLocalAddrL(TInetAddr &)

void GetLocalAddrL ( TInetAddr & aAddr ) const
Gets the local IP address used for this CSIPClientConnection when sending SIP messages to the network.
Pre-condition
State() == EActive
leave
A system-wide error codes

Parameters

TInetAddr & aAddr local IP for this CSIPClientConnection.

IapId()

TUint32 IapId ( ) const

Gets the IAP id of this connection

LocalTagL(TUint32)

RStringF LocalTagL ( TUint32 aDialogId )

Gets the local tag for a given dialog id. Leaves on failure with a system wide or a SIP stack specific error code.

Parameters

TUint32 aDialogId a dialog id

NewL(CSIPClient &, MSIPClientConnectionObserver &, TUint32)

CSIPClientConnection * NewL ( CSIPClient & aClient,
MSIPClientConnectionObserver & aObserver,
TUint32 aIapId
) [static]

Constructs an instance of CSIPClientConnection The connection using IAP-Id is initialized during construction.

Parameters

CSIPClient & aClient a handle to SIP server session
MSIPClientConnectionObserver & aObserver an observer for receiving notifications
TUint32 aIapId IAP Id that will be used for the connection.

NewLC(CSIPClient &, MSIPClientConnectionObserver &, TUint32)

CSIPClientConnection * NewLC ( CSIPClient & aClient,
MSIPClientConnectionObserver & aObserver,
TUint32 aIapId
) [static]

Constructs an instance of CSIPClientConnection and adds a pointer to it to the CleanupStack The connection using IAP-Id is initialized during construction.

Parameters

CSIPClient & aClient a handle to SIP server session
MSIPClientConnectionObserver & aObserver an observer for receiving notifications
TUint32 aIapId IAP Id that will be used for the connection.

OutboundProxyL(TUint32)

CSIPRouteHeader * OutboundProxyL ( TUint32 aRegistrationId )

Gets the Outbound Proxy as set by any application for an AOR. Leaves on failure with a system wide or a SIP stack specific error code. Applications should retrieve this value first and examine if outbound proxy address, for the particular AOR, is suitable before sending SIP requests to the sip stack. If not suitable, the application may add a Route-header to the SIP Request in order to override this setting for that particular request.

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response to an earlier REGISTER request. This value is used to identify the binding for which the outbound proxy setting is to be fetched.

RefreshConnection()

void RefreshConnection ( ) const

Refreshes the connection

RefreshIntervalL(TUint32)

TUint RefreshIntervalL ( TUint32 aRefreshId )

Parameters

TUint32 aRefreshId

RemoveOutboundProxy(TUint32)

TInt RemoveOutboundProxy ( TUint32 aRegistrationId )

Removes the outbound proxy which was used for the particular AOR.

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response to an earlier REGISTER request. This value is used to identify the binding for which the outbound proxy setting is to be removed.

ResetDialogState(TUint32)

TInt ResetDialogState ( TUint32 aDialogId )

Parameters

TUint32 aDialogId

SendAckL(TUint32, TUint32, const CSIPMessageElements *)

void SendAckL ( TUint32 aDialogId,
TUint32 aRequestId,
const CSIPMessageElements * aElements = 0
)

Creates SIP ACK request within a dialog and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code.

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
aElements.OptionalElements()->ContactHeaders().Count() == 0

Parameters

TUint32 aDialogId the value of the Dialog-Id that was returned in a response to an earlier INVITE, that created the dialog.
TUint32 aRequestId the value of the INVITE Request-Id.
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.

SendCancelL(TUint32, TUint32 &)

void SendCancelL ( TUint32 aInviteRequestId,
TUint32 & aCancelRequestId
)

Creates SIP CANCEL request for an existing INVITE request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code.

Parameters

TUint32 aInviteRequestId the id of the INVITE request to be cancelled.
TUint32 & aCancelRequestId the id to be created for the CANCEL request.

SendRegisterL(TUint32 &, const CSIPToHeader &, const CSIPFromHeader &, const CSIPMessageElements &, const CUri8 *, const CSIPRouteHeader *, TBool, TBool, TBool)

void SendRegisterL ( TUint32 & aRequestId,
const CSIPToHeader & aTo,
const CSIPFromHeader & aFrom,
const CSIPMessageElements & aElements,
const CUri8 * aRemoteUri = 0,
const CSIPRouteHeader * aOutboundProxy = 0,
TBool aRefresh = EFalse,
TBool aSendWithExpires = ETrue,
TBool aCacheOutboundProxyIP = EFalse
)

Creates SIP REGISTER request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code This function call creates a registration binding. The Registration-Id for this REGISTER is returned with a future 2xx response received for this REGISTER. A 2xx response to this REGISTER creates a binding. There MUST NOT be more than one Contact-header and it MUST NOT be set to STAR.

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
aTo.SIPAddress().URI().HasUser()
!aTo.HasTag()
!aFrom.HasTag()
aRemoteUri->IsSIPURI()

Parameters

TUint32 & aRequestId the returned request Id, to be used to match a response to this request.
const CSIPToHeader & aTo a From-header
const CSIPFromHeader & aFrom
const CSIPMessageElements & aElements contains optional SIP message headers and body.
const CUri8 * aRemoteUri = 0 a remote-URI. The ownership is NOT transferred.
const CSIPRouteHeader * aOutboundProxy = 0 the outbound proxy address. The ownership is NOT transferred.
TBool aRefresh = EFalse refresh flag. Refreshing of this REGISTER is requested from the SIP Stack by setting this flag to ETrue.
TBool aSendWithExpires = ETrue when set to EFalse REGISTER message is sent without expires value
TBool aCacheOutboundProxyIP = EFalse when set to ETrue outbound proxy IP of REGISTER message is cached in registration context

SendRequestAndCreateDialogL(TUint32 &, TUint32 &, TUint32 &, RStringF, const CUri8 &, const CSIPFromHeader *, const CSIPMessageElements *, const CSIPToHeader *, TUint32, TBool)

void SendRequestAndCreateDialogL ( TUint32 & aRequestId,
TUint32 & aRefreshId,
TUint32 & aDialogId,
RStringF aMethod,
const CUri8 & aRemoteUri,
const CSIPFromHeader * aFrom,
const CSIPMessageElements * aElements = 0,
const CSIPToHeader * aTo = 0,
TUint32 aRegistrationId = 0,
TBool aRefresh = EFalse
)

Creates a SIP request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. The Dialog-Id for this request is returned with a future 2xx response received for this request. This provokes the Non-invite state machine The registration Id is used to select the outbound proxy. There MUST NOT be more than one Contact-header and it MUST NOT be set to STAR.

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
aMethod.Length() > 0
aMethod != "REGISTER" | "OPTIONS" | "BYE" | "CANCEL" | "ACK" | "NOTIFY" | "MESSAGE" | "PRACK" | "UPDATE"
aRemoteUri->IsSIPURI()
!aTo->HasTag()
!aFrom.HasTag()

Parameters

TUint32 & aRequestId the returned request Id, to be used to match a response to this request.
TUint32 & aRefreshId if the request is refresh, contains on return the id of the created refresh.
TUint32 & aDialogId the returned dialog Id of the establishing dialog
RStringF aMethod the method
const CUri8 & aRemoteUri a remote-URI.
const CSIPFromHeader * aFrom a From-header. If not given, aRegistrationId must be given, so that the stack can fill in the From-header based on it. The ownership is NOT transferred.
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.
const CSIPToHeader * aTo = 0 a To-header. The ownership is NOT transferred.
TUint32 aRegistrationId = 0 registration id for the sender's AOR
TBool aRefresh = EFalse refresh flag. Refreshing of this SIP request is requested from the SIP Stack by setting this flag to ETrue.

SendRequestAndTerminateRefreshL(TUint32, TUint32 &, const CSIPMessageElements *)

void SendRequestAndTerminateRefreshL ( TUint32 aRefreshId,
TUint32 & aNewRequestId,
const CSIPMessageElements * aElements = 0
)

Sends a SIP request and terminates the refresh after sending the request. The method and To- and From-headers from the original request will be used. Leaves on failure with a system wide or a SIP stack specific error code. Any SIP response (2xx - 6xx) to this request terminates a refresh.

Parameters

TUint32 aRefreshId the value of the refresh-Id that was returned in a response to an earlier request that created the refresh.
TUint32 & aNewRequestId the returned request Id, to be used to match a response to this request.
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.

SendRequestAndUpdateRefreshL(TUint32, TUint32 &, const CSIPMessageElements *)

void SendRequestAndUpdateRefreshL ( TUint32 aRefreshId,
TUint32 & aNewRequestId,
const CSIPMessageElements * aElements = 0
)
Sends a SIP request and updates an existing refresh. The method and To- and From-headers from the original request will be used. Leaves on failure with a system wide or a SIP stack specific error code.
Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .

Parameters

TUint32 aRefreshId the value of the refresh-Id that was returned in a response to an earlier request that created the refresh.
TUint32 & aNewRequestId the returned request Id, to be used to match a response to this request.
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.

SendRequestL(const CSIPRequestElements &, TUint32 &, TUint32, TBool)

void SendRequestL ( const CSIPRequestElements & aElements,
TUint32 & aRequestId,
TUint32 aRegistrationId = 0,
TBool aRefresh = EFalse
)

Creates SIP request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. Function returns an error if a SIP request with a known method as defined in preconditions is sent. This provokes the Non-invite state machine. The registration Id is used to select the outbound proxy.

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
aRequestElements.Method() != "REGISTER" | "OPTIONS" | "INVITE" | "BYE" | "CANCEL" | "ACK" | "SUBSCRIBE" | "NOTIFY" | "REFER" | "MESSAGE".

Parameters

const CSIPRequestElements & aElements contains local and remote addresses, optional SIP message headers and body.
TUint32 & aRequestId the returned request Id, to be used to match a response to this request.
TUint32 aRegistrationId = 0 registration id for the sender's AOR
TBool aRefresh = EFalse refresh flag. Refreshing of the SIP request is requested from the SIP Stack by setting this flag to ETrue.

SendRequestWithinDialogL(TUint32, TUint32 &, TUint32 &, RStringF, const CSIPMessageElements *, TBool, TBool)

void SendRequestWithinDialogL ( TUint32 aDialogId,
TUint32 & aNewRequestId,
TUint32 & aRefreshId,
RStringF aMethod,
const CSIPMessageElements * aElements = 0,
TBool aTargetRefresh = EFalse,
TBool aRefresh = EFalse
)

Creates a SIP request within a dialog and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. Contact header SHOULD NOT be created unless user intends to redirect the future requests within this dialog to a different remote target. Contact-header MUST NOT be set if aTargetRefresh flag is EFalse. This provokes the Non-invite state machine

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
aMethod.Length() > 0
aMethod != "REGISTER" | "CANCEL" | "ACK"

Parameters

TUint32 aDialogId the value of the Dialog-Id that was returned in a response to an earlier request that created the dialog.
TUint32 & aNewRequestId the returned request Id, to be used to match a response to this request.
TUint32 & aRefreshId if the request is refresh, contains on return the id of the created refresh.
RStringF aMethod the method of the request
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.
TBool aTargetRefresh = EFalse indicates if an unknown request is a target refresh request.
TBool aRefresh = EFalse refresh flag. Refreshing of this SIP request is requested from the SIP Stack by setting this flag to ETrue.

SendRequestWithinDialogL(TUint32, TUint32, TUint32 &, const CSIPMessageElements *)

void SendRequestWithinDialogL ( TUint32 aDialogId,
TUint32 aRefreshId,
TUint32 & aNewRequestId,
const CSIPMessageElements * aElements
)

Creates a SIP request within a dialog and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. Contact-header MUST NOT be set. pdates an existing refresh within a dialog. This function can also be used to terminate an existing refresh by setting the Expires-header's value to zero. Expires header is mandatory.

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
aMethod.Length() > 0

Parameters

TUint32 aDialogId the value of the Dialog-Id that was returned in a response to an earlier request that created the dialog.
TUint32 aRefreshId the value of the Refresh-Id that was returned in a response to an earlier request that created the refresh.
TUint32 & aNewRequestId the returned request Id, to be used to match a response to this request.
const CSIPMessageElements * aElements contains optional SIP message headers and body.

SendResponseAndCreateDialogL(const CSIPResponseElements &, TUint32, TUint32 &, TUint32)

void SendResponseAndCreateDialogL ( const CSIPResponseElements & aElements,
TUint32 aRequestId,
TUint32 & aDialogId,
TUint32 aRegistrationId
)

Creates SIP response and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. This response creates a dialog.

Parameters

const CSIPResponseElements & aElements contains Status Code, optional Reason Phrase and optional SIP message headers and body.
TUint32 aRequestId the value of the request id as returned by an earlier received request. This value is used to identify the request to which this response is for.
TUint32 & aDialogId a dialog id of the dialog that this response creates.
TUint32 aRegistrationId registration id

SendResponseL(const CSIPResponseElements &, TUint32)

void SendResponseL ( const CSIPResponseElements & aElements,
TUint32 aRequestId
)

Creates SIP response and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. This response does not create a dialog. This function MUST be used only if the request received had no Dialog-Id.

Parameters

const CSIPResponseElements & aElements contains Status Code, optional Reason Phrase and optional SIP message headers and body.
TUint32 aRequestId the value of the request id as returned by an earlier request. The value is used to identify the request to which this response is for.

SendResponseWithinDialogL(const CSIPResponseElements &, TUint32, TUint32, TBool)

void SendResponseWithinDialogL ( const CSIPResponseElements & aElements,
TUint32 aRequestId,
TUint32 aDialogId,
TBool aTargetRefresh = EFalse
)

Creates SIP response to a request that is within a dialog and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. Contact-header MUST NOT be set if aTargetRefresh flag is EFalse.

Parameters

const CSIPResponseElements & aElements contains Status Code, optional Reason Phrase and optional SIP message headers and body.
TUint32 aRequestId the value of the request id as returned by an earlier received request. This value identifies the request to which this response is for.
TUint32 aDialogId the value of the dialog id as returned by an earlier received response. This value identifies the dialog to which this response is for.
TBool aTargetRefresh = EFalse indicates if a received request sent within a dialog was a target refresh request.

SetOptL(TUint, TUint, const TDesC8 &)

void SetOptL ( TUint aOptionName,
TUint aOptionLevel,
const TDesC8 & aOption =  KNullDesC8
)
Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection .
Pre-condition
State() == EActive
leave
A system-wide error code

Parameters

TUint aOptionName An integer constant which identifies an option.
TUint aOptionLevel An integer constant which identifies level of an option.
const TDesC8 & aOption =  KNullDesC8 Option value packaged in a descriptor.

SetOptL(TUint, TUint, TInt)

void SetOptL ( TUint aOptionName,
TUint aOptionLevel,
TInt aOption
)
Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection .
Pre-condition
State() == EActive
leave
A system-wide error codes

Parameters

TUint aOptionName An integer constant which identifies an option.
TUint aOptionLevel An integer constant which identifies level of an option.
TInt aOption Option value as an integer.

SetOutboundProxyL(TUint32, const CSIPRouteHeader &)

void SetOutboundProxyL ( TUint32 aRegistrationId,
const CSIPRouteHeader & aOutboundProxy
)

Sets the Outbound Proxy for a registration binding.

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response to an earlier REGISTER request. This value is used to identify the binding for which the outbound proxy setting is to be set.
const CSIPRouteHeader & aOutboundProxy an outbound proxy.

SetRefreshIntervalL(TUint32, TUint)

void SetRefreshIntervalL ( TUint32 aRefreshId,
TUint aInterval
)

Parameters

TUint32 aRefreshId
TUint aInterval

State()

CSIPConnection::TState State ( ) const

Gets the current state of the connection

TerminateDialog(TUint32)

TInt TerminateDialog ( TUint32 aDialogId )

Terminates a dialog. This function can be used to terminate a dialog abnormally or when the dialog does not have any more associations (E.g. After receiving a final response to a BYE request).

Parameters

TUint32 aDialogId dialog id for the dialog to be terminated.

TerminateDialogRefresh(TUint32, TUint32)

TInt TerminateDialogRefresh ( TUint32 aDialogId,
TUint32 aRefreshId
)

Parameters

TUint32 aDialogId
TUint32 aRefreshId

TerminateRefresh(TUint32)

TInt TerminateRefresh ( TUint32 aRefreshId )

Terminates a refresh abnormally.

Parameters

TUint32 aRefreshId refresh id of the refresh to be terminated.

TerminateRegistration(TUint32)

TInt TerminateRegistration ( TUint32 aId )

Parameters

TUint32 aId

UnregisterL(TUint32, TUint32 &, const CSIPMessageElements *)

void UnregisterL ( TUint32 aRegistrationId,
TUint32 & aNewRequestId,
const CSIPMessageElements * aElements = 0
)

Creates SIP (un)REGISTER request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. User must NOT set any expires values in the SIP REGISTER request (aSIPMessageOptionalElements). Any SIP response (2xx - 6xx) to this request removes a binding.

Pre-condition
CSIPConnection::State() == CSIPConnection::EActive .
"Contact-headers".Count() == 0

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response, to an earlier REGISTER, that created the binding. This value is used to identify the binding to be removed.
TUint32 & aNewRequestId the returned request Id, to be used to match a response to this request.
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.

UpdateRegistrationL(TUint32, TUint32 &, const CSIPMessageElements *)

void UpdateRegistrationL ( TUint32 aRegistrationId,
TUint32 & aNewRequestId,
const CSIPMessageElements * aElements = 0
)

Creates SIP (update) REGISTER request and sends it to the given destination. Leaves on failure with a system wide or a SIP stack specific error code. User of this function does not need to, but can, set a new expires values in the expires-param of the SIP REGISTER request. This is done to update the refresh interval. A 2xx response to this request updates a binding as well as the refresh interval.

Parameters

TUint32 aRegistrationId the value of the registration-Id that was returned in a response, to an earlier REGISTER, that created the binding. This value is used to identify the binding to be updated.
TUint32 & aNewRequestId the returned request Id, to be used to match a response to this request.
const CSIPMessageElements * aElements = 0 contains optional SIP message headers and body.

Member Data Documentation

TBool iAdded

TBool iAdded [private]

CSIPClient & iClient

CSIPClient & iClient [private]

RSIPConnection * iConnection

RSIPConnection * iConnection [private]

RStringF iContactHeaderName

RStringF iContactHeaderName [private]

RStringF iExpiresHeaderName

RStringF iExpiresHeaderName [private]

TUint32 iIapId

TUint32 iIapId [private]

MSIPClientConnectionObserver & iObserver

MSIPClientConnectionObserver & iObserver [private]

CSIPClientConnectionReceiver * iReceiver

CSIPClientConnectionReceiver * iReceiver [private]

CSIPITCSender * iSender

CSIPITCSender * iSender [private]

RStringF iTag

RStringF iTag [private]