epoc32/include/http/mhttpauthenticationcallback.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- a/epoc32/include/http/mhttpauthenticationcallback.h	Tue Mar 16 16:12:26 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,87 +0,0 @@
     1.4 -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -
    1.20 -
    1.21 -/**
    1.22 - @file MHTTPAuthenticationCallback.h
    1.23 - @warning : This file contains Rose Model ID comments - please do not delete
    1.24 -*/
    1.25 -
    1.26 -#ifndef	__MHTTPAUTHENTICATIONCALLBACK_H__
    1.27 -#define	__MHTTPAUTHENTICATIONCALLBACK_H__ 
    1.28 -
    1.29 -// System includes
    1.30 -#include <uri8.h>
    1.31 -#include <stringpool.h>
    1.32 -#include <http/rhttpsession.h>
    1.33 -#include <http/cauthenticationfilterinterface.h>
    1.34 -
    1.35 -
    1.36 -//##ModelId=3B1E52A50151
    1.37 -class MHTTPAuthenticationCallback
    1.38 -/** 
    1.39 -The mixin that needs to be implemented if authentication is to be
    1.40 -supported. This supplies the username and password when they are
    1.41 -needed for authentication.
    1.42 -To use, subclass off this class and implement GetCredentialsL. To install
    1.43 -the class into a session, call InstallAuthenticationL.
    1.44 -@publishedAll
    1.45 -@released
    1.46 -*/
    1.47 -	{
    1.48 - public:
    1.49 -	/** Gets some credentials. Note that the first 3 parameters are
    1.50 -		informational and many clients may not have a use for
    1.51 -		them. Clients may want to display some or all of these
    1.52 -		parameters to the user, so that the user knows who they are
    1.53 -		giving their credentials to, and how securely they will be
    1.54 -		transmitted.
    1.55 -		@param aURI The URI being requested
    1.56 -		@param aRealm The realm being requested
    1.57 -		@param aAuthenticationType The type of authentication (basic or digest)
    1.58 -		@param aUsername The username is returned in this parameter. 
    1.59 -		The caller will close the returned string.
    1.60 -		@param aPassword The password is returned in this parameter
    1.61 -		The caller will close the returned string.
    1.62 -		@return True if credentials have been obtained. 
    1.63 -		@leave Anything. If this function leaves the transaction will be 
    1.64 -		failed. 
    1.65 -	*/
    1.66 -	//##ModelId=3B1E52A5015D
    1.67 -	virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, 
    1.68 -								  RStringF aAuthenticationType,
    1.69 -								  RString& aUsername, 
    1.70 -								  RString& aPassword) = 0;
    1.71 -
    1.72 -	/** Installs the callback into the session.
    1.73 -		Typicaly called from the implementation class's ConstructL().
    1.74 -		@pre The session is opened, but no transactions have been created on it
    1.75 -		@post The session supports authentication, and uses this API to
    1.76 -		get its credentials.
    1.77 -		@param aSession the session to install the filter into.
    1.78 -		@leave KErrNoMemory There was not enough memory.
    1.79 -	 */
    1.80 -	//##ModelId=3B1E52A5015B
    1.81 -	inline void InstallAuthenticationL(RHTTPSession aSession);
    1.82 -	};
    1.83 -
    1.84 -inline void MHTTPAuthenticationCallback::InstallAuthenticationL(RHTTPSession aSession)
    1.85 -	{
    1.86 -	CAuthenticationFilterInterface::InstallFilterL(aSession, this);
    1.87 -	}
    1.88 -
    1.89 -
    1.90 -#endif //	__MHTTPAUTHENTICATIONCALLBACK_H__