equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
21 #include <gulicon.h> |
21 #include <gulicon.h> |
22 #include <mcsmenuitem.h> |
22 #include <mcsmenuitem.h> |
23 |
23 |
24 // User includes |
24 // User includes |
25 #include <aicontentobserver.h> |
25 #include <aicontentobserver.h> |
|
26 #include <aistrcnv.h> |
26 #include <aiutility.h> |
27 #include <aiutility.h> |
27 #include <aistrcnv.h> |
|
28 #include "mcspluginuids.hrh" |
28 #include "mcspluginuids.hrh" |
29 #include "mcsplugin.h" |
29 #include "mcsplugin.h" |
30 #include "mcsplugindata.h" |
30 #include "mcsplugindata.h" |
31 #include "mcspluginengine.h" |
31 #include "mcspluginengine.h" |
32 #include "aipluginsettings.h" |
32 #include "aipluginsettings.h" |
148 // CMCSPlugin::PublishLItemL |
148 // CMCSPlugin::PublishLItemL |
149 // Publishes one item to given index |
149 // Publishes one item to given index |
150 // ---------------------------------------------------------------------------- |
150 // ---------------------------------------------------------------------------- |
151 // |
151 // |
152 void CMCSPlugin::PublishLItemL( MAiContentObserver& aObserver, |
152 void CMCSPlugin::PublishLItemL( MAiContentObserver& aObserver, |
153 TMCSData& aData, TInt aIndex ) |
153 CMCSData& aData, TInt aIndex ) |
154 { |
154 { |
155 if( !aData.IsDirty() ) |
155 if( !aData.IsDirty() ) |
156 { |
156 { |
157 return; |
157 return; |
158 } |
158 } |
159 |
159 |
160 CMenuItem* item = NULL; |
160 CMenuItem* item = iEngine->FetchMenuItemL( aData ); |
161 TRAP_IGNORE ( item = iEngine->FetchMenuItemL( aData.MenuItem() ) ); |
|
162 |
|
163 CleanupStack::PushL( item ); |
161 CleanupStack::PushL( item ); |
164 |
162 |
165 // One widget item has iDataCount number of elements |
163 // One widget item has iDataCount number of elements |
166 for ( TInt i = 0; i < iDataCount; i++ ) |
164 for ( TInt i = 0; i < iDataCount; i++ ) |
167 { |
165 { |
195 // ---------------------------------------------------------------------------- |
193 // ---------------------------------------------------------------------------- |
196 // CMCSPlugin::Start |
194 // CMCSPlugin::Start |
197 // |
195 // |
198 // ---------------------------------------------------------------------------- |
196 // ---------------------------------------------------------------------------- |
199 // |
197 // |
200 void CMCSPlugin::Start( TStartReason aReason ) |
198 void CMCSPlugin::Start( TStartReason /*aReason*/ ) |
201 { |
199 { |
202 if ( aReason == EPluginStartup ) |
200 |
203 { |
|
204 TRAP_IGNORE( iEngine->CreateRuntimeMenuItemsL() ); |
|
205 } |
|
206 } |
201 } |
207 |
202 |
208 // ---------------------------------------------------------------------------- |
203 // ---------------------------------------------------------------------------- |
209 // CMCSPlugin::Stop |
204 // CMCSPlugin::Stop |
210 // |
205 // |
211 // ---------------------------------------------------------------------------- |
206 // ---------------------------------------------------------------------------- |
212 // |
207 // |
213 void CMCSPlugin::Stop( TStopReason aReason ) |
208 void CMCSPlugin::Stop( TStopReason /*aReason*/ ) |
214 { |
209 { |
215 if( aReason == EPluginShutdown ) |
210 |
216 { |
|
217 TRAP_IGNORE( iEngine->CleanMCSItemsL() ); |
|
218 } |
|
219 } |
211 } |
220 |
212 |
221 // ---------------------------------------------------------------------------- |
213 // ---------------------------------------------------------------------------- |
222 // CMCSPlugin::Resume |
214 // CMCSPlugin::Resume |
223 // |
215 // |