appinstaller/AppMngr2/inc/appmngr2scannerdir.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Manages and watches one directory in CAppMngr2DirScanner 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_APPMNGR2SCANNERDIR_H
       
    20 #define C_APPMNGR2SCANNERDIR_H
       
    21 
       
    22 #include <e32base.h>                    // CActive
       
    23 #include <f32file.h>                    // RFs
       
    24 #include "appmngr2scannerdirobserver.h" // MAppMngr2ScannerDirObserver
       
    25 
       
    26 
       
    27 class CAppMngr2ScannerDir : public CActive
       
    28     {
       
    29 public:     // constructor and destructor
       
    30     static CAppMngr2ScannerDir* NewL( RFs& aFs, const TDesC& aDir,
       
    31             MAppMngr2ScannerDirObserver& aObs );
       
    32     ~CAppMngr2ScannerDir();
       
    33     
       
    34 public:     // new functions
       
    35     const TDesC& DirName() const;
       
    36     void StartWatchingChanges();
       
    37     void StopWatchingChanges();
       
    38 
       
    39 protected:  // from CActive
       
    40     void DoCancel();
       
    41     void RunL();
       
    42     
       
    43 private:    // new functions
       
    44     CAppMngr2ScannerDir( RFs& aFs, MAppMngr2ScannerDirObserver& aObs );
       
    45     void ConstructL( const TDesC& aDir );
       
    46     TPtrC ChopTrailingString( const TDesC& aString, const TDesC& aTrailing );
       
    47 
       
    48 private:    // data
       
    49     MAppMngr2ScannerDirObserver& iObserver;
       
    50     RFs& iFs;
       
    51     HBufC* iDir;
       
    52     };
       
    53 
       
    54 #endif  // C_APPMNGR2SCANNERDIR_H
       
    55