meetingui/inc/ICalUILog.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2005 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:  
       
    15 *     Logging class
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef ICalUILog_H
       
    23 #define ICalUILog_H
       
    24 
       
    25 /////////////////////////////////////////////////////////////////////////////
       
    26 // #Defines that control printing of additional information to debug stream.
       
    27 /////////////////////////////////////////////////////////////////////////////
       
    28 
       
    29 // INCLUDES
       
    30 
       
    31 #include "ICalUILogDef.h"
       
    32 #include <e32std.h>
       
    33 
       
    34 // DEFINES
       
    35 
       
    36 #ifdef ICALUI_ENABLE_LOGGING
       
    37 
       
    38     /// The format in which the time is formatted in log
       
    39     _LIT( KLogTimeFormat, "%02d.%02d:%02d:%06d ");
       
    40     /// The length of the string produced by KLogTimeFormat
       
    41     const TInt KLogTimeFormatLength = 16;
       
    42 
       
    43     #define LOG(s) ICalUILog::Log(_L(s))
       
    44     #define LOG1(s, v) ICalUILog::Log( _L(s), v )
       
    45     #define LOG2(s, v1, v2) ICalUILog::Log( _L(s), v1, v2 )
       
    46     #define MRDATA_LOG(s) ICalUILog::Log(_L(s))
       
    47     #define MRDATA_LOG1(s, v) ICalUILog::Log( _L(s), v )
       
    48     #define MRDATA_LOG2(s, v1, v2) ICalUILog::Log( _L(s), v1, v2 )
       
    49     
       
    50 #else
       
    51 
       
    52     #define LOG(s)
       
    53     #define LOG1(s, v)
       
    54     #define LOG2(s, v1, v2)
       
    55 
       
    56 #endif // ICALUI_ENABLE_LOGGING
       
    57 
       
    58 // CLASS DECLARATION
       
    59 
       
    60 /**
       
    61 * Class offers logging functionality.
       
    62 */
       
    63 class ICalUILog
       
    64     {
       
    65     public:
       
    66 
       
    67         /**
       
    68         * Log the message.
       
    69 		* @param aText text to be written to log.
       
    70         */
       
    71         static void Log( TRefByValue<const TDesC> aText, ... );
       
    72 
       
    73     private: // constructor
       
    74 
       
    75 		/// Prohibited default constructor
       
    76 		ICalUILog();
       
    77 
       
    78 		/// Prohibited copy constructor
       
    79 		ICalUILog( const ICalUILog& );
       
    80 
       
    81 		/// Prohibited assignment operator
       
    82 		ICalUILog& operator=( const ICalUILog& );
       
    83     };
       
    84 
       
    85 #endif // ICalUILog_H
       
    86 
       
    87 //  End of File