contentstorage/casrv/cawidgetscanner/src/cawidgetscannerplugin.cpp
changeset 66 32469d7d46ff
parent 60 f62f87b200ec
child 103 b99b84bcd2d1
equal deleted inserted replaced
61:8e5041d13c84 66:32469d7d46ff
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  
    14 * Description:
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 
    19 
    46     }
    46     }
    47 
    47 
    48 // ============================ MEMBER FUNCTIONS ===============================
    48 // ============================ MEMBER FUNCTIONS ===============================
    49 
    49 
    50 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    51 // CCaWidgetScannerPlugin ::CCaWidgetScannerPlugin 
    51 // CCaWidgetScannerPlugin ::CCaWidgetScannerPlugin
    52 // C++ default constructor can NOT contain any code, that
    52 // C++ default constructor can NOT contain any code, that
    53 // might leave.
    53 // might leave.
    54 // -----------------------------------------------------------------------------
    54 // -----------------------------------------------------------------------------
    55 //
    55 //
    56 CCaWidgetScannerPlugin::CCaWidgetScannerPlugin()
    56 CCaWidgetScannerPlugin::CCaWidgetScannerPlugin()
    63 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
    64 //
    64 //
    65 void CCaWidgetScannerPlugin::ConstructL( TPluginParams* aPluginParams )
    65 void CCaWidgetScannerPlugin::ConstructL( TPluginParams* aPluginParams )
    66     {
    66     {
    67     User::LeaveIfError( iFs.Connect() );
    67     User::LeaveIfError( iFs.Connect() );
    68     iMmcWatcher = CCaWidgetMmcWatcher::NewL( iFs, this );
    68     iMmcWatcher = CCaMmcWatcher::NewL( iFs, this );
    69     iInstallNotifier = CCaWidgetScannerInstallNotifier::NewL( this,
    69     iInstallNotifier = CCaWidgetScannerInstallNotifier::NewL( this,
    70         KUidSystemCategory, KSAUidSoftwareInstallKeyValue );
    70         KUidSystemCategory, KSAUidSoftwareInstallKeyValue );
    71     iParser = CCaWidgetScannerParser::NewL( iFs );
    71     iParser = CCaWidgetScannerParser::NewL( iFs );
    72     iStorageHandler = CCaWidgetStorageHandler::NewL( 
    72     iStorageHandler = CCaWidgetStorageHandler::NewL(
    73             aPluginParams->storageProxy, iFs );
    73             aPluginParams->storageProxy, iFs );
    74     SynchronizeL();
    74     SynchronizeL();
    75     }
    75     }
    76 
    76 
    77 // -----------------------------------------------------------------------------
    77 // -----------------------------------------------------------------------------
    78 // CCaWidgetScannerPlugin ::NewL
    78 // CCaWidgetScannerPlugin ::NewL
    79 // Two-phased constructor.
    79 // Two-phased constructor.
    80 // -----------------------------------------------------------------------------
    80 // -----------------------------------------------------------------------------
    81 //
    81 //
    82 CCaWidgetScannerPlugin * CCaWidgetScannerPlugin::NewL( 
    82 CCaWidgetScannerPlugin * CCaWidgetScannerPlugin::NewL(
    83         TPluginParams* aPluginParams )
    83         TPluginParams* aPluginParams )
    84     {
    84     {
    85     CCaWidgetScannerPlugin * self = NewLC( aPluginParams );
    85     CCaWidgetScannerPlugin * self = NewLC( aPluginParams );
    86     CleanupStack::Pop( self );
    86     CleanupStack::Pop( self );
    87     return self;
    87     return self;
    90 // -----------------------------------------------------------------------------
    90 // -----------------------------------------------------------------------------
    91 // CCaWidgetScannerPlugin ::NewLC
    91 // CCaWidgetScannerPlugin ::NewLC
    92 // Two-phased constructor.
    92 // Two-phased constructor.
    93 // -----------------------------------------------------------------------------
    93 // -----------------------------------------------------------------------------
    94 //
    94 //
    95 CCaWidgetScannerPlugin * CCaWidgetScannerPlugin::NewLC( 
    95 CCaWidgetScannerPlugin * CCaWidgetScannerPlugin::NewLC(
    96         TPluginParams* aPluginParams )
    96         TPluginParams* aPluginParams )
    97     {
    97     {
    98     CCaWidgetScannerPlugin * self = new( ELeave ) CCaWidgetScannerPlugin ( );
    98     CCaWidgetScannerPlugin * self = new( ELeave ) CCaWidgetScannerPlugin ( );
    99     CleanupStack::PushL( self );
    99     CleanupStack::PushL( self );
   100     self->ConstructL( aPluginParams );
   100     self->ConstructL( aPluginParams );
   113     delete iStorageHandler;
   113     delete iStorageHandler;
   114     iFs.Close();
   114     iFs.Close();
   115     }
   115     }
   116 
   116 
   117 // ----------------------------------------------------------------------------
   117 // ----------------------------------------------------------------------------
   118 // 
   118 //
   119 // ----------------------------------------------------------------------------
   119 // ----------------------------------------------------------------------------
   120 //
   120 //
   121 void CCaWidgetScannerPlugin::SynchronizeL()
   121 void CCaWidgetScannerPlugin::SynchronizeL()
   122     {
   122     {
   123     iStorageHandler->SynchronizeL( iParser->WidgetsScanL() );
   123     iStorageHandler->SynchronizeL( iParser->WidgetsScanL() );
   124     }
   124     }
   125   
   125 
   126 // ----------------------------------------------------------------------------
   126 // ----------------------------------------------------------------------------
   127 // 
   127 //
   128 // ----------------------------------------------------------------------------
   128 // ----------------------------------------------------------------------------
   129 //  
   129 //
   130 void CCaWidgetScannerPlugin::MmcChangeL()
   130 void CCaWidgetScannerPlugin::MmcChangeL()
   131     {
   131     {
   132     SynchronizeL();
   132     SynchronizeL();
   133     }
   133     }
   134 
   134