146 void CWrtDataPlugin::Stop( TStopReason aReason ) |
146 void CWrtDataPlugin::Stop( TStopReason aReason ) |
147 { |
147 { |
148 if( aReason == EPluginShutdown || |
148 if( aReason == EPluginShutdown || |
149 aReason == ESystemShutdown ) |
149 aReason == ESystemShutdown ) |
150 { |
150 { |
151 TRAP_IGNORE(iData->DeActivateL()); |
151 TRAP_IGNORE(iData->NotifyPublisherL( KDeActive )); |
152 } |
152 } |
153 } |
153 } |
154 |
154 |
155 // ---------------------------------------------------------------------------- |
155 // ---------------------------------------------------------------------------- |
156 // CWrtDataPlugin::Resume |
156 // CWrtDataPlugin::Resume |
161 { |
161 { |
162 if ( aReason == EForeground ) |
162 if ( aReason == EForeground ) |
163 { |
163 { |
164 iPluginState = EResume; |
164 iPluginState = EResume; |
165 |
165 |
166 TRAP_IGNORE( iData->ResumeL() ); |
166 TRAP_IGNORE( iData->NotifyPublisherL( KResume )); |
167 } |
167 } |
168 } |
168 } |
169 |
169 |
170 // ---------------------------------------------------------------------------- |
170 // ---------------------------------------------------------------------------- |
171 // CWrtDataPlugin::Suspend |
171 // CWrtDataPlugin::Suspend |
176 { |
176 { |
177 if ( aReason == EBackground ) |
177 if ( aReason == EBackground ) |
178 { |
178 { |
179 iPluginState = ESuspend; |
179 iPluginState = ESuspend; |
180 |
180 |
181 TRAP_IGNORE ( iData->SuspendL() ); |
181 TRAP_IGNORE ( iData->NotifyPublisherL( KSuspend )); |
182 } |
182 } |
183 } |
183 } |
184 |
184 |
185 // ---------------------------------------------------------------------------- |
185 // ---------------------------------------------------------------------------- |
186 // CWrtDataPlugin::SetOnline |
186 // CWrtDataPlugin::SetOnline |
187 // |
187 // |
188 // ---------------------------------------------------------------------------- |
188 // ---------------------------------------------------------------------------- |
189 // |
189 // |
190 void CWrtDataPlugin::SetOnline() |
190 void CWrtDataPlugin::SetOnline() |
191 { |
191 { |
192 if ( iNetworkStatus != EOnline ) |
192 iNetworkStatus = EOnline; |
193 { |
193 TRAP_IGNORE( iData->NotifyPublisherL( KOnLine )); |
194 iNetworkStatus = EOnline; |
|
195 |
|
196 TRAP_IGNORE( iData->OnLineL() ); |
|
197 } |
|
198 } |
194 } |
199 |
195 |
200 // ---------------------------------------------------------------------------- |
196 // ---------------------------------------------------------------------------- |
201 // CWrtDataPlugin::SetOffline |
197 // CWrtDataPlugin::SetOffline |
202 // |
198 // |
203 // ---------------------------------------------------------------------------- |
199 // ---------------------------------------------------------------------------- |
204 // |
200 // |
205 void CWrtDataPlugin::SetOffline() |
201 void CWrtDataPlugin::SetOffline() |
206 { |
202 { |
207 if ( iNetworkStatus != EOffline ) |
203 iNetworkStatus = EOffline; |
208 { |
204 TRAP_IGNORE( iData->NotifyPublisherL( KOffLine )); |
209 iNetworkStatus = EOffline; |
|
210 |
|
211 TRAP_IGNORE( iData->OffLineL() ); |
|
212 } |
|
213 } |
205 } |
214 |
206 |
215 // ---------------------------------------------------------------------------- |
207 // ---------------------------------------------------------------------------- |
216 // CWrtDataPlugin::SubscribeL |
208 // CWrtDataPlugin::SubscribeL |
217 // |
209 // |
314 |
306 |
315 // Register for notifications |
307 // Register for notifications |
316 iData->RegisterL(); |
308 iData->RegisterL(); |
317 |
309 |
318 // Activate the publisher |
310 // Activate the publisher |
319 iData->ActivateL(); |
311 iData->NotifyPublisherL( KActive ); |
320 } |
312 } |
321 |
313 |
322 settingItemsArr.Reset(); |
314 settingItemsArr.Reset(); |
323 contentItemsArr.Reset(); |
315 contentItemsArr.Reset(); |
324 configurationItemsArr.Reset(); |
316 configurationItemsArr.Reset(); |
325 |
317 |
326 // We own the array so destroy it |
318 // We own the array so destroy it |
327 aSettings.ResetAndDestroy(); |
319 aSettings.ResetAndDestroy(); |
|
320 } |
|
321 |
|
322 // ---------------------------------------------------------------------------- |
|
323 // CWrtDataPlugin::SetProperty |
|
324 // |
|
325 // ---------------------------------------------------------------------------- |
|
326 // |
|
327 void CWrtDataPlugin::SetProperty( TProperty aProperty, TAny* aAny ) |
|
328 { |
|
329 if (aProperty == ECpsCmdBuffer ) |
|
330 { |
|
331 iData->SetCommandBuffer( aAny, PublisherInfo().Namespace() ); |
|
332 } |
328 } |
333 } |
329 |
334 |
330 // ---------------------------------------------------------------------------- |
335 // ---------------------------------------------------------------------------- |
331 // CWrtDataPlugin::GetProperty |
336 // CWrtDataPlugin::GetProperty |
332 // |
337 // |