williamr@2: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file CAuthenticationFilterInterface.h williamr@2: @warning : This file contains Rose Model ID comments - please do not delete williamr@2: */ williamr@2: williamr@2: #ifndef __CAUTHENTICATIONFILTERINTERFACE_H__ williamr@2: #define __CAUTHENTICATIONFILTERINTERFACE_H__ williamr@2: williamr@2: // System includes williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: // Forward declarations williamr@2: class MHTTPAuthenticationCallback; williamr@2: williamr@2: williamr@2: class CAuthenticationFilterInterface : public CBase williamr@2: /** williamr@2: The ECOM interface definition for an HTTP authentication filter. Implementations williamr@2: of an authentication filter must inherit this class. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: { williamr@2: public: // Methods williamr@2: /** williamr@2: @fn InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback) williamr@2: Intended Usage: This method is used to install the authentication filter to the filter queue. williamr@2: The returned pointer is not owned as the filters must be self-destroying when williamr@2: they are unloaded. williamr@2: @param aSession A handle to the transport session williamr@2: @param aCallback A pointer to the object implementing the callback function williamr@2: @return Pointer to the newly installed plugin williamr@2: @pre The session had already been setup williamr@2: @post The filter(s) have been installed williamr@2: */ williamr@2: inline static void InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback); williamr@2: williamr@2: /** williamr@2: @fn ~CAuthenticationFilterInterface() williamr@2: Intended Usage: Virtual destructor williamr@2: @pre The object identified by the destructor key in iEcomDtorID exists williamr@2: @post The object is destroyed williamr@2: */ williamr@2: inline ~CAuthenticationFilterInterface(); williamr@2: williamr@2: public: williamr@2: struct TAuthenticationParams williamr@2: { williamr@2: RHTTPSession* iSession; williamr@2: MHTTPAuthenticationCallback* iCallback; williamr@2: }; williamr@2: williamr@2: private: // Attributes williamr@2: /// The ECom destructor key identifier williamr@2: TUid iEcomDtorID; williamr@2: }; williamr@2: williamr@2: //---------------------------------------------------------------------------------------- williamr@2: williamr@2: inline void CAuthenticationFilterInterface::InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback) williamr@2: { williamr@2: const TUid KUidAuthenticationFilter = {0x101F447C}; williamr@2: TAuthenticationParams authParams; williamr@2: authParams.iSession = &aSession; williamr@2: authParams.iCallback = aCallback; williamr@2: REComSession::CreateImplementationL(KUidAuthenticationFilter, _FOFF(CAuthenticationFilterInterface,iEcomDtorID), &authParams); williamr@2: } williamr@2: williamr@2: inline CAuthenticationFilterInterface::~CAuthenticationFilterInterface() williamr@2: { williamr@2: REComSession::DestroyedImplementation(iEcomDtorID); williamr@2: } williamr@2: williamr@2: #endif // __CAUTHENTICATIONFILTERINTERFACE_H__