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