|
1 /* |
|
2 * Copyright (c) 2002-2005 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 INC_AIFWTESTCONTROLLER2_H |
|
20 #define INC_AIFWTESTCONTROLLER2_H |
|
21 |
|
22 // ========== INCLUDE FILES =================================================== |
|
23 |
|
24 #include <f32file.h> |
|
25 #include "aicontentobserver.h" |
|
26 #include "aipropertyextension.h" |
|
27 #include "AiUiController.h" |
|
28 #include <e32base.h> |
|
29 #include <e32std.h> |
|
30 |
|
31 // ========== CONSTANTS ======================================================= |
|
32 |
|
33 // ========== MACROS ========================================================== |
|
34 |
|
35 // ========== DATA TYPES ====================================================== |
|
36 |
|
37 // ========== FUNCTION PROTOTYPES ============================================= |
|
38 |
|
39 // ========== FORWARD DECLARATIONS ============================================ |
|
40 |
|
41 // ========== CLASS DECLARATION =============================================== |
|
42 |
|
43 /** |
|
44 * ?one_line_short_description. |
|
45 * ?other_description_lines |
|
46 * |
|
47 * @lib ?library |
|
48 * @since Series 60 3.1 |
|
49 */ |
|
50 namespace AiTestUiController2 |
|
51 { |
|
52 class CAiFwTestControllerPlugin2 : public MAiSecondaryUiController, |
|
53 public MAiContentObserver |
|
54 { |
|
55 public: // Constructors and destructor |
|
56 |
|
57 static CAiFwTestControllerPlugin2* NewL(); |
|
58 |
|
59 IMPORT_C static CAiFwTestControllerPlugin2* Instance(); |
|
60 |
|
61 virtual ~CAiFwTestControllerPlugin2(); |
|
62 |
|
63 private: // Constructors |
|
64 |
|
65 CAiFwTestControllerPlugin2(); |
|
66 |
|
67 void ConstructL(); |
|
68 |
|
69 public: // Functions from MAiContentObserver |
|
70 |
|
71 TInt StartTransaction( TInt aTxId ); |
|
72 |
|
73 TInt Commit( TInt aTxId ); |
|
74 |
|
75 TInt CancelTransaction( TInt aTxId ); |
|
76 |
|
77 TBool CanPublish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex ); |
|
78 |
|
79 TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aResource, TInt aIndex ); |
|
80 |
|
81 TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, const TDesC16& aBuf, TInt aIndex ); |
|
82 |
|
83 TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex ); |
|
84 |
|
85 TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent, RFile& aFile, TInt aIndex ); |
|
86 |
|
87 TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex ); |
|
88 |
|
89 TAny* Extension( TUid aUid ); |
|
90 |
|
91 TBool RequiresSubscription( const TAiPublisherInfo& aPublisherInfo ) const; |
|
92 |
|
93 public: // Functions from base classes CAiUiController |
|
94 |
|
95 void LoadUIDefinitionL(); |
|
96 |
|
97 void GetSettingsL(const TAiPublisherInfo& aPubInfo, RAiSettingsItemArray& aSettings); |
|
98 |
|
99 void GetPluginsL( RAiPublisherInfoArray& aPlugins ); |
|
100 |
|
101 void RunApplicationL(); |
|
102 |
|
103 virtual void ActivateUI(); |
|
104 |
|
105 virtual void SetEventHandler(MAiFwEventHandler& aEventHandler); |
|
106 |
|
107 void RemovePluginFromUI( MAiPropertyExtension& aPlugin ) |
|
108 { |
|
109 } |
|
110 |
|
111 virtual MAiContentObserver& GetContentObserver(); |
|
112 |
|
113 MAiMainUiController* MainInterface() |
|
114 { |
|
115 return NULL; |
|
116 }; |
|
117 |
|
118 MAiSecondaryUiController* SecondaryInterface() |
|
119 { |
|
120 return this; |
|
121 }; |
|
122 |
|
123 virtual void SetCoeEnv( CCoeEnv& /*aCoeEnv*/ ) |
|
124 { |
|
125 }; |
|
126 |
|
127 virtual MAiUiFrameworkObserver* UiFrameworkObserver() |
|
128 { |
|
129 return NULL; |
|
130 }; |
|
131 |
|
132 protected: // New functions |
|
133 |
|
134 void SetText(const TDesC8& aId, TPtrC8& aBuf); |
|
135 |
|
136 const TDesC* GetText(const TDesC8& aId); |
|
137 |
|
138 private: // Data |
|
139 |
|
140 TBool iUiActivated; |
|
141 |
|
142 TBool iDefinitionLoaded; |
|
143 |
|
144 MAiFwEventHandler* iFwEventHandler; |
|
145 // Reserved pointer for future extension |
|
146 //TAny* iReserved; |
|
147 }; |
|
148 |
|
149 } // namespace AiTestUiController |
|
150 |
|
151 #endif |
|
152 |
|
153 // End of File. |