CSIPHttpDigest Class Reference

class CSIPHttpDigest : public CBase

Class for managing SIP HTTP Digest security settings. Class provides functions for setting/removing HTTP Digest security mechanism related parameters. If the user does not use the class for the providing credentials for the received challenges, an error will be returned to the original request in case it was challenged.

Note that the user will be asked to provide credentials one realm at the time.

sipclient.lib

Inherits from

Public Member Functions
~CSIPHttpDigest ()
void CSIPDeleted ()
IMPORT_C TInt IgnoreChallenge (const TDesC8 &)
IMPORT_C TInt IgnoreChallenge (const CSIPClientTransaction &, const TDesC8 &)
IMPORT_C TInt IgnoreChallenge (const CSIPRefresh &, const TDesC8 &)
IMPORT_C CSIPHttpDigest * NewL ( CSIP &, MSIPHttpDigestChallengeObserver &)
IMPORT_C CSIPHttpDigest * NewL ( CSIP &, MSIPHttpDigestChallengeObserver2 &)
IMPORT_C CSIPHttpDigest * NewLC ( CSIP &, MSIPHttpDigestChallengeObserver &)
IMPORT_C CSIPHttpDigest * NewLC ( CSIP &, MSIPHttpDigestChallengeObserver2 &)
IMPORT_C TInt RemoveCredentials (const TDesC8 &)
IMPORT_C TInt RemoveCredentials ()
IMPORT_C void SetCredentialsL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void SetCredentialsL (const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void SetCredentialsL (const CSIPClientTransaction &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void SetCredentialsL (const CSIPRefresh &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
IMPORT_C void SetObserver ( MSIPHttpDigestChallengeObserver &)
IMPORT_C void SetObserver ( MSIPHttpDigestChallengeObserver2 &)
Private Member Functions
CSIPHttpDigest ( CSIP &)
CSIPHttpDigest (const CSIPHttpDigest &)
void ConstructL ( MSIPHttpDigestChallengeObserver &)
void ConstructL ( MSIPHttpDigestChallengeObserver2 &)
TInt IgnoreChallenge ( TUint32 , TUint32 , const TDesC8 &)
TInt RemoveCredentialParams (const TDesC8 &)
void SetCredentialParamsL ( TUint32 , TUint32 , const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)
CSIPHttpDigest & operator= (const CSIPHttpDigest &)
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
CSIP * iSIP

Constructor & Destructor Documentation

CSIPHttpDigest(CSIP &)

CSIPHttpDigest ( CSIP & aSIP ) [private]

Parameters

CSIP & aSIP

CSIPHttpDigest(const CSIPHttpDigest &)

CSIPHttpDigest ( const CSIPHttpDigest & aHttpDigest ) [private]

Parameters

const CSIPHttpDigest & aHttpDigest

~CSIPHttpDigest()

IMPORT_C ~CSIPHttpDigest ( )

Member Functions Documentation

CSIPDeleted()

void CSIPDeleted ( )

ConstructL(MSIPHttpDigestChallengeObserver &)

void ConstructL ( MSIPHttpDigestChallengeObserver & aObserver ) [private]

Parameters

MSIPHttpDigestChallengeObserver & aObserver

ConstructL(MSIPHttpDigestChallengeObserver2 &)

void ConstructL ( MSIPHttpDigestChallengeObserver2 & aObserver2 ) [private]

Parameters

MSIPHttpDigestChallengeObserver2 & aObserver2

IgnoreChallenge(const TDesC8 &)

IMPORT_C TInt IgnoreChallenge ( const TDesC8 & aRealm )
Ignores the challenge for the realm. As a result the error will be generated to the original SIP request.
Pre-condition
aRealm must not be an empty descriptor

Parameters

const TDesC8 & aRealm a realm for which the challenge was ignored

IgnoreChallenge(const CSIPClientTransaction &, const TDesC8 &)

IMPORT_C TInt IgnoreChallenge ( const CSIPClientTransaction & aTransaction,
const TDesC8 & aRealm
)
Ignores the challenge for the realm for the specific transaction. As a result KErrForbidden will be generated to the original SIP request.
Pre-condition
aRealm must not be an empty descriptor

Parameters

const CSIPClientTransaction & aTransaction the transaction that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
const TDesC8 & aRealm a realm for which the challenge was ignored

IgnoreChallenge(const CSIPRefresh &, const TDesC8 &)

IMPORT_C TInt IgnoreChallenge ( const CSIPRefresh & aRefresh,
const TDesC8 & aRealm
)
Ignores the challenge for the realm for the specific refresh. As a result the error will be generated to the original SIP request.
Pre-condition
aRealm must not be an empty descriptor

Parameters

const CSIPRefresh & aRefresh the refresh that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
const TDesC8 & aRealm a realm for which the challenge was ignored

IgnoreChallenge(TUint32, TUint32, const TDesC8 &)

TInt IgnoreChallenge ( TUint32 aRequestId,
TUint32 aRefreshId,
const TDesC8 & aRealm
) [private]

Parameters

TUint32 aRequestId
TUint32 aRefreshId
const TDesC8 & aRealm

NewL(CSIP &, MSIPHttpDigestChallengeObserver &)

IMPORT_C CSIPHttpDigest * NewL ( CSIP & aSIP,
MSIPHttpDigestChallengeObserver & aObserver
) [static]

Two-phased constructor.

Parameters

CSIP & aSIP a handle to SIP server
MSIPHttpDigestChallengeObserver & aObserver an observer for the received challenges

NewL(CSIP &, MSIPHttpDigestChallengeObserver2 &)

IMPORT_C CSIPHttpDigest * NewL ( CSIP & aSIP,
MSIPHttpDigestChallengeObserver2 & aObserver2
) [static]

Two-phased constructor.

Parameters

CSIP & aSIP a handle to SIP server
MSIPHttpDigestChallengeObserver2 & aObserver2 an observer for the received challenges

NewLC(CSIP &, MSIPHttpDigestChallengeObserver &)

IMPORT_C CSIPHttpDigest * NewLC ( CSIP & aSIP,
MSIPHttpDigestChallengeObserver & aObserver
) [static]

Two-phased constructor.

Parameters

CSIP & aSIP a handle to SIP server
MSIPHttpDigestChallengeObserver & aObserver an observer for the received challenges

NewLC(CSIP &, MSIPHttpDigestChallengeObserver2 &)

IMPORT_C CSIPHttpDigest * NewLC ( CSIP & aSIP,
MSIPHttpDigestChallengeObserver2 & aObserver2
) [static]

Two-phased constructor.

Parameters

CSIP & aSIP a handle to SIP server
MSIPHttpDigestChallengeObserver2 & aObserver2 an observer for the received challenges

RemoveCredentialParams(const TDesC8 &)

TInt RemoveCredentialParams ( const TDesC8 & aRealm ) const [private]

Parameters

const TDesC8 & aRealm

RemoveCredentials(const TDesC8 &)

IMPORT_C TInt RemoveCredentials ( const TDesC8 & aRealm )
Removes all set credentials for the realm. Must not be used if the user implements MSIPHttpDigestChallengeObserver2 .
Pre-condition
aRealm must not be an empty descriptor

Parameters

const TDesC8 & aRealm servers's realm

RemoveCredentials()

IMPORT_C TInt RemoveCredentials ( )

Removes all set credentials by the user. Must not be used if the user implements MSIPHttpDigestChallengeObserver2 .

SetCredentialParamsL(TUint32, TUint32, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)

void SetCredentialParamsL ( TUint32 aRequestId,
TUint32 aRefreshId,
const TDesC8 & aOutboundProxy,
const TDesC8 & aRealm,
const TDesC8 & aUsername,
const TDesC8 & aPasswd
) const [private]

Parameters

TUint32 aRequestId
TUint32 aRefreshId
const TDesC8 & aOutboundProxy
const TDesC8 & aRealm
const TDesC8 & aUsername
const TDesC8 & aPasswd

SetCredentialsL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void SetCredentialsL ( const TDesC8 & aOutboundProxy,
const TDesC8 & aRealm,
const TDesC8 & aUsername,
const TDesC8 & aPasswd
)
Sets credentials for the realm of the outbound proxy. Must be used in case the realm is the realm of the outbound proxy and the request for credentials was received from callback MSIPHttpDigestChallengeObserver::ChallengeReceived . The user can set credentials only upon request from the SIP implementation.
Pre-condition
aOutboundProxy, aRealm, aUsername and aPasswd must not be empty descriptors.
leave
KErrNoMemory if out of memory
leave
KErrArgument if some of the parameters is an empty descriptor
leave
KErrSIPResourceNotAvailable if a required object has been deleted

Parameters

const TDesC8 & aOutboundProxy an outbound proxy (FQDN or IP address)
const TDesC8 & aRealm servers's realm
const TDesC8 & aUsername user's name
const TDesC8 & aPasswd user's password for the given server's realm

SetCredentialsL(const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void SetCredentialsL ( const TDesC8 & aRealm,
const TDesC8 & aUsername,
const TDesC8 & aPasswd
)
Sets parameters for the realm. Should be used in case the realm is not a realm of an outbound proxy and the request for credentials was received from callback MSIPHttpDigestChallengeObserver::ChallengeReceived . The user can set credentials only upon request from the SIP implementation.
Pre-condition
aRealm, aUsername and aPasswd must not be empty descriptors.
leave
KErrNoMemory if out of memory
leave
KErrArgument if some of the parameters is an empty descriptor
leave
KErrSIPResourceNotAvailable if a required object has been deleted

Parameters

const TDesC8 & aRealm servers's realm
const TDesC8 & aUsername user's name
const TDesC8 & aPasswd user's password for the given server's realm

SetCredentialsL(const CSIPClientTransaction &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void SetCredentialsL ( const CSIPClientTransaction & aTransaction,
const TDesC8 & aOutboundProxy,
const TDesC8 & aRealm,
const TDesC8 & aUsername,
const TDesC8 & aPasswd
)
Sets credentials for the realm for the specific transaction. Must be used when the request for credentials was received from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with CSIPClientTransaction as the parameter.
Pre-condition
aRealm, aUsername and aPasswd must not be empty descriptors.
leave
KErrNoMemory if out of memory
leave
KErrArgument if some of the parameters is an empty descriptor
leave
KErrSIPResourceNotAvailable if a required object has been deleted

Parameters

const CSIPClientTransaction & aTransaction the transaction that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
const TDesC8 & aOutboundProxy an outbound proxy (FQDN or IP address) if the challenge received had Proxy-Authenticate-header(s). Otherwise KNullDesC8 should passed.
const TDesC8 & aRealm servers's realm
const TDesC8 & aUsername user's name
const TDesC8 & aPasswd user's password for the given server's realm

SetCredentialsL(const CSIPRefresh &, const TDesC8 &, const TDesC8 &, const TDesC8 &, const TDesC8 &)

IMPORT_C void SetCredentialsL ( const CSIPRefresh & aRefresh,
const TDesC8 & aOutboundProxy,
const TDesC8 & aRealm,
const TDesC8 & aUsername,
const TDesC8 & aPasswd
)
Sets credentials for the realm for the specific refresh. Must be used when the request for credentials was received from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with CSIPRefresh as the parameter.
Pre-condition
aRealm, aUsername and aPasswd must not be empty descriptors.
leave
KErrNoMemory if out of memory
leave
KErrArgument if some of the parameters is an empty descriptor
leave
KErrSIPResourceNotAvailable if a required object has been deleted

Parameters

const CSIPRefresh & aRefresh the refresh that was passed as a parameter to MSIPHttpDigestChallengeObserver2::ChallengeReceived
const TDesC8 & aOutboundProxy an outbound proxy (FQDN or IP address) if the challenge received had Proxy-Authenticate-header(s). Otherwise KNullDesC8 should passed.
const TDesC8 & aRealm servers's realm
const TDesC8 & aUsername user's name
const TDesC8 & aPasswd user's password for the given server's realm

SetObserver(MSIPHttpDigestChallengeObserver &)

IMPORT_C void SetObserver ( MSIPHttpDigestChallengeObserver & aObserver )

Sets the observer to listen for the possible received challenges. Replaces the existing MSIPHttpDigestChallengeObserver or MSIPHttpDigestChallengeObserver2 .

Parameters

MSIPHttpDigestChallengeObserver & aObserver an observer for the received challenges.

SetObserver(MSIPHttpDigestChallengeObserver2 &)

IMPORT_C void SetObserver ( MSIPHttpDigestChallengeObserver2 & aObserver )

Sets the observer to listen for the possible received challenges. Replaces the existing MSIPHttpDigestChallengeObserver or MSIPHttpDigestChallengeObserver2 .

Parameters

MSIPHttpDigestChallengeObserver2 & aObserver an observer for the received challenges.

operator=(const CSIPHttpDigest &)

CSIPHttpDigest & operator= ( const CSIPHttpDigest & aHttpDigest ) [private]

Parameters

const CSIPHttpDigest & aHttpDigest

Member Data Documentation

CSIP * iSIP

CSIP * iSIP [private]