1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @file CAuthenticationFilterInterface.h
20 @warning : This file contains Rose Model ID comments - please do not delete
23 #ifndef __CAUTHENTICATIONFILTERINTERFACE_H__
24 #define __CAUTHENTICATIONFILTERINTERFACE_H__
28 #include <ecom/ecom.h>
29 #include <http/rhttpsession.h>
31 // Forward declarations
32 class MHTTPAuthenticationCallback;
35 class CAuthenticationFilterInterface : public CBase
37 The ECOM interface definition for an HTTP authentication filter. Implementations
38 of an authentication filter must inherit this class.
45 @fn InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback)
46 Intended Usage: This method is used to install the authentication filter to the filter queue.
47 The returned pointer is not owned as the filters must be self-destroying when
49 @param aSession A handle to the transport session
50 @param aCallback A pointer to the object implementing the callback function
51 @return Pointer to the newly installed plugin
52 @pre The session had already been setup
53 @post The filter(s) have been installed
55 inline static void InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback);
58 @fn ~CAuthenticationFilterInterface()
59 Intended Usage: Virtual destructor
60 @pre The object identified by the destructor key in iEcomDtorID exists
61 @post The object is destroyed
63 inline ~CAuthenticationFilterInterface();
66 struct TAuthenticationParams
68 RHTTPSession* iSession;
69 MHTTPAuthenticationCallback* iCallback;
72 private: // Attributes
73 /// The ECom destructor key identifier
77 //----------------------------------------------------------------------------------------
79 inline void CAuthenticationFilterInterface::InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback)
81 const TUid KUidAuthenticationFilter = {0x101F447C};
82 TAuthenticationParams authParams;
83 authParams.iSession = &aSession;
84 authParams.iCallback = aCallback;
85 REComSession::CreateImplementationL(KUidAuthenticationFilter, _FOFF(CAuthenticationFilterInterface,iEcomDtorID), &authParams);
88 inline CAuthenticationFilterInterface::~CAuthenticationFilterInterface()
90 REComSession::DestroyedImplementation(iEcomDtorID);
93 #endif // __CAUTHENTICATIONFILTERINTERFACE_H__