stif/Logger/inc/HtmlLogger.h
branchRCL_3
changeset 59 8ad140f3dd41
parent 0 a03f92240627
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 CHtmlLogger.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HTMLLOGGER_H
       
    19 #define HTMLLOGGER_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 // CHtmlLogger is a STIF Test Framework StifLogger class.
       
    45 // Class contains a file logging operations.
       
    46 
       
    47 class CHtmlLogger
       
    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 CHtmlLogger* 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         ~CHtmlLogger();
       
    76 
       
    77     public:     // New functions
       
    78 
       
    79         /**
       
    80         * Initialize html page.
       
    81         */
       
    82         void StartHtmlPage( const TDesC& aTestFile, TBool aThreadIdToLogFile );
       
    83 
       
    84         /**
       
    85         * Finalize html page.
       
    86         */
       
    87         void EndHtmlPage();
       
    88 
       
    89         /**
       
    90         * Start style information logging.
       
    91         */
       
    92         void StyleStarting( TInt aStyle, TBool& aTimeStamp,
       
    93                                 TBool& aEventRanking );
       
    94 
       
    95         /**
       
    96         * End style information logging.
       
    97         */
       
    98         void StyleEnding( TInt aStyle );
       
    99 
       
   100         /**
       
   101         * Send style information and data to the output module.
       
   102         * 16 bit.
       
   103         */
       
   104         TInt Send( TInt aStyle, const TDesC& aData );
       
   105 
       
   106         /**
       
   107         * Send style information and data to the output module.
       
   108         * 8 bit.
       
   109         */
       
   110         TInt Send( TInt aStyle, const TDesC8& aData );
       
   111 
       
   112     public:     // Functions from base classes
       
   113 
       
   114     protected:  // New functions
       
   115 
       
   116     protected:  // Functions from base classes
       
   117 
       
   118     private:
       
   119 
       
   120         /**
       
   121         * C++ default constructor.
       
   122         */
       
   123         CHtmlLogger( COutput* output,
       
   124                         const TDesC& aTestFile,
       
   125                         TBool aThreadIdToLogFile );
       
   126 
       
   127         /**
       
   128         * By default Symbian OS constructor is private.
       
   129         */
       
   130         void ConstructL();
       
   131 
       
   132     public:     // Data
       
   133 
       
   134     protected:  // Data
       
   135 
       
   136     private:    // Data
       
   137 
       
   138     public:     // Friend classes
       
   139 
       
   140     protected:  // Friend classes
       
   141 
       
   142     private:    // Friend classes
       
   143 
       
   144     };
       
   145 
       
   146 #endif      // HTMLLOGGER_H
       
   147 
       
   148 // End of File