idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp
branchRCL_3
changeset 19 edd621764147
parent 16 b276298d5729
child 23 ace62b58f4b2
equal deleted inserted replaced
16:b276298d5729 19:edd621764147
   211 CMCSPluginEngine::~CMCSPluginEngine()
   211 CMCSPluginEngine::~CMCSPluginEngine()
   212     {
   212     {
   213     StopObserving();
   213     StopObserving();
   214 
   214 
   215     delete iPluginData;
   215     delete iPluginData;
   216     
   216 
       
   217     // Notifier close has to be before iMenu close
       
   218     iNotifier.Close();
   217     iMenu.Close();
   219     iMenu.Close();
   218     delete iWatcher;
   220     delete iWatcher;
       
   221     delete iNotifyWatcher;
   219 
   222 
   220     CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
   223     CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
   221 
   224 
   222     delete iUndefinedItem;
   225     delete iUndefinedItem;
   223     }
   226     }
   318 // Returns the actual menu item for the given header.
   321 // Returns the actual menu item for the given header.
   319 // ---------------------------------------------------------------------------
   322 // ---------------------------------------------------------------------------
   320 //
   323 //
   321 CMenuItem* CMCSPluginEngine::FetchMenuItemL( CMCSData& aData )
   324 CMenuItem* CMCSPluginEngine::FetchMenuItemL( CMCSData& aData )
   322     {
   325     {
       
   326     CMenuItem* item = NULL;
   323     if( aData.MenuItem().Type() == KMenuTypeUrl )
   327     if( aData.MenuItem().Type() == KMenuTypeUrl )
   324         {
   328         {
   325         return CreateBkmItemL( aData );
   329         item = CreateBkmItemL( aData );
   326         }
   330         }
   327     else if( aData.MenuItem().Type() == KMenuTypeMailbox )
   331     else if( aData.MenuItem().Type() == KMenuTypeMailbox )
   328         {
   332         {
   329         return CreateMailboxItemL( aData);
   333         item = CreateMailboxItemL( aData);
   330         }
   334         }
   331     else
   335     else
   332         {
   336         {        
   333         CMenuItem* item = NULL;
   337         item = CMenuItem::OpenL( iMenu, aData.MenuItem().Id() );
   334         TRAP_IGNORE( item = CMenuItem::OpenL( iMenu, aData.MenuItem().Id() ) );
   338         }
   335         return item;
   339     
   336         }
   340     return item;
   337     }
   341     }
   338 
   342 
   339 // ---------------------------------------------------------------------------
   343 // ---------------------------------------------------------------------------
   340 // 
   344 // 
   341 // ---------------------------------------------------------------------------
   345 // ---------------------------------------------------------------------------