CSIPResolvedClient2 Class Reference

#include <mw/sipresolvedclient2.h>

class CSIPResolvedClient2 : public CBase

Inherits from

Detailed Description

Interface that SIP stack's clients must realize in order to be able to receive incoming SIP requests outside SIP dialogs. Note that channel UIDs must be unique accross all SIP clients e.g. clients may use UIDs assigned for binaries.

SIP stack utilizes the plug-ins that implement this interface in the following manner:

1) If the SIP request does not contain Accept-Contact-header(s), go to step 2. SIP stack calls CSIPResolvedClient2::MatchAcceptContactsL for all the plug-ins and applies the following logic: a) None of the clients match -> go to step 2 b) One client matches -> the SIP request is routed to the matching client c) Several clients match -> go to step 2

2) If the SIP request does not contain Event-header, go to step 3. SIP stack calls CSIPResolvedClient2::MatchEventL for all the plug-ins and applies the following logic: a) None of the clients match -> go to step 3 b) One client matches -> the SIP request is routed to the matching client c) Several clients match -> go to step 3

3) SIP stack calls CSIPResolvedClient2::MatchRequestL for all the plug-ins. a) None of the clients match -> SIP generates an error response b) One client matches -> the SIP request is routed to the matching client c) Several clients match -> SIP picks one of these clients randomly and routes the request to it. The ROM-based clients are preferred.

Member Attribute Documentation

iImplementationUid

TUid iImplementationUid

iInstanceKey

TUid iInstanceKey

Unique key for implementations of this interface.

Constructor & Destructor Documentation

CSIPResolvedClient2 ( )

CSIPResolvedClient2()[protected, inline]

~CSIPResolvedClient2 ( )

~CSIPResolvedClient2()[inline]

Destructor

Member Function Documentation

AddClientSpecificHeadersForOptionsResponseL ( RPointerArray< CSIPHeaderBase > & )

voidAddClientSpecificHeadersForOptionsResponseL(RPointerArray< CSIPHeaderBase > &aHeaders)[pure virtual]

Adds client specific SIP-headers for the 200 OK for OPTIONS. Each plug-in must check that the header to be added is not yet in the array. For example when adding header "Allow: INVITE" the client must check that the header is not already present in the array.

Parameters
aHeadersheaders to be added to 200 OK for OPTIONS. The ownership of the added headers is transferred to the caller.

CancelConnect ( const TUid & )

voidCancelConnect(const TUid &aClientUid)[pure virtual]

Cancels a ConnectL request for a client. Is called when for example a CANCEL for an INVITE is received before the client connects to SIP stack.

Parameters
aClientUida UID for which ConnectL was previously called

ConnectL ( const TUid & )

voidConnectL(const TUid &aClientUid)[pure virtual]

Requests the client to connect to SIP with the resolved UID in case there's no client connection with the UID.

Parameters
aClientUidpreviously resolved client UID

ConnectSupported ( )

TBool ConnectSupported()[pure virtual]

Indicates whether the plug-in implements CSIPResolvedClient2::ConnectL and by calling CSIPResolvedClient2::ConnectL SIP stack is able to force the client to connect to SIP stack.

Return Value
ETrue, if the plug-in supports CSIPResolvedClient2::ConnectL, otherwise EFalse.

MatchAcceptContactsL ( RStringF, const CUri8 &, const RPointerArray< CSIPHeaderBase > &, const TDesC8 &, const CSIPContentTypeHeader *, TUid & )

TBool MatchAcceptContactsL(RStringFaMethod,
const CUri8 &aRequestUri,
const RPointerArray< CSIPHeaderBase > &aHeaders,
const TDesC8 &aContent,
const CSIPContentTypeHeader *aContentType,
TUid &aClientUid
)[pure virtual]

Matches the Accept-Contact-headers to the client(s) represented by this plug-in. This function is called for an incoming SIP request if it contains Accept-Contact-header(s).

Parameters
aMethodthe method of the SIP request
aRequestUrithe request-URI of the SIP request
aHeadersall the headers in the SIP request
aContentSIP request body; zero-length descriptor if not present
aContentTypethe content-type of the SIP request. Zero-pointer if body is not present.
aClientUidindicates client's UID for SIP e.g. the one passed as a parameter to CSIP::NewL().
Return Value
ETrue, if the Accept-Contact-headers match to the client represented by this plug-in, otherwise EFalse.

MatchEventL ( RStringF, const CUri8 &, const RPointerArray< CSIPHeaderBase > &, const TDesC8 &, const CSIPContentTypeHeader *, TUid & )

TBool MatchEventL(RStringFaMethod,
const CUri8 &aRequestUri,
const RPointerArray< CSIPHeaderBase > &aHeaders,
const TDesC8 &aContent,
const CSIPContentTypeHeader *aContentType,
TUid &aClientUid
)[pure virtual]

Matches the Event-header to the client(s) represented by this plug-in. This function is called for an incoming SIP request, if it contains an Event-header and MatchAcceptContactsL returned EFalse.

Parameters
aMethodthe method of the SIP request
aRequestUrithe request-URI of the SIP request
aHeadersall the headers in the SIP request
aContentSIP request body; zero-length descriptor if not present
aContentTypethe content-type of the SIP request. Zero-pointer if body is not present.
aClientUidindicates client's UID for SIP e.g. the one passed as a parameter to CSIP::NewL().
Return Value
ETrue, if the Event-header matches to the client represented by this plug-in, otherwise EFalse.

MatchRequestL ( RStringF, const CUri8 &, const RPointerArray< CSIPHeaderBase > &, const TDesC8 &, const CSIPContentTypeHeader *, TUid & )

TBool MatchRequestL(RStringFaMethod,
const CUri8 &aRequestUri,
const RPointerArray< CSIPHeaderBase > &aHeaders,
const TDesC8 &aContent,
const CSIPContentTypeHeader *aContentType,
TUid &aClientUid
)[pure virtual]

Matches the whole SIP request to the client(s) represented by this plug-in. This function is called if the SIP request does not contain Accept- or Event-headers or MatchAcceptContactsL and MatchEventL returned EFalse.

Parameters
aMethodthe method of the SIP request
aRequestUrithe request-URI of the SIP request
aHeadersall the headers in the SIP request
aContentSIP request body; zero-length descriptor if not present
aContentTypethe content-type of the SIP request. Zero-pointer if body is not present.
aClientUidindicates client's UID for SIP e.g. the one passed as a parameter to CSIP::NewL().
Return Value
ETrue, if the request can be handled by the client represented by this plug-in, otherwise EFalse.

SupportedContentTypesL ( )

RPointerArray< CSIPContentTypeHeader >SupportedContentTypesL()[pure virtual]

Gets all the SIP message content types supported by the client.

Return Value
0..n SIP Content-Type-headers. The ownership of the headers is transferred.

SupportedSdpMediasL ( )

RPointerArray< CSdpMediaField >SupportedSdpMediasL()[pure virtual]

Gets all the SDP media-fields supported by the client.

Return Value
0..n SDP media-fields describing the client's media support. The ownership of the media-fields is transferred.