videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/inc/CIptvTestMobilecrashWatcher.h
branchRCL_3
changeset 47 826cea16efd9
parent 45 798ee5f1972c
child 48 13a33d82ad98
equal deleted inserted replaced
45:798ee5f1972c 47:826cea16efd9
     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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CIPTVTESTMOBILECRASHWATCHER_H
       
    22 #define CIPTVTESTMOBILECRASHWATCHER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <e32cmn.h> // RArray
       
    27 #include <f32file.h> // RFs
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 
       
    43 /**
       
    44 *
       
    45 *
       
    46 *
       
    47 *
       
    48 *  @since
       
    49 */
       
    50 class CIptvTestMobilecrashWatcher : public CBase
       
    51     {
       
    52     public:  // Constructors and destructor
       
    53 
       
    54 
       
    55         /**
       
    56         * Two-phased constructor.
       
    57         * This has iPanicEnabled member set ETrue which will cause panic in destructor if there's new mobilecrashes
       
    58         */
       
    59         IMPORT_C static CIptvTestMobilecrashWatcher* NewL();
       
    60 
       
    61         /**
       
    62         * Two-phased constructor.
       
    63         */
       
    64         IMPORT_C static CIptvTestMobilecrashWatcher* NewL(TBool aPanicEnabled);
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         IMPORT_C virtual ~CIptvTestMobilecrashWatcher();
       
    70 
       
    71 
       
    72     public: // New functions
       
    73 
       
    74 		/**
       
    75         * Reads all mobilecrashes in c:\data and e:\ directories.
       
    76         * @since
       
    77         * @param aCrashes list of mobilecrash files are stored into here
       
    78         * @return
       
    79         */
       
    80 		void ReadMobilecrashesL( RPointerArray<HBufC>& aCrashes, const TDesC& aDrive );
       
    81 
       
    82     	/**
       
    83         * Compares the two arrays of filenames and reports new files in aCrashesNow and causes a panic.
       
    84         * @since
       
    85         * @param aCrashesBefore old filelist
       
    86         * @param aCrashesNow new filelist
       
    87         * @return ETrue if new mobilecrashes are found, otherwise EFalse
       
    88         */
       
    89 		IMPORT_C TBool CompareMobilecrashesL(RPointerArray<HBufC>& aCrashesBefore, RPointerArray<HBufC>& aCrashesNow);
       
    90 
       
    91     	/**
       
    92         * Checks for new mobilecrashes. Panics if found.
       
    93         * @since
       
    94         * @param
       
    95         * @return
       
    96         */
       
    97 		IMPORT_C void CheckNewCrashesL();
       
    98 
       
    99 		/**
       
   100         * Checks for new mobilecrashes.
       
   101         * @since
       
   102         * @param aArray is populated of the new mobilecrashes.
       
   103         * @return EFalse if new mobilecrashes are not found. ETrue if found.
       
   104         */
       
   105 		IMPORT_C TBool ReturnNewCrashes(RPointerArray<HBufC>& aArray);
       
   106 
       
   107 		/**
       
   108         * Returns the count of mobilecrashes in c:\\data and e:\\
       
   109         * @since
       
   110         * @param
       
   111         * @return Count of mobilecrashes in c:\\data and e:\\
       
   112         */
       
   113 		IMPORT_C TInt ReturnMobileCrashCount();
       
   114 
       
   115     protected: //from base classes
       
   116 
       
   117 
       
   118     private:
       
   119 
       
   120         /**
       
   121         * C++ default constructor.
       
   122         */
       
   123         CIptvTestMobilecrashWatcher();
       
   124 
       
   125         /**
       
   126         * By default Symbian 2nd phase constructor is private.
       
   127         */
       
   128         void ConstructL(TBool aPanicEnabled);
       
   129 
       
   130     private:    // Data
       
   131 		// If ETrue and new mobilecrashes are found then a panic will be thrown in destructor
       
   132 		TBool iPanicEnabled;
       
   133 
       
   134 		// File system session
       
   135 		RFs iFsSession;
       
   136 
       
   137 		RPointerArray<HBufC> iCrashesBefore;
       
   138 
       
   139 		RPointerArray<HBufC> iCrashesNow;
       
   140     };
       
   141 
       
   142 
       
   143 #endif      // CIPTVTESTMOBILECRASHWATCHER_H
       
   144 
       
   145 // End of File