epoc32/include/ct/ccttokentypeinfo.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 /**
    22  @file
    23  @publishedPartner
    24  @released
    25 */
    26 
    27 #ifndef __CCTTOKENTYPEINFO_H__
    28 #define __CCTTOKENTYPEINFO_H__
    29 
    30 #include <ct/tctalltokentypes.h>
    31 #include <ct/tcttokentypeattribute.h>
    32 #include <ct/rcpointerarray.h>
    33 class CImplementationInformation;
    34 
    35 
    36 /** 
    37  * Information about a token type.
    38  *
    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(). 
    44  * 
    45  * @since v7.0 
    46  */
    47 class CCTTokenTypeInfo : public CBase
    48 	{
    49  public:
    50 	
    51 	/** 
    52 	 * Lists all the CCTTokenTypeInfo objects that match the filter expression.
    53 	 *
    54 	 * This is the only way of creating CCTTokenTypeInfo objects. 
    55  	 *
    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. 
    61 	 */
    62 	IMPORT_C static void ListL(RCPointerArray<CCTTokenTypeInfo>& aTokenTypes,
    63 							  const MCTTokenTypeFilter& aFilter);
    64 
    65 	/** 
    66 	 * Lists all the CCTTokenTypeInfo objects.
    67 	 *
    68 	 * This version does not take a filter, but returns all token types.
    69 	 *
    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. 
    73 	 */
    74 	IMPORT_C static void ListL(RCPointerArray<CCTTokenTypeInfo>& aTokenTypes);
    75 	
    76 	/** 
    77 	 * Destructor.
    78 	 *
    79 	 * Frees all resources owned by the object. 
    80 	 * @internalAll
    81 	 */
    82 	~CCTTokenTypeInfo();
    83 
    84 	/** 
    85 	 * Gets a list of all interfaces supported by this token type.
    86 	 *
    87 	 * @return	A list of all the interfaces supported by this token type. 
    88 	 */
    89 	IMPORT_C const RArray<TUid>& Interfaces() const;
    90 
    91 	/** 
    92 	 * Gets a list of all attributes of this token type.
    93 	 *
    94 	 * @return	A list of all attributes of this token type. 
    95 	 */
    96 	IMPORT_C const RArray<TCTTokenTypeAttribute>& Attributes() const;
    97 
    98 	/** 
    99 	 * Gets a human-readable name for the token type.
   100 	 *
   101 	 * @return	A human-readable name for the token type. 
   102 	 */
   103 	IMPORT_C const TDesC& Label() const;
   104 
   105 	/** 
   106 	 * Gets the UID of this token type.
   107 	 *
   108 	 * @return	The UID of this token type. 
   109 	 */
   110 	IMPORT_C TUid Type() const;
   111 
   112  private:
   113 	/** Constructor */
   114 	CCTTokenTypeInfo(CImplementationInformation* aEcomImplementationInfo);
   115 
   116  private:
   117 	CImplementationInformation* iEcomImplementationInfo;
   118 	RArray<TUid> iInterfaces;
   119 	RArray<TCTTokenTypeAttribute> iAttributes;
   120 	};
   121 
   122 #endif // __CCTTOKENTYPEINFO_H__