williamr@2: /* williamr@2: * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__ williamr@2: #define __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: williamr@2: struct TCTTokenTypeAttribute; williamr@2: williamr@2: williamr@2: /** williamr@2: * A filter that returns only those token types that match the required set of williamr@2: * interfaces and attributes. williamr@2: * williamr@2: * On construction, an array containing the required interfaces and an array williamr@2: * of required attributes/values is passed in. williamr@2: * williamr@2: * Token types will be matched if every interface in the supplied array is supported williamr@2: * by the token type, and every attribute is defined and has the same value. williamr@2: * williamr@2: * @since v7.0 williamr@2: */ williamr@2: class TCTFindTokenTypesByInterfaceAndAttribute : public MCTTokenTypeFilter williamr@2: { williamr@2: public: williamr@2: /** williamr@2: * Constructor. williamr@2: * williamr@2: * @param aInterfaces An array of Uids corresponding to the interfaces that the williamr@2: * token type must support. williamr@2: * @param aAttributes An array of the attributes and values that must be defined williamr@2: * for the token type. williamr@2: */ williamr@2: IMPORT_C TCTFindTokenTypesByInterfaceAndAttribute(const TArray aInterfaces, williamr@2: const TArray aAttributes); williamr@2: williamr@2: /** williamr@2: * Tests whether all the interfaces and attributes associated with the filter williamr@2: * are supported by the token type. williamr@2: * williamr@2: * @param aTokenType The token type to be tested. williamr@2: * @return ETrue if all the interfaces and attributes associated with the williamr@2: * filter are supported by the token type; EFalse, otherwise. williamr@2: */ williamr@2: virtual TBool Accept(const CCTTokenTypeInfo& aTokenType) const; williamr@2: williamr@2: private: williamr@2: const TArray iInterfaces; williamr@2: const TArray iAttributes; williamr@2: }; williamr@2: williamr@2: williamr@2: #endif // __TCTFINDTOKENTYPESBYINTERFACEANDATTRIBUTE_H__