imstutils/xmppadapter/inc/xmppadapterlogger.h
changeset 0 5e5d6b214f4f
child 19 76f25fb7a6a1
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     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:  XMPP Logger implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef XMPPADAPTERLOGGER_H
       
    20 #define XMPPADAPTERLOGGER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 //#ifdef _DEBUG
       
    26 #define ENABLE_DEBUG_LOGS
       
    27 //#endif
       
    28 
       
    29 /**   
       
    30 * Usage of Log MACRO'S
       
    31 * _LIT( KExample, "Example" );
       
    32 *  TXT(s) _L(s)	
       
    33 *  LOGGER(TXT("Some text.") );
       
    34 *  LOGGER(TXT("Some text: %d"), 100 );
       
    35 *  LOGGER(TXT("Some text: %S"), &KExample );
       
    36 */
       
    37 
       
    38 _LIT( KTAdaptDebugOutputDir, "xa" );
       
    39 _LIT( KTAdaptDebugOutputFileName, "xa.txt" );
       
    40 const TInt KTAdaptMaxLogLineLength = 250 ;
       
    41 //#ifdef _DEBUG
       
    42 
       
    43 #define TXT(s) _L(s)
       
    44 #define LOGGER TLogger::WriteLog
       
    45 #define PLUGIN_UNUSED_PARAM(p) (void) p
       
    46 //#endif
       
    47 
       
    48 /**
       
    49  * OSS Protocol Adaptation logger.
       
    50  */
       
    51 class TLogger
       
    52     {
       
    53     public: //Logging functions
       
    54 		static void WriteLog( TRefByValue<const TDesC> aFmt,... );
       
    55     private: //Prohibited construtor / destructor
       
    56         TLogger();
       
    57         ~TLogger();
       
    58     };
       
    59 #endif  //XMPPADAPTERLOGGER_H
       
    60 
       
    61 // End of File