phonebookui/Phonebook2/ccapplication/ccapp/src/ccapppluginloader.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 15 e8e3147d53eb
child 64 c1e8ba0c2b16
equal deleted inserted replaced
26:0d28c1c5b6dd 32:2828b4d142c0
    21 
    21 
    22 #include <mccaparentcleaner.h>
    22 #include <mccaparentcleaner.h>
    23 #include <mccapluginfactory.h>
    23 #include <mccapluginfactory.h>
    24 
    24 
    25 #include <cpbk2applicationservices.h>
    25 #include <cpbk2applicationservices.h>
       
    26 #include <CPbk2StoreConfiguration.h>
    26 #include <CVPbkContactManager.h>
    27 #include <CVPbkContactManager.h>
    27 #include <MVPbkContactStoreProperties.h>
    28 #include <MVPbkContactStoreProperties.h>
    28 #include <VPbkContactStoreUris.h>
    29 #include <VPbkContactStoreUris.h>
    29 #include <TVPbkContactStoreUriPtr.h>
    30 #include <TVPbkContactStoreUriPtr.h>
    30 #include <MVPbkContactStore.h>
    31 #include <MVPbkContactStore.h>
   129 
   130 
   130     iPluginDataArray.ResetAndDestroy();
   131     iPluginDataArray.ResetAndDestroy();
   131     delete iFactoryTempPtr;
   132     delete iFactoryTempPtr;
   132     CCA_DP( KCCAppLogFile, CCA_L("<-CCCAppPluginData::~CCCAppPluginLoader"));
   133     CCA_DP( KCCAppLogFile, CCA_L("<-CCCAppPluginData::~CCCAppPluginLoader"));
   133     
   134     
       
   135     if(iAppServices)
       
   136         {
       
   137         iAppServices->StoreConfiguration().RemoveObserver(*this);
       
   138         }
   134     Release( iAppServices );
   139     Release( iAppServices );
   135 
   140 
   136     iCommandsResourceFile.Close();
   141     iCommandsResourceFile.Close();
   137     iUiControlsResourceFile.Close();
   142     iUiControlsResourceFile.Close();
   138     iCommonUiResourceFile.Close();
   143     iCommonUiResourceFile.Close();
   369         KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2UiControlsDllResFileName );
   374         KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2UiControlsDllResFileName );
   370     iCommonUiResourceFile.OpenL(
   375     iCommonUiResourceFile.OpenL(
   371         KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2CommonUiDllResFileName );
   376         KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2CommonUiDllResFileName );
   372 
   377 
   373     iAppServices = CPbk2ApplicationServices::InstanceL();
   378     iAppServices = CPbk2ApplicationServices::InstanceL();
       
   379     iAppServices->StoreConfiguration().AddObserverL(*this);    
   374     }
   380     }
   375 
   381 
   376 // ---------------------------------------------------------------------------
   382 // ---------------------------------------------------------------------------
   377 // CCCAppPluginLoader::LoadAllPlugins
   383 // CCCAppPluginLoader::LoadAllPlugins
   378 // ---------------------------------------------------------------------------
   384 // ---------------------------------------------------------------------------
   766 // ---------------------------------------------------------------------------
   772 // ---------------------------------------------------------------------------
   767 //
   773 //
   768 void CCCAppPluginLoader::GetPbksXPExtesionNamesL( RArray<TPtrC>& aPbksXPExtesionNamesArray,
   774 void CCCAppPluginLoader::GetPbksXPExtesionNamesL( RArray<TPtrC>& aPbksXPExtesionNamesArray,
   769         const TDesC& aNameString)
   775         const TDesC& aNameString)
   770     {
   776     {
       
   777     CleanupClosePushL( aPbksXPExtesionNamesArray );
   771     TLex nameString ( aNameString );
   778     TLex nameString ( aNameString );
   772     TChar curChar;
   779     TChar curChar;
   773     nameString.Mark();
   780     nameString.Mark();
   774     while( !nameString.Eos() )
   781     while( !nameString.Eos() )
   775         {
   782         {
   785         else
   792         else
   786             {
   793             {
   787             nameString.Inc();
   794             nameString.Inc();
   788             }
   795             }
   789         }
   796         }
       
   797     CleanupStack::Pop();
   790     }
   798     }
   791 
   799 
   792 // ---------------------------------------------------------------------------
   800 // ---------------------------------------------------------------------------
   793 // CCCAppPluginLoader::LargestOpaqueFromInHousePlugins
   801 // CCCAppPluginLoader::LargestOpaqueFromInHousePlugins
   794 // ---------------------------------------------------------------------------
   802 // ---------------------------------------------------------------------------
  1124         {
  1132         {
  1125         aDataPtr.Set( TPtrC8() );
  1133         aDataPtr.Set( TPtrC8() );
  1126         }
  1134         }
  1127     }
  1135     }
  1128 
  1136 
       
  1137 // ----------------------------------------------------------------------------
       
  1138 // CCCAppPluginLoader::ConfigurationChanged
       
  1139 // ----------------------------------------------------------------------------
       
  1140 //
       
  1141 void CCCAppPluginLoader::ConfigurationChanged()
       
  1142     {
       
  1143     //Special case. Store configuration changed, e.g. store containing current 
       
  1144     //contact removed. So close CCA as current contact may not anymore be available
       
  1145     CAknAppUi* appUi = static_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
       
  1146     TRAP_IGNORE(appUi->HandleCommandL(EAknCmdExit));
       
  1147     }
       
  1148 
       
  1149 // ----------------------------------------------------------------------------
       
  1150 // CCCAppPluginLoader::ConfigurationChangedComplete
       
  1151 // ----------------------------------------------------------------------------
       
  1152 //
       
  1153 void CCCAppPluginLoader::ConfigurationChangedComplete()
       
  1154     {
       
  1155     }
       
  1156 
  1129 // End of File
  1157 // End of File