2 * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
27 #ifndef __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__
28 #define __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__
30 #include <ct/mcttokentypefilter.h>
33 struct TCTTokenTypeAttribute;
37 * A filter that returns only those token types that match the required set of
38 * interfaces and attributes.
40 * On construction, an array containing the required interfaces and an array
41 * of required attributes/values is passed in.
43 * Token types will be matched if every interface in the supplied array is supported
44 * by the token type, and every attribute is defined and has the same value.
48 class TCTFindTokenTypesByInterfaceAndAttribute : public MCTTokenTypeFilter
54 * @param aInterfaces An array of Uids corresponding to the interfaces that the
55 * token type must support.
56 * @param aAttributes An array of the attributes and values that must be defined
59 IMPORT_C TCTFindTokenTypesByInterfaceAndAttribute(const TArray<TUid> aInterfaces,
60 const TArray<TCTTokenTypeAttribute> aAttributes);
63 * Tests whether all the interfaces and attributes associated with the filter
64 * are supported by the token type.
66 * @param aTokenType The token type to be tested.
67 * @return ETrue if all the interfaces and attributes associated with the
68 * filter are supported by the token type; EFalse, otherwise.
70 virtual TBool Accept(const CCTTokenTypeInfo& aTokenType) const;
73 const TArray<TUid> iInterfaces;
74 const TArray<TCTTokenTypeAttribute> iAttributes;
78 #endif // __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__