stif/Logger/inc/DataLogger.h
branchRCL_3
changeset 59 8ad140f3dd41
equal deleted inserted replaced
49:7fdc9a71d314 59:8ad140f3dd41
       
     1 /*
       
     2 * Copyright (c) 2009 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: This file contains the header file of the CDataLogger.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DATALOGGER_H
       
    19 #define DATALOGGER_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "StifLogger.h"
       
    23 #include "FileOutput.h"
       
    24 #include "RDebugOutput.h"
       
    25 
       
    26 // CONSTANTS
       
    27 // None
       
    28 
       
    29 // MACROS
       
    30 // None
       
    31 
       
    32 // DATA TYPES
       
    33 // None
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 // None
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class COutput;
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 // DESCRIPTION
       
    44 // CDataLogger is a STIF Test Framework StifLogger class.
       
    45 // Class contains a file logging operations.
       
    46 
       
    47 class CDataLogger
       
    48             :public CStifLogger
       
    49     {
       
    50     public:     // Enumerations
       
    51 
       
    52     private:    // Enumerations
       
    53 
       
    54     public:     // Constructors and destructor
       
    55 
       
    56         /**
       
    57         * Two-phased constructor.
       
    58         */
       
    59         static CDataLogger* NewL( const TDesC& aTestPath,
       
    60                                     const TDesC& aTestFile,
       
    61                                     TLoggerType aLoggerType,
       
    62                                     TOutput aOutput,
       
    63                                     TBool aOverWrite,
       
    64                                     TBool aWithTimeStamp,
       
    65                                     TBool aWithLineBreak,
       
    66                                     TBool aWithEventRanking,
       
    67                                     TBool aThreadIdToLogFile,
       
    68                                     TBool aCreateLogDir,
       
    69                                     TInt aStaticBufferSize,
       
    70                                     TBool aUnicode );
       
    71 
       
    72         /**
       
    73         * Destructor.
       
    74         */
       
    75         ~CDataLogger();
       
    76 
       
    77     public:     // New functions
       
    78 
       
    79         /**
       
    80         * Sent data to the output module. 16 bit. 
       
    81         * aStyle parameter is not supporter in data logging.
       
    82         */
       
    83         TInt Send( TInt /*aStyle*/, const TDesC& aData );
       
    84 
       
    85         /**
       
    86         * Sent data to the output module. 8 bit.
       
    87         * aStyle parameter is not supporter in data logging.
       
    88         */
       
    89         TInt Send( TInt /*aStyle*/, const TDesC8& aData );
       
    90 
       
    91     public:     // Functions from base classes
       
    92 
       
    93     protected:  // New functions
       
    94 
       
    95     protected:  // Functions from base classes
       
    96 
       
    97     private:
       
    98 
       
    99         /**
       
   100         * C++ default constructor.
       
   101         */
       
   102         CDataLogger( COutput* output );
       
   103 
       
   104         /**
       
   105         * By default Symbian OS constructor is private.
       
   106         */
       
   107         void ConstructL();
       
   108 
       
   109     public:     // Data
       
   110 
       
   111     protected:  // Data
       
   112 
       
   113     private:    // Data
       
   114 
       
   115     public:     // Friend classes
       
   116 
       
   117     protected:  // Friend classes
       
   118 
       
   119     private:    // Friend classes
       
   120 
       
   121     };
       
   122 
       
   123 #endif      // DATALOGGER_H
       
   124 
       
   125 // End of File