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.
25 #ifndef __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__
26 #define __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__
28 #include <ct/mcttokentypefilter.h>
31 struct TCTTokenTypeAttribute;
35 * A filter that returns only those token types that match the required set of
36 * interfaces and attributes.
38 * On construction, an array containing the required interfaces and an array
39 * of required attributes/values is passed in.
41 * Token types will be matched if every interface in the supplied array is supported
42 * by the token type, and every attribute is defined and has the same value.
46 class TCTFindTokenTypesByInterfaceAndAttribute : public MCTTokenTypeFilter
52 * @param aInterfaces An array of Uids corresponding to the interfaces that the
53 * token type must support.
54 * @param aAttributes An array of the attributes and values that must be defined
57 IMPORT_C TCTFindTokenTypesByInterfaceAndAttribute(const TArray<TUid> aInterfaces,
58 const TArray<TCTTokenTypeAttribute> aAttributes);
61 * Tests whether all the interfaces and attributes associated with the filter
62 * are supported by the token type.
64 * @param aTokenType The token type to be tested.
65 * @return ETrue if all the interfaces and attributes associated with the
66 * filter are supported by the token type; EFalse, otherwise.
68 virtual TBool Accept(const CCTTokenTypeInfo& aTokenType) const;
71 const TArray<TUid> iInterfaces;
72 const TArray<TCTTokenTypeAttribute> iAttributes;
76 #endif // __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__