1 /* |
|
2 * Copyright (c) 2006 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 "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 #ifndef __T_CGSPLUGININTERFACE_H__ |
|
20 #define __T_CGSPLUGININTERFACE_H__ |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include <CEUnitTestSuiteClass.h> |
|
24 #include <EUnitDecorators.h> |
|
25 |
|
26 |
|
27 // INTERNAL INCLUDES |
|
28 #include <GSPluginInterface.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 |
|
33 // CLASS DEFINITION |
|
34 |
|
35 /** |
|
36 * Utility go through all ECOM plugins for a certain interface. |
|
37 */ |
|
38 NONSHARABLE_CLASS( CGSPluginIndexer ) : public CBase |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * @param aInterface Interface Id for which the plugins should be |
|
44 * listed. |
|
45 */ |
|
46 static CGSPluginIndexer* NewL( TUid aInterface ); |
|
47 |
|
48 ~CGSPluginIndexer(); |
|
49 void ConstructL(); |
|
50 |
|
51 /** |
|
52 * @return ETrue if has still items and NextUid() can be called. |
|
53 */ |
|
54 TBool HasNext(); |
|
55 |
|
56 /** |
|
57 * @return Next Uid of the listed plugins. |
|
58 */ |
|
59 TUid NextUid(); |
|
60 |
|
61 /** |
|
62 * Resets the interator location to the first item [0]. |
|
63 */ |
|
64 void ResetIndex(); |
|
65 |
|
66 /** |
|
67 * @return Current position in the list. |
|
68 */ |
|
69 TInt Index(); |
|
70 |
|
71 /** |
|
72 * @return Number of items in the list. |
|
73 */ |
|
74 TInt Count(); |
|
75 |
|
76 private: |
|
77 |
|
78 CGSPluginIndexer( TUid aInterface ); |
|
79 TUid iInterfaceUid; |
|
80 TInt iIndex; |
|
81 RImplInfoPtrArray iImplInfoArray; |
|
82 }; |
|
83 |
|
84 |
|
85 /** |
|
86 * Auto-generated EUnit test suite |
|
87 * |
|
88 */ |
|
89 NONSHARABLE_CLASS( T_CGSPluginInterface ) |
|
90 : public CEUnitTestSuiteClass |
|
91 { |
|
92 public: // Constructors and destructors |
|
93 |
|
94 /** |
|
95 * Two phase construction |
|
96 */ |
|
97 static T_CGSPluginInterface* NewL(); |
|
98 static T_CGSPluginInterface* NewLC(); |
|
99 /** |
|
100 * Destructor |
|
101 */ |
|
102 ~T_CGSPluginInterface(); |
|
103 |
|
104 private: // Constructors and destructors |
|
105 |
|
106 T_CGSPluginInterface(); |
|
107 void ConstructL(); |
|
108 |
|
109 private: // New methods |
|
110 |
|
111 void SetupL(); |
|
112 |
|
113 void Teardown(); |
|
114 |
|
115 /** |
|
116 * Functions for testing memory leaks... |
|
117 */ |
|
118 void T_CGSPluginInterface_CheckHeapL(); |
|
119 void T_CGSPluginInterface_ResetBlacklistL(); |
|
120 void T_CGSPluginInterface_SetToBlacklistL(); |
|
121 |
|
122 void T_CGSPluginInterface__CGSPluginInterfaceL(); |
|
123 |
|
124 void T_CGSPluginInterface_GetCaptionLL(); |
|
125 |
|
126 void T_CGSPluginInterface_GetValueL(); |
|
127 |
|
128 void T_CGSPluginInterface_HandleSelectionL(); |
|
129 |
|
130 void T_CGSPluginInterface_ItemTypeL(); |
|
131 |
|
132 void T_CGSPluginInterface_MenuActivationItemL(); |
|
133 |
|
134 void T_CGSPluginInterface_CreateIconLL(); |
|
135 |
|
136 void T_CGSPluginInterface_PluginProviderCategoryL(); |
|
137 |
|
138 void T_CGSPluginInterface_CustomOperationLL(); |
|
139 |
|
140 void T_CGSPluginInterface_VisibleL(); |
|
141 |
|
142 void T_CGSPluginInterface_ResetSelectedItemIndexL(); |
|
143 |
|
144 void T_CGSPluginInterface_SetOrderL(); |
|
145 |
|
146 |
|
147 private: // Data |
|
148 |
|
149 CGSPluginInterface* iCGSPluginInterface; |
|
150 CGSPluginIndexer* iPluginIndexer; |
|
151 EUNIT_DECLARE_TEST_TABLE; |
|
152 |
|
153 }; |
|
154 |
|
155 #endif // __T_CGSPLUGININTERFACE_H__ |
|
156 |
|
157 // End of file |
|