1.1 --- a/epoc32/include/http/cecomfilter.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,120 +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 CEComFilter.h
1.23 - @warning : This file contains Rose Model ID comments - please do not delete
1.24 -*/
1.25 -
1.26 -#ifndef __CECOMFILTER_H__
1.27 -#define __CECOMFILTER_H__
1.28 -
1.29 -// System includes
1.30 -#include <e32base.h>
1.31 -#include <ecom/ecom.h>
1.32 -#include <http/rhttpsession.h>
1.33 -
1.34 -/**
1.35 -The ECom filter interface UID
1.36 -@publishedAll
1.37 -@released
1.38 -*/
1.39 -const TUid KUidFilterPluginInterface = {0x101F446D};
1.40 -
1.41 -
1.42 -//##ModelId=3C4C0F400280
1.43 -class CEComFilter : public CBase
1.44 -/**
1.45 -This class serves as the base class for ECom filter plugins. It provides minimal functionality
1.46 -to simply install and destroy filters specified by their UID or data type. The RHTTPSession
1.47 -passed in is passed onto the filter as a TAny* pointer and therefore must be casted back to
1.48 -an RHTTPSession pointer by the filter.
1.49 -@publishedAll
1.50 -@released
1.51 -*/
1.52 - {
1.53 -public: // Methods
1.54 - /**
1.55 - @fn InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid)
1.56 - Intended Usage: This method is used to install filters to the filter queue. The implementation
1.57 - UID of the filter plugin is passed to identify the plugin that is required.
1.58 - The returned pointer is not owned as the filters must be self-destroying when
1.59 - they are unloaded.
1.60 - @param aSession A handle to the transport session
1.61 - @param aEComFilterUid The implementation UID of the plugin
1.62 - @return Pointer to the newly installed plugin
1.63 - @pre The session had already been setup
1.64 - @post The filter(s) have been installed
1.65 - */
1.66 - //##ModelId=3C4C0F4002A8
1.67 - inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid);
1.68 -
1.69 - /**
1.70 - @fn InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType)
1.71 - Intended Usage: This method is used to install filters to the filter queue. The implementation
1.72 - UID of the filter plugin is passed to identify the plugin that is required.
1.73 - The returned pointer is not owned as the filters must be self-destroying when
1.74 - they are unloaded.
1.75 - @param aSession A handle to the transport session
1.76 - @param aEComFilterDataType A descriptor containing the datatype of the filter to load
1.77 - @return Pointer to the newly installed plugin
1.78 - @pre The session had already been setup
1.79 - @post The filter(s) have been installed
1.80 - */
1.81 - //##ModelId=3C4C0F4002AB
1.82 - inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType);
1.83 -
1.84 - /**
1.85 - @fn ~CEComFilter()
1.86 - Intended Usage: Virtual destructor
1.87 - @pre The object identified by the destructor key in iEcomDtorID exists
1.88 - @post The object is destroyed
1.89 - */
1.90 - //##ModelId=3C4C0F40029E
1.91 - inline ~CEComFilter();
1.92 -
1.93 -private: // Attributes
1.94 - /// The ECom destructor key identifier
1.95 - //##ModelId=3C4C0F400297
1.96 - TUid iEcomDtorID;
1.97 - };
1.98 -
1.99 -//----------------------------------------------------------------------------------------
1.100 -
1.101 -inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid)
1.102 - {
1.103 - TAny* filterPlugin = REComSession::CreateImplementationL(aEComFilterUid, _FOFF(CEComFilter,iEcomDtorID), &aSession);
1.104 - return REINTERPRET_CAST(CEComFilter*, filterPlugin);
1.105 - }
1.106 -
1.107 -inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession,const TDesC8& aEComFilterDataType)
1.108 - {
1.109 - TEComResolverParams resolverParams;
1.110 - resolverParams.SetDataType(aEComFilterDataType);
1.111 - // This will leave if the plugin is not found
1.112 - TAny* filterPlugin = REComSession::CreateImplementationL(KUidFilterPluginInterface,
1.113 - _FOFF(CEComFilter,iEcomDtorID),
1.114 - &aSession, resolverParams);
1.115 - return REINTERPRET_CAST(CEComFilter*, filterPlugin);
1.116 - }
1.117 -
1.118 -inline CEComFilter::~CEComFilter()
1.119 - {
1.120 - REComSession::DestroyedImplementation(iEcomDtorID);
1.121 - }
1.122 -
1.123 -#endif // __CECOMFILTER_H__