|
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 // ========== INCLUDE FILES =================================================== |
|
20 |
|
21 #include "AiFwTestContentPlugin3.h" |
|
22 #include "AiFwTestDefines.h" |
|
23 #include "AiFwTestContentModel.h" |
|
24 |
|
25 |
|
26 // ========== EXTERNAL DATA STRUCTURES ======================================== |
|
27 |
|
28 // ========== EXTERNAL FUNCTION PROTOTYPES ==================================== |
|
29 |
|
30 // ========== CONSTANTS ======================================================= |
|
31 |
|
32 // ========== MACROS ========================================================== |
|
33 |
|
34 // ========== LOCAL CONSTANTS AND MACROS ====================================== |
|
35 |
|
36 // ========== MODULE DATA STRUCTURES ========================================== |
|
37 |
|
38 // ========== LOCAL FUNCTION PROTOTYPES ======================================= |
|
39 |
|
40 // ========== FORWARD DECLARATIONS ============================================ |
|
41 |
|
42 // ========== LOCAL FUNCTIONS ================================================= |
|
43 |
|
44 // ========== MEMBER FUNCTIONS ================================================ |
|
45 |
|
46 // ---------------------------------------------------------------------------- |
|
47 // |
|
48 // |
|
49 // |
|
50 // ---------------------------------------------------------------------------- |
|
51 // |
|
52 CAiFwTestContentPlugin3::CAiFwTestContentPlugin3() |
|
53 {} |
|
54 |
|
55 // ---------------------------------------------------------------------------- |
|
56 // |
|
57 // |
|
58 // |
|
59 // ---------------------------------------------------------------------------- |
|
60 // |
|
61 void CAiFwTestContentPlugin3::ConstructL() |
|
62 { |
|
63 iInfo = new (ELeave) TAiPublisherInfo; |
|
64 iInfo->iUid.iUid = KImplementationUidAiTestContentPlugin4; |
|
65 iInfo->iName.Copy( _L8( "AiFwTestPlugin3" ) ); |
|
66 } |
|
67 |
|
68 // ---------------------------------------------------------------------------- |
|
69 // |
|
70 // |
|
71 // |
|
72 // ---------------------------------------------------------------------------- |
|
73 // |
|
74 CAiFwTestContentPlugin3* CAiFwTestContentPlugin3::NewL() |
|
75 { |
|
76 CAiFwTestContentPlugin3* self = new (ELeave) CAiFwTestContentPlugin3; |
|
77 |
|
78 CleanupStack::PushL(self); |
|
79 self->ConstructL(); |
|
80 CleanupStack::Pop(); |
|
81 |
|
82 return self; |
|
83 } |
|
84 |
|
85 // ---------------------------------------------------------------------------- |
|
86 // |
|
87 // |
|
88 // |
|
89 // ---------------------------------------------------------------------------- |
|
90 // |
|
91 CAiFwTestContentPlugin3::~CAiFwTestContentPlugin3() |
|
92 { |
|
93 delete iInfo; |
|
94 } |
|
95 |
|
96 // ---------------------------------------------------------------------------- |
|
97 // |
|
98 // |
|
99 // |
|
100 // ---------------------------------------------------------------------------- |
|
101 // |
|
102 TInt CAiFwTestContentPlugin3::Callback(TAny* /*aPtr*/) |
|
103 { |
|
104 return KErrNone; |
|
105 } |
|
106 |
|
107 // ---------------------------------------------------------------------------- |
|
108 // |
|
109 // |
|
110 // |
|
111 // ---------------------------------------------------------------------------- |
|
112 // |
|
113 void CAiFwTestContentPlugin3::Resume(TAiTransitionReason /*aReason*/) |
|
114 { |
|
115 } |
|
116 |
|
117 // ---------------------------------------------------------------------------- |
|
118 // |
|
119 // |
|
120 // |
|
121 // ---------------------------------------------------------------------------- |
|
122 // |
|
123 void CAiFwTestContentPlugin3::Suspend(TAiTransitionReason /*aReason*/) |
|
124 { |
|
125 } |
|
126 |
|
127 // ---------------------------------------------------------------------------- |
|
128 // |
|
129 // |
|
130 // |
|
131 // ---------------------------------------------------------------------------- |
|
132 // |
|
133 void CAiFwTestContentPlugin3::Stop(TAiTransitionReason /*aReason*/) |
|
134 { |
|
135 } |
|
136 |
|
137 // ---------------------------------------------------------------------------- |
|
138 // |
|
139 // |
|
140 // |
|
141 // ---------------------------------------------------------------------------- |
|
142 // |
|
143 void CAiFwTestContentPlugin3::SubscribeL(MAiContentObserver& /*aObserver*/) |
|
144 { |
|
145 } |
|
146 |
|
147 // ---------------------------------------------------------------------------- |
|
148 // |
|
149 // |
|
150 // |
|
151 // ---------------------------------------------------------------------------- |
|
152 // |
|
153 void CAiFwTestContentPlugin3::ConfigureL(RAiSettingsItemArray& aSettings) |
|
154 { |
|
155 aSettings.ResetAndDestroy(); |
|
156 } |
|
157 |
|
158 // ---------------------------------------------------------------------------- |
|
159 // |
|
160 // |
|
161 // |
|
162 // ---------------------------------------------------------------------------- |
|
163 // |
|
164 TAny* CAiFwTestContentPlugin3::Extension(TUid aUid) |
|
165 { |
|
166 if (aUid == KExtensionUidProperty) |
|
167 { |
|
168 return static_cast<MAiPropertyExtension*>(this); |
|
169 } |
|
170 else if (aUid == KExtensionUidEventHandler) |
|
171 { |
|
172 User::Leave( KErrNotSupported ); |
|
173 return static_cast<MAiEventHandlerExtension*>(this); |
|
174 } |
|
175 return NULL; |
|
176 } |
|
177 |
|
178 // ---------------------------------------------------------------------------- |
|
179 // |
|
180 // |
|
181 // |
|
182 // ---------------------------------------------------------------------------- |
|
183 // |
|
184 TAny* CAiFwTestContentPlugin3::GetPropertyL(TInt aProperty) |
|
185 { |
|
186 if( aProperty == EAiPublisherInfo ) |
|
187 { |
|
188 return iInfo; |
|
189 } |
|
190 return NULL; |
|
191 } |
|
192 |
|
193 // ---------------------------------------------------------------------------- |
|
194 // |
|
195 // |
|
196 // |
|
197 // ---------------------------------------------------------------------------- |
|
198 // |
|
199 void CAiFwTestContentPlugin3::SetPropertyL(TInt aProperty, TAny* aValue) |
|
200 { |
|
201 if( aValue ) |
|
202 { |
|
203 switch( aProperty ) |
|
204 { |
|
205 case EAiPublisherInfo: |
|
206 { |
|
207 return; |
|
208 } |
|
209 } |
|
210 } |
|
211 User::Leave(KErrNotSupported); |
|
212 } |
|
213 |
|
214 // ---------------------------------------------------------------------------- |
|
215 // |
|
216 // |
|
217 // |
|
218 // ---------------------------------------------------------------------------- |
|
219 // |
|
220 void CAiFwTestContentPlugin3::HandleEvent(TInt /*aEvent*/, const TDesC& /*aParam*/) |
|
221 { |
|
222 } |
|
223 |
|
224 // ========== OTHER EXPORTED FUNCTIONS ======================================== |
|
225 |
|
226 // End of File. |