idlefw/plugins/mcsplugin/publisher/src/mcspluginengine.cpp
branchRCL_3
changeset 11 bd874ee5e5e2
parent 8 d0529222e3f0
child 12 502e5d91ad42
equal deleted inserted replaced
8:d0529222e3f0 11:bd874ee5e5e2
   137     iUndefinedItemHeader = FindMenuItemL( *filter );
   137     iUndefinedItemHeader = FindMenuItemL( *filter );
   138     CleanupStack::PopAndDestroy( filter );
   138     CleanupStack::PopAndDestroy( filter );
   139     filter = NULL;
   139     filter = NULL;
   140     iUndefinedItem = CMenuItem::OpenL( iMenu, iUndefinedItemHeader );    
   140     iUndefinedItem = CMenuItem::OpenL( iMenu, iUndefinedItemHeader );    
   141     }
   141     }
   142     
   142 
   143 // ----------------------------------------------------------------------------
   143 // ----------------------------------------------------------------------------
   144 // CMCSPluginEngine::~CMCSPluginEngine
   144 // CMCSPluginEngine::~CMCSPluginEngine
   145 //
   145 //
   146 // ----------------------------------------------------------------------------
   146 // ----------------------------------------------------------------------------
   147 //
   147 //
   148 CMCSPluginEngine::~CMCSPluginEngine()
   148 CMCSPluginEngine::~CMCSPluginEngine()
   149     {
   149     {
   150     StopObserving();
   150     StopObserving();
   151     
   151 
   152     delete iPluginData;
   152     delete iPluginData;
   153     iNotifier.Close();
   153     
   154     iMenu.Close();
   154     iMenu.Close();
   155     //iWatcher->Cancel();
   155     //iWatcher->Cancel();
   156     delete iWatcher;
   156     delete iWatcher;
   157     delete iNotifyWatcher;
   157     
   158 
   158 
   159     CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
   159     CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
   160         
   160 
   161     if ( iUndefinedItem )
   161     if ( iUndefinedItem )
   162         {
   162         {
   163         delete iUndefinedItem;
   163         delete iUndefinedItem;
   164         iUndefinedItem = NULL;
   164         iUndefinedItem = NULL;
   165         }    
   165         }
   166     }
   166     }
   167 
   167 
   168 // ---------------------------------------------------------------------------
   168 // ---------------------------------------------------------------------------
   169 // CMCSPluginEngine::InitL
   169 // CMCSPluginEngine::InitL
   170 //
   170 //
   730 // and deletes those which have reference counter == 0
   730 // and deletes those which have reference counter == 0
   731 // ---------------------------------------------------------------------------
   731 // ---------------------------------------------------------------------------
   732 //
   732 //
   733 void CMCSPluginEngine::CleanMCSItemsL()
   733 void CMCSPluginEngine::CleanMCSItemsL()
   734     {
   734     {
       
   735     iNotifier.Close();
       
   736     delete iNotifyWatcher;
       
   737     iNotifyWatcher = NULL;
       
   738 
   735     const TInt count( iPluginData->DataCount() );
   739     const TInt count( iPluginData->DataCount() );
   736     
   740     
   737     for( TInt i = 0; i < count; i++ )
   741     for( TInt i = 0; i < count; i++ )
   738         {
   742         {
   739         TMCSData& data( iPluginData->DataItemL(i) );
   743         TMCSData& data( iPluginData->DataItemL(i) );
   827         }
   831         }
   828     
   832     
   829     return -1;
   833     return -1;
   830     }
   834     }
   831 
   835 
       
   836 // ---------------------------------------------------------------------------
       
   837 // Creates bookmark menu item if it does not exist
       
   838 // ---------------------------------------------------------------------------
       
   839 //
       
   840 void CMCSPluginEngine::CreateBkmMenuItemsL()
       
   841     {
       
   842     iPluginData->CreateBkmMenuItemsL();
       
   843     }
       
   844 
   832 // End of file
   845 // End of file
   833 
   846