csxhelp/src/csxhruntimeappwatcher.cpp
branchRCL_3
changeset 44 12f60d9a73b3
parent 40 0d1adf67ec1b
child 45 cbffe13eac63
--- a/csxhelp/src/csxhruntimeappwatcher.cpp	Thu Aug 19 09:42:56 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  CCSXHRuntimeAppWatcher class definition
-*
-*/
-
-
-#include "csxhruntimeappwatcher.h"
-#include "csxhconstants.h"
-
-// ========================================================================
-// CCSXHRuntimeAppWatcher
-// ========================================================================
-//
-CCSXHRuntimeAppWatcher::CCSXHRuntimeAppWatcher()
-                         : CActive( CActive::EPriorityIdle )
-    {
-    }
-    
-CCSXHRuntimeAppWatcher::~CCSXHRuntimeAppWatcher()
-    {
-    if ( IsActive() )
-        Cancel();
-    iFileSession.Close();
-    }
-    
-CCSXHRuntimeAppWatcher* CCSXHRuntimeAppWatcher::NewL()
-    {
-    CCSXHRuntimeAppWatcher* self = new ( ELeave ) CCSXHRuntimeAppWatcher();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-    
-void CCSXHRuntimeAppWatcher::ConstructL()
-    {
-    CActiveScheduler::Add( this );
-    User::LeaveIfError( iFileSession.Connect() );
-    }
-    
-void CCSXHRuntimeAppWatcher::RunL()
-    {
-    // iStatus equals to KErrNone means completion
-    //
-    if ( iStatus == KErrNone )
-        {
-        iObserver->RuntimeUpdateIndex();
-        Start();
-        }
-        
-    }
-    
-void CCSXHRuntimeAppWatcher::DoCancel()
-    {
-    iFileSession.NotifyChangeCancel( iStatus );
-    }
-    
-void CCSXHRuntimeAppWatcher::Start()
-    {
-    // Requests a notification of change to files or directories
-    // Addition or deletion of a directory entry, or changing or formatting a disk
-    //
-    TBuf<KMaxFileName> obsrvPath;
-    obsrvPath.Append( TChar('?') );
-    obsrvPath.Append( KInstallPath );
-    iFileSession.NotifyChange( ENotifyEntry, iStatus, obsrvPath );
-    
-    // starts
-    SetActive();
-    }
-    
-void CCSXHRuntimeAppWatcher::SetObserver( MInstallationObserver* aObserver )
-    {
-    iObserver = aObserver;
-    }