1.1 --- a/epoc32/include/http/tfilterconfigurationiter.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,201 +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 TFilterConfigurationIter.h
1.23 - @warning : This file contains Rose Model ID comments - please do not delete
1.24 -*/
1.25 -
1.26 -#ifndef __TFILTERCONFIGURATIONITER_H__
1.27 -#define __TFILTERCONFIGURATIONITER_H__
1.28 -
1.29 -// System includes
1.30 -#include <e32std.h>
1.31 -
1.32 -// User includes
1.33 -#include <http/tfilterinformation.h>
1.34 -
1.35 -// Forward declarations
1.36 -class CHTTPSession;
1.37 -class TSessionFilterInfo;
1.38 -class CFilterConfigurationIterator_UnitTestContext;
1.39 -
1.40 -
1.41 -//##ModelId=3C4C0F45009C
1.42 -class TFilterConfigurationIterator
1.43 -/**
1.44 -This class can only be created and destroyed by the session. It is supplied to the
1.45 -client, if the client wishes to configure the filter that are installed or install
1.46 -filters that must be installed explicitly. The API of the class allows the client to
1.47 -navigate, install, uninstall and query the filter list. The filters visible in this
1.48 -list are only the implicit and explicit filters declared as plugins. This iterator MUST
1.49 -be initialised using the First() method and the return error code checked before any
1.50 -other operations are called.
1.51 -@publishedAll
1.52 -@released
1.53 -*/
1.54 - {
1.55 -public: // Methods
1.56 - /**
1.57 - @fn First()
1.58 - Intended Usage: This method sets the current filter to the first filter in the list.
1.59 - This method must be used initially to set the
1.60 - current filter and the returned error code must be noted prior to
1.61 - using any of the methods that query or modify the current filter.
1.62 - @return KErrNone if the first filter is found, KErrNotFound if the filter
1.63 - can't be found or no filters exist
1.64 - @pre Object is constructed
1.65 - @post Current filter is set to the first filter in the list
1.66 - */
1.67 - //##ModelId=3C4C0F45010C
1.68 - IMPORT_C TInt First();
1.69 -
1.70 - /**
1.71 - @fn Next()
1.72 - Intended Usage: This method sets the current filter to the next filter in the list.
1.73 - @return KErrNone if the next filter is found, KErrNotFound if the filter
1.74 - can't be found, or no filters exist, or the current filter is at the
1.75 - end of the list.
1.76 - @pre Object is constructed
1.77 - @post Current filter is set to the next filter in the list
1.78 - */
1.79 - //##ModelId=3C4C0F45010B
1.80 - IMPORT_C TInt Next();
1.81 -
1.82 - /**
1.83 - @fn AtStart()
1.84 - Intended Usage: This method indicates whether the current filter is the first filter in
1.85 - the list. This method will panic if the iterator has not been initialised
1.86 - using the First() method.
1.87 - @return ETrue if the current filter is the first in the list
1.88 - @pre The iterator has been initialised using the First() method
1.89 - */
1.90 - //##ModelId=3C4C0F45010A
1.91 - IMPORT_C TBool AtStart();
1.92 -
1.93 - /**
1.94 - @fn AtEnd()
1.95 - Intended Usage: This method indicates whether the current filter is the last filter in
1.96 - the list. This method will panic if the iterator has not been initialised
1.97 - using the First() method.
1.98 - @return ETrue if the current filter is the last in the list
1.99 - @pre The iterator has been initialised using the First() method
1.100 - */
1.101 - //##ModelId=3C4C0F450101
1.102 - IMPORT_C TBool AtEnd();
1.103 -
1.104 - /**
1.105 - @fn FindByDataType(const TDesC8& aDataType)
1.106 - Intended Usage: This method find the first filter in the list that has a matching data
1.107 - type that is passed in. The method will set the current filter to the
1.108 - filter that matches the data type or if not found the current filter
1.109 - will not change. This method will always begin its search
1.110 - from the beginning of the list.
1.111 - @param aDataType An 8-bit descriptor containing the data type to match the
1.112 - filter plug-in with
1.113 - @return KErrNone is the filter plug-in is found, KErrNotFound if not found
1.114 - @pre Object is constructed
1.115 - @post The current filter is set to the filter that matches the data type
1.116 - */
1.117 - //##ModelId=3C4C0F4500F8
1.118 - IMPORT_C TInt FindByDataType(const TDesC8& aDataType);
1.119 -
1.120 - /**
1.121 - @fn CurrentFilterInformation() const
1.122 - Intended Usage: This method will return the information of the current filter. The
1.123 - information is provided in a TFilterInformation structure containing the
1.124 - following information:
1.125 - 1) Display name
1.126 - 2) Data type
1.127 - 3) Version
1.128 - 4) UID
1.129 - 5) Category
1.130 - 6) Install status
1.131 - This method will panic if the iterator has not been initialised using the
1.132 - First() method
1.133 - @return A struct containing the current filter information
1.134 - @pre The iterator has been initialised using the First() method
1.135 - @see TFilterInformation
1.136 - */
1.137 - //##ModelId=3C4C0F4500F7
1.138 - IMPORT_C const TFilterInformation CurrentFilterInformation() const;
1.139 -
1.140 - /**
1.141 - @fn InstallCurrentFilter() const
1.142 - Intended Usage: This method will install the current filter. This method will panic if a
1.143 - current filter is not set.
1.144 - @return KErrNone if the filter installed, KErrAlreadyExists if the filter has
1.145 - already been installed, KErrNotFound if the filter cannot be found,
1.146 - KErrNotConnected if the ECom plug-in architecture is not connected,
1.147 - KErrNoMemory is the filter is not installed due to low memory, or any
1.148 - other system-wide error codes.
1.149 - @pre A current filter has been set and is not already installed
1.150 - @post The filter is installed
1.151 - */
1.152 - //##ModelId=3C4C0F4500F6
1.153 - IMPORT_C TInt InstallCurrentFilter() const;
1.154 -
1.155 - /**
1.156 - @fn UninstallCurrentFilter() const
1.157 - Intended Usage: This method will uninstall the current filter. This method will panic if
1.158 - a current filter is not set.
1.159 - @return KErrNone is the filter uninstalled correctly, KErrNotFound if the filter
1.160 - has not already been installed
1.161 - @pre A current filter has been set and has already been installed
1.162 - @post The filter is uninstalled
1.163 - */
1.164 - //##ModelId=3C4C0F4500EF
1.165 - IMPORT_C TInt UninstallCurrentFilter() const;
1.166 -
1.167 -private: // Methods
1.168 - // Friend class
1.169 - friend class CHTTPSession;
1.170 -
1.171 - // Friend class for testing purposes
1.172 - friend class CFilterConfigurationIterator_UnitTestContext;
1.173 -
1.174 - // Standard default constructor, this is private as it is designed so that only
1.175 - // the CHTTPSession object that create it.
1.176 - //##ModelId=3C4C0F4500ED
1.177 - TFilterConfigurationIterator(CHTTPSession* aSession);
1.178 -
1.179 - // Standard destructor, this is private as it is designed so that only the
1.180 - // CHTTPSession object can delete it.
1.181 - //##ModelId=3C4C0F4500EC
1.182 - ~TFilterConfigurationIterator();
1.183 -
1.184 -private: // Attributes
1.185 - // Pointer to the session implementation. This is not owned.
1.186 - //##ModelId=3C4C0F4500DA
1.187 - CHTTPSession* iSession;
1.188 -
1.189 - // Pointer array containing all the information for all the filter plugins
1.190 - // discovered by ECom. The list is stored and owned by the session. This is
1.191 - // not owned.
1.192 - //##ModelId=3C4C0F4500D0
1.193 - RPointerArray<TSessionFilterInfo>& iFilterInfoList;
1.194 -
1.195 - // Value conatining the index of the current filter in the list
1.196 - //##ModelId=3C4C0F4500C6
1.197 - TInt iCurrentFilterIndex;
1.198 -
1.199 - // Value containing the number filters in the list
1.200 - //##ModelId=3C4C0F4500BC
1.201 - TInt iFilterCount;
1.202 - };
1.203 -
1.204 -#endif // __TFILTERCONFIGURATIONITER_H__