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