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 __CCTTOKENTYPEINFO_H__
28 #define __CCTTOKENTYPEINFO_H__
30 #include <ct/tctalltokentypes.h>
31 #include <ct/tcttokentypeattribute.h>
32 #include <ct/rcpointerarray.h>
33 class CImplementationInformation;
37 * Information about a token type.
39 * A list of CCTTokenTypeInfo objects can be obtained using the static ListL()
40 * functions. Each CCTTokenTypeInfo object has a list of interfaces it supports,
41 * a list of TCTTokenTypeAttribute objects associated with it, and a label. Based
42 * on this, the client (or the user via a UI) can chose the required token type
43 * and load it via CCTTokenType::NewL().
47 class CCTTokenTypeInfo : public CBase
52 * Lists all the CCTTokenTypeInfo objects that match the filter expression.
54 * This is the only way of creating CCTTokenTypeInfo objects.
56 * @param aTokenTypes An array to which the found token types will be appended.
57 * Ownership of the CCTTokenTypeInfo objects, whose pointers
58 * are held by the array, are transferred to the caller.
59 * @param aFilter An object that is used to filter tokens, by being offered each
60 * token in turn and declining the ones that are not required.
62 IMPORT_C static void ListL(RCPointerArray<CCTTokenTypeInfo>& aTokenTypes,
63 const MCTTokenTypeFilter& aFilter);
66 * Lists all the CCTTokenTypeInfo objects.
68 * This version does not take a filter, but returns all token types.
70 * @param aTokenTypes An array to which the found token types will be appended.
71 * Ownership of the CCTTokenTypeInfo objects, whose pointers
72 * are held by the array, are transferred to the caller.
74 IMPORT_C static void ListL(RCPointerArray<CCTTokenTypeInfo>& aTokenTypes);
79 * Frees all resources owned by the object.
85 * Gets a list of all interfaces supported by this token type.
87 * @return A list of all the interfaces supported by this token type.
89 IMPORT_C const RArray<TUid>& Interfaces() const;
92 * Gets a list of all attributes of this token type.
94 * @return A list of all attributes of this token type.
96 IMPORT_C const RArray<TCTTokenTypeAttribute>& Attributes() const;
99 * Gets a human-readable name for the token type.
101 * @return A human-readable name for the token type.
103 IMPORT_C const TDesC& Label() const;
106 * Gets the UID of this token type.
108 * @return The UID of this token type.
110 IMPORT_C TUid Type() const;
114 CCTTokenTypeInfo(CImplementationInformation* aEcomImplementationInfo);
117 CImplementationInformation* iEcomImplementationInfo;
118 RArray<TUid> iInterfaces;
119 RArray<TCTTokenTypeAttribute> iAttributes;
122 #endif // __CCTTOKENTYPEINFO_H__