filemanager/bkupchecker/inc/filemanagerbkupchecker.h
branchRCL_3
changeset 39 65326cf895ed
parent 0 6a9f87576119
equal deleted inserted replaced
38:491b3ed49290 39:65326cf895ed
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Declaration of CFileManagerBkupChecker class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_FILEMANAGERBKUPCHECKER_H
       
    20 #define C_FILEMANAGERBKUPCHECKER_H
       
    21 
       
    22 #include <aplaunchchecker.h>
       
    23 #include <connect/sbdefs.h>
       
    24 
       
    25 class CResourceFile;
       
    26 
       
    27 using namespace conn;
       
    28 
       
    29 /**
       
    30 *  Plugin for application launch check
       
    31 *
       
    32 *  This class implements rule based application check Plug-in API.
       
    33 *  Application launch is restricted during backup and restore.
       
    34 *  
       
    35 *  @since S60 3.2
       
    36 */
       
    37 NONSHARABLE_CLASS( CFileManagerBkupChecker ) : public CAppLaunchChecker
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Two-phased constructor.
       
    44      */
       
    45 	static CFileManagerBkupChecker* NewL();
       
    46 
       
    47     /**
       
    48      * Destructor
       
    49      */
       
    50 	~CFileManagerBkupChecker();
       
    51 
       
    52     /**
       
    53      * From CApplaunchChecker
       
    54      * Two-phased constructor.
       
    55      *
       
    56      * @since S60 3.2
       
    57      * @param aAppToLaunch Uid of application to launch
       
    58      * @param TApaTaskList List of applications running in device
       
    59      * @return Launch code for apparc
       
    60      */
       
    61 	TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList);
       
    62 
       
    63 private:
       
    64 
       
    65     CFileManagerBkupChecker();
       
    66     
       
    67     void ConstructL();
       
    68     
       
    69     TBool ValidateBUROngoing();
       
    70     
       
    71     static TInt ThreadFunction( TAny* ptr );
       
    72     
       
    73     void ThreadFunctionL();
       
    74 
       
    75 private: // data
       
    76 
       
    77     /**
       
    78      * Array of allowed uids to run.
       
    79      */
       
    80     RArray<TUint32> iUids;
       
    81     
       
    82     /**
       
    83      * Notes shown during backup or restore.
       
    84      * Own
       
    85      */
       
    86     HBufC* iBackupNote;
       
    87     HBufC* iRestoreNote;
       
    88 
       
    89     /**
       
    90      * Ongoing backup or restore.
       
    91      */
       
    92     TBool iIsBackup;
       
    93     };
       
    94 
       
    95 #endif // C_FILEMANAGERBKUPCHECKER_H