contentstorage/casrv/causifscanner/src/causifscanner.cpp
changeset 102 8b8b34fa9751
parent 98 d2f833ab7940
child 112 dbfb5e38438b
equal deleted inserted replaced
100:0920c6a9b6c8 102:8b8b34fa9751
    33 // ---------------------------------------------------------------------------
    33 // ---------------------------------------------------------------------------
    34 //
    34 //
    35 CCaUsifScanner* CCaUsifScanner::NewL( TPluginParams* aPluginParams )
    35 CCaUsifScanner* CCaUsifScanner::NewL( TPluginParams* aPluginParams )
    36     {
    36     {
    37     CCaUsifScanner* self = new ( ELeave ) CCaUsifScanner(
    37     CCaUsifScanner* self = new ( ELeave ) CCaUsifScanner(
    38             *aPluginParams->storageProxy );
    38             *aPluginParams->storageProxy, *aPluginParams->softwareRegistry );
    39     CleanupStack::PushL( self );
    39     CleanupStack::PushL( self );
    40     self->ConstructL();
    40     self->ConstructL();
    41     CleanupStack::Pop( self );
    41     CleanupStack::Pop( self );
    42     return self;
    42     return self;
    43     }
    43     }
    44 
    44 
    45 // ---------------------------------------------------------------------------
    45 // ---------------------------------------------------------------------------
    46 //
    46 //
    47 // ---------------------------------------------------------------------------
    47 // ---------------------------------------------------------------------------
    48 //
    48 //
    49 CCaUsifScanner::CCaUsifScanner( CCaStorageProxy& aStorageProxy ) :
    49 CCaUsifScanner::CCaUsifScanner( CCaStorageProxy& aStorageProxy,
    50     iStorageProxy( aStorageProxy )
    50     RSoftwareComponentRegistry& aSoftwareRegistry ) :
       
    51         iStorageProxy( aStorageProxy ), iSoftwareRegistry(aSoftwareRegistry)
    51     {
    52     {
    52     }
    53     }
    53 
    54 
    54 // ---------------------------------------------------------------------------
    55 // ---------------------------------------------------------------------------
    55 //
    56 //
    67                 CCaInstallNotifier::EJavaInstallNotification );
    68                 CCaInstallNotifier::EJavaInstallNotification );
    68 
    69 
    69     User::LeaveIfError( iFs.Connect() );
    70     User::LeaveIfError( iFs.Connect() );
    70     iMmcWatcher = CCaMmcWatcher::NewL( iFs, this );
    71     iMmcWatcher = CCaMmcWatcher::NewL( iFs, this );
    71 
    72 
    72     User::LeaveIfError( iSoftwareRegistry.Connect() );
       
    73 
       
    74     UpdateUsifListL();
    73     UpdateUsifListL();
    75     }
    74     }
    76 
    75 
    77 // ---------------------------------------------------------------------------
    76 // ---------------------------------------------------------------------------
    78 //
    77 //
    79 // ---------------------------------------------------------------------------
    78 // ---------------------------------------------------------------------------
    80 //
    79 //
    81 CCaUsifScanner::~CCaUsifScanner()
    80 CCaUsifScanner::~CCaUsifScanner()
    82     {
    81     {
    83     iSoftwareRegistry.Close();
       
    84     delete iMmcWatcher;
    82     delete iMmcWatcher;
    85     iFs.Close();
    83     iFs.Close();
    86     delete iJavaInstallNotifier;
    84     delete iJavaInstallNotifier;
    87     delete iUsifUninstallNotifier;
    85     delete iUsifUninstallNotifier;
    88     delete iSystemInstallNotifier;
    86     delete iSystemInstallNotifier;