testexecfw/stf/stffw/logger/STFLoggingServer/inc/HtmlLogger.h
changeset 2 8bb370ba6d1d
equal deleted inserted replaced
1:bbd31066657e 2:8bb370ba6d1d
       
     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 "StifLoggerBase.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 StifLoggerBase class.
       
    45 // Class contains a file logging operations.
       
    46 
       
    47 class CHtmlLogger
       
    48             :public CStifLoggerBase
       
    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                                     CStifLogger::TLoggerType aLoggerType,
       
    62                                     CStifLogger::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                                     TInt aThreadId);
       
    72 
       
    73         /**
       
    74         * Destructor.
       
    75         */
       
    76         ~CHtmlLogger();
       
    77 
       
    78     public:     // New functions
       
    79 
       
    80         /**
       
    81         * Initialize html page.
       
    82         */
       
    83         void StartHtmlPage( const TDesC& aTestFile, TBool aThreadIdToLogFile );
       
    84 
       
    85         /**
       
    86         * Finalize html page.
       
    87         */
       
    88         void EndHtmlPage();
       
    89 
       
    90         /**
       
    91         * Start style information logging.
       
    92         */
       
    93         void StyleStarting( TInt aStyle, TBool& aTimeStamp,
       
    94                                 TBool& aEventRanking );
       
    95 
       
    96         /**
       
    97         * End style information logging.
       
    98         */
       
    99         void StyleEnding( TInt aStyle );
       
   100 
       
   101         /**
       
   102         * Send style information and data to the output module.
       
   103         * 16 bit.
       
   104         */
       
   105         TInt Send( TInt aStyle, const TDesC& aData );
       
   106 
       
   107         /**
       
   108         * Send style information and data to the output module.
       
   109         * 8 bit.
       
   110         */
       
   111         TInt Send( TInt aStyle, const TDesC8& aData );
       
   112 
       
   113     public:     // Functions from base classes
       
   114 
       
   115     protected:  // New functions
       
   116 
       
   117     protected:  // Functions from base classes
       
   118 
       
   119     private:
       
   120 
       
   121         /**
       
   122         * C++ default constructor.
       
   123         */
       
   124         CHtmlLogger( COutput* output,
       
   125                         const TDesC& aTestFile,
       
   126                         TBool aThreadIdToLogFile );
       
   127 
       
   128         /**
       
   129         * By default Symbian OS constructor is private.
       
   130         */
       
   131         void ConstructL();
       
   132 
       
   133     public:     // Data
       
   134 
       
   135     protected:  // Data
       
   136 
       
   137     private:    // Data
       
   138 
       
   139     public:     // Friend classes
       
   140 
       
   141     protected:  // Friend classes
       
   142 
       
   143     private:    // Friend classes
       
   144 
       
   145     };
       
   146 
       
   147 #endif      // HTMLLOGGER_H
       
   148 
       
   149 // End of File