epoc32/include/http/tfilterconfigurationiter.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 /**
    19  @file TFilterConfigurationIter.h
    20  @warning : This file contains Rose Model ID comments - please do not delete
    21 */
    22 
    23 #ifndef __TFILTERCONFIGURATIONITER_H__
    24 #define __TFILTERCONFIGURATIONITER_H__
    25 
    26 // System includes
    27 #include <e32std.h>
    28 
    29 // User includes
    30 #include <http/tfilterinformation.h>
    31 
    32 // Forward declarations
    33 class CHTTPSession;
    34 class TSessionFilterInfo;
    35 class CFilterConfigurationIterator_UnitTestContext;
    36 
    37 
    38 //##ModelId=3C4C0F45009C
    39 class TFilterConfigurationIterator
    40 /**
    41 This class can only be created and destroyed by the session. It is supplied to the
    42 client, if the client wishes to configure the filter that are installed or install
    43 filters that must be installed explicitly. The API of the class allows the client to
    44 navigate, install, uninstall and query the filter list. The filters visible in this
    45 list are only the implicit and explicit filters declared as plugins. This iterator MUST
    46 be initialised using the First() method and the return error code checked before any
    47 other operations are called.
    48 @publishedAll
    49 @released
    50 */
    51 	{
    52 public: // Methods
    53 	/**
    54 	@fn				First()
    55 	Intended Usage:	This method sets the current filter to the first filter in the list.
    56 					This method must be used initially to set the
    57 					current filter and the returned error code must be noted prior to
    58 					using any of the methods that query or modify the current filter.
    59 	@return			KErrNone if the first filter is found, KErrNotFound if the filter 
    60 					can't be found or no filters exist
    61 	@pre 			Object is constructed
    62 	@post			Current filter is set to the first filter in the list
    63 	*/
    64 	//##ModelId=3C4C0F45010C
    65 	IMPORT_C TInt First();
    66 
    67 	/**
    68 	@fn				Next()
    69 	Intended Usage:	This method sets the current filter to the next filter in the list.
    70 	@return			KErrNone if the next filter is found, KErrNotFound if the filter 
    71 					can't be found, or no filters exist, or the current filter is at the
    72 					end of the list.
    73 	@pre 			Object is constructed
    74 	@post			Current filter is set to the next filter in the list
    75 	*/
    76 	//##ModelId=3C4C0F45010B
    77 	IMPORT_C TInt Next();
    78 
    79 	/**
    80 	@fn				AtStart()
    81 	Intended Usage: This method indicates whether the current filter is the first filter in
    82 					the list. This method will panic if the iterator has not been initialised
    83 					using the First() method.
    84 	@return			ETrue if the current filter is the first in the list
    85 	@pre 			The iterator has been initialised using the First() method
    86 	*/
    87 	//##ModelId=3C4C0F45010A
    88 	IMPORT_C TBool AtStart();
    89 
    90 	/**
    91 	@fn				AtEnd()
    92 	Intended Usage: This method indicates whether the current filter is the last filter in
    93 					the list. This method will panic if the iterator has not been initialised
    94 					using the First() method.
    95 	@return			ETrue if the current filter is the last in the list
    96 	@pre 			The iterator has been initialised using the First() method
    97 	*/
    98 	//##ModelId=3C4C0F450101
    99 	IMPORT_C TBool AtEnd();
   100 
   101 	/**
   102 	@fn				FindByDataType(const TDesC8& aDataType)
   103 	Intended Usage:	This method find the first filter in the list that has a matching data
   104 					type that is passed in. The method will set the current filter to the
   105 					filter that matches the data type or if not found the current filter
   106 					will not change. This method will always begin its search
   107 					from the beginning of the list.
   108 	@param			aDataType An 8-bit descriptor containing the data type to match the 
   109 					filter plug-in with
   110 	@return			KErrNone is the filter plug-in is found, KErrNotFound if not found
   111 	@pre 			Object is constructed
   112 	@post			The current filter is set to the filter that matches the data type
   113 	*/
   114 	//##ModelId=3C4C0F4500F8
   115 	IMPORT_C TInt FindByDataType(const TDesC8& aDataType);
   116 
   117 	/**
   118 	@fn				CurrentFilterInformation() const
   119 	Intended Usage:	This method will return the information of the current filter. The
   120 					information is provided in a TFilterInformation structure containing the
   121 					following information:
   122 					1) Display name
   123 					2) Data type
   124 					3) Version
   125 					4) UID
   126 					5) Category
   127 					6) Install status
   128 					This method will panic if the iterator has not been initialised using the
   129 					First() method
   130 	@return			A struct containing the current filter information
   131 	@pre 			The iterator has been initialised using the First() method
   132 	@see			TFilterInformation
   133 	*/
   134 	//##ModelId=3C4C0F4500F7
   135 	IMPORT_C const TFilterInformation CurrentFilterInformation() const;
   136 
   137 	/**
   138 	@fn				InstallCurrentFilter() const
   139 	Intended Usage:	This method will install the current filter. This method will panic if a
   140 					current filter is not set.
   141 	@return			KErrNone if the filter installed, KErrAlreadyExists if the filter has
   142 					already been installed, KErrNotFound if the filter cannot be found,
   143 					KErrNotConnected if the ECom plug-in architecture is not connected,
   144 					KErrNoMemory is the filter is not installed due to low memory, or any
   145 					other system-wide error codes.
   146 	@pre 			A current filter has been set and is not already installed
   147 	@post			The filter is installed
   148 	*/
   149 	//##ModelId=3C4C0F4500F6
   150 	IMPORT_C TInt InstallCurrentFilter() const;
   151 
   152 	/**
   153 	@fn				UninstallCurrentFilter() const
   154 	Intended Usage:	This method will uninstall the current filter. This method will panic if
   155 					a current filter is not set.
   156 	@return			KErrNone is the filter uninstalled correctly, KErrNotFound if the filter
   157 					has not already been installed
   158 	@pre 			A current filter has been set and has already been installed
   159 	@post			The filter is uninstalled
   160 	*/
   161 	//##ModelId=3C4C0F4500EF
   162 	IMPORT_C TInt UninstallCurrentFilter() const;
   163 
   164 private: // Methods
   165 	// Friend class
   166 	friend class CHTTPSession;
   167 
   168 	// Friend class for testing purposes
   169 	friend class CFilterConfigurationIterator_UnitTestContext;
   170 
   171 	// Standard default constructor, this is private as it is designed so that only
   172 	// the CHTTPSession object that create it.
   173 	//##ModelId=3C4C0F4500ED
   174 	TFilterConfigurationIterator(CHTTPSession* aSession);
   175 
   176 	// Standard destructor, this is private as it is designed so that only the
   177 	// CHTTPSession object can delete it.
   178 	//##ModelId=3C4C0F4500EC
   179 	~TFilterConfigurationIterator();
   180 
   181 private: // Attributes
   182 	// Pointer to the session implementation. This is not owned.
   183 	//##ModelId=3C4C0F4500DA
   184 	CHTTPSession* iSession;
   185 
   186 	// Pointer array containing all the information for all the filter plugins
   187 	// discovered by ECom. The list is stored and owned by the session. This is
   188 	// not owned.
   189 	//##ModelId=3C4C0F4500D0
   190 	RPointerArray<TSessionFilterInfo>& iFilterInfoList;
   191 
   192 	// Value conatining the index of the current filter in the list
   193 	//##ModelId=3C4C0F4500C6
   194 	TInt iCurrentFilterIndex;
   195 
   196 	// Value containing the number filters in the list
   197 	//##ModelId=3C4C0F4500BC
   198 	TInt iFilterCount;
   199 	};
   200 
   201 #endif // __TFILTERCONFIGURATIONITER_H__