|
1 /* |
|
2 * Copyright (c) 2002-2004 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef AIFWTESTPLUGIN_H |
|
20 #define AIFWTESTPLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "aicontentpublisher.h" |
|
25 #include "aicontentmodel.h" |
|
26 #include "aipropertyextension.h" |
|
27 #include "aieventhandlerextension.h" |
|
28 #include <aicontentrequest.h> |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // MACROS |
|
33 |
|
34 // DATA TYPES |
|
35 |
|
36 // FUNCTION PROTOTYPES |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 class MAiContentObserver; |
|
40 class MAiContentItemIterator; |
|
41 |
|
42 // CLASS DECLARATION |
|
43 |
|
44 /** |
|
45 * ?one_line_short_description. |
|
46 * ?other_description_lines |
|
47 * |
|
48 * @lib ?library |
|
49 * @since Series ?XX ?SeriesXX_version |
|
50 */ |
|
51 class CAiFwTestContentPlugin : public CAiContentPublisher, |
|
52 public MAiPropertyExtension, |
|
53 public MAiEventHandlerExtension, |
|
54 public MAiContentRequest |
|
55 { |
|
56 public: // Constructors and destructor |
|
57 |
|
58 static CAiFwTestContentPlugin* NewL(); |
|
59 |
|
60 IMPORT_C static CAiFwTestContentPlugin* Instance(); |
|
61 |
|
62 virtual ~CAiFwTestContentPlugin(); |
|
63 |
|
64 public: // from CAiContentPublisher |
|
65 |
|
66 void Resume(TAiTransitionReason aReason); |
|
67 void Suspend(TAiTransitionReason aReason); |
|
68 void Stop(TAiTransitionReason aReason); |
|
69 void SubscribeL(MAiContentObserver& aObserver); |
|
70 void ConfigureL(RAiSettingsItemArray& aSettings); |
|
71 TAny* Extension(TUid aUid); |
|
72 |
|
73 // from base class MAiContentRequest |
|
74 TBool RefreshContent( TInt aContentId ); |
|
75 |
|
76 public: // Test functions |
|
77 |
|
78 IMPORT_C RPointerArray<MAiContentObserver>& Observers(); |
|
79 |
|
80 IMPORT_C TBool WasLoaded(); |
|
81 |
|
82 IMPORT_C TBool WasResumed(); |
|
83 |
|
84 IMPORT_C TBool WasConfigured(); |
|
85 |
|
86 IMPORT_C TBool EventReceived(); |
|
87 |
|
88 IMPORT_C TBool ContentRefreshed(); |
|
89 |
|
90 public: // from MAiPropertyExtension |
|
91 TAny* GetPropertyL(TInt aProperty); |
|
92 void SetPropertyL(TInt aProperty, TAny* aValue); |
|
93 |
|
94 public: // from MAiEventHandlerExtension |
|
95 void HandleEvent(TInt aEvent, const TDesC& aParam); |
|
96 |
|
97 private: |
|
98 CAiFwTestContentPlugin(); |
|
99 void ConstructL(); |
|
100 void LoadEngineL(TAiTransitionReason aReason); |
|
101 static TInt Callback(TAny* aPtr); |
|
102 |
|
103 private: // Data |
|
104 |
|
105 RPointerArray<MAiContentObserver> iObservers; |
|
106 |
|
107 TAiPublisherInfo* iInfo; |
|
108 MAiContentItemIterator* iContent; |
|
109 MAiContentItemIterator* iResources; |
|
110 MAiContentItemIterator* iEvents; |
|
111 |
|
112 CPeriodic* iTicker; |
|
113 |
|
114 TInt iCounter; |
|
115 HBufC8* iText; |
|
116 |
|
117 TBool iContentRefreshed; |
|
118 |
|
119 TBool iPluginLoaded; |
|
120 |
|
121 TBool iPluginResumed; |
|
122 |
|
123 TBool iSettingFound; |
|
124 |
|
125 TBool iEventReceived; |
|
126 TBool i2ndEvent; |
|
127 |
|
128 // Reserved pointer for future extension |
|
129 //TAny* iReserved; |
|
130 |
|
131 }; |
|
132 |
|
133 #endif // ?CLASSNAME_H |
|
134 |
|
135 // End of File. |