#include <mw/sipresolvedclient2.h>
class CSIPResolvedClient2 : public CBase |
Public Attributes | |
---|---|
TUid | iImplementationUid |
TUid | iInstanceKey |
Public Member Functions | |
---|---|
~CSIPResolvedClient2() | |
pure virtual void | AddClientSpecificHeadersForOptionsResponseL(RPointerArray< CSIPHeaderBase > &) |
pure virtual void | CancelConnect(const TUid &) |
pure virtual void | ConnectL(const TUid &) |
pure virtual TBool | ConnectSupported() |
pure virtual TBool | MatchAcceptContactsL(RStringF, const CUri8 &, const RPointerArray< CSIPHeaderBase > &, const TDesC8 &, const CSIPContentTypeHeader *, TUid &) |
pure virtual TBool | MatchEventL(RStringF, const CUri8 &, const RPointerArray< CSIPHeaderBase > &, const TDesC8 &, const CSIPContentTypeHeader *, TUid &) |
pure virtual TBool | MatchRequestL(RStringF, const CUri8 &, const RPointerArray< CSIPHeaderBase > &, const TDesC8 &, const CSIPContentTypeHeader *, TUid &) |
pure virtual RPointerArray< CSIPContentTypeHeader > | SupportedContentTypesL() |
pure virtual RPointerArray< CSdpMediaField > | SupportedSdpMediasL() |
Protected Member Functions | |
---|---|
CSIPResolvedClient2() |
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.
void | AddClientSpecificHeadersForOptionsResponseL | ( | 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.
Parameter | Description |
---|---|
aHeaders | headers to be added to 200 OK for OPTIONS. The ownership of the added headers is transferred to the caller. |
void | CancelConnect | ( | 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.
Parameter | Description |
---|---|
aClientUid | a UID for which ConnectL was previously called |
void | ConnectL | ( | 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.
Parameter | Description |
---|---|
aClientUid | previously resolved client UID |
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.
Returns: ETrue, if the plug-in supports CSIPResolvedClient2::ConnectL, otherwise EFalse.
TBool | MatchAcceptContactsL | ( | RStringF | aMethod, |
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).
Parameter | Description |
---|---|
aMethod | the method of the SIP request |
aRequestUri | the request-URI of the SIP request |
aHeaders | all the headers in the SIP request |
aContent | SIP request body; zero-length descriptor if not present |
aContentType | the content-type of the SIP request. Zero-pointer if body is not present. |
aClientUid | indicates client's UID for SIP e.g. the one passed as a parameter to CSIP::NewL(). |
Returns: ETrue, if the Accept-Contact-headers match to the client represented by this plug-in, otherwise EFalse.
TBool | MatchEventL | ( | RStringF | aMethod, |
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.
Parameter | Description |
---|---|
aMethod | the method of the SIP request |
aRequestUri | the request-URI of the SIP request |
aHeaders | all the headers in the SIP request |
aContent | SIP request body; zero-length descriptor if not present |
aContentType | the content-type of the SIP request. Zero-pointer if body is not present. |
aClientUid | indicates client's UID for SIP e.g. the one passed as a parameter to CSIP::NewL(). |
Returns: ETrue, if the Event-header matches to the client represented by this plug-in, otherwise EFalse.
TBool | MatchRequestL | ( | RStringF | aMethod, |
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.
Parameter | Description |
---|---|
aMethod | the method of the SIP request |
aRequestUri | the request-URI of the SIP request |
aHeaders | all the headers in the SIP request |
aContent | SIP request body; zero-length descriptor if not present |
aContentType | the content-type of the SIP request. Zero-pointer if body is not present. |
aClientUid | indicates client's UID for SIP e.g. the one passed as a parameter to CSIP::NewL(). |
Returns: ETrue, if the request can be handled by the client represented by this plug-in, otherwise EFalse.
RPointerArray< CSIPContentTypeHeader > | SupportedContentTypesL | ( | ) | [pure virtual] |
Gets all the SIP message content types supported by the client.
Returns: 0..n SIP Content-Type-headers. The ownership of the headers is transferred.
RPointerArray< CSdpMediaField > | SupportedSdpMediasL | ( | ) | [pure virtual] |
Gets all the SDP media-fields supported by the client.
Returns: 0..n SDP media-fields describing the client's media support. The ownership of the media-fields is transferred.