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