realtimenetprots/sipfw/ClientResolver/common/inc/SIPCRLogs.h
changeset 0 307788aac0a8
child 55 36ea1f90a3d8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-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:
       
    15 * Name          : SIPCRLogs.h
       
    16 * Part of       : SIP Client Resolver
       
    17 * Version       : SIP/4.0
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef SIPCRLOGS_H
       
    29 #define SIPCRLOGS_H
       
    30 
       
    31 #include <e32std.h>
       
    32 
       
    33 #ifdef _DEBUG 
       
    34     // Comment the following line to turn off all kind of logging:
       
    35     #define USE_SIP_CR_LOGS
       
    36 #endif
       
    37 
       
    38 
       
    39 #ifdef USE_SIP_CR_LOGS
       
    40 
       
    41     class SIPCRLog 
       
    42 	    {
       
    43 	    public:
       
    44 
       
    45 	        inline static void Print(const TDesC16& aStr);
       
    46 
       
    47 	        inline static void Print(const TDesC16& aStr1, 
       
    48 	                                 const TDesC8& aStr2);
       
    49 
       
    50 	        inline static void Print(const TDesC16& aStr,
       
    51 	                                 TInt aValue);
       
    52 			private:
       
    53 					inline static TBool LogDirExists( const TDesC& aPath );
       
    54 			
       
    55 					inline static void WriteToFile( const TDesC& aStr );
       
    56 	    };
       
    57 	    
       
    58 	#include "SIPCRLogs.inl"    
       
    59 	                                 
       
    60     #define SIP_CR_LOG( a ) SIPCRLog::Print( _L( a ) );
       
    61     #define SIP_CR_STR_LOG( a, b ) SIPCRLog::Print( _L( a ), b );
       
    62     #define SIP_CR_INT_LOG( a, b ) SIPCRLog::Print( _L( a ), b );
       
    63 
       
    64 #else // _USE_SIP_CR_LOGS
       
    65 
       
    66     #define SIP_CR_LOG( a )
       
    67     #define SIP_CR_STR_LOG( a, b )
       
    68     #define SIP_CR_INT_LOG( a, b )
       
    69 
       
    70 #endif // USE_SIP_CR_LOGS
       
    71 
       
    72 
       
    73 #endif // SIPCRLOGS_H
       
    74 
       
    75 // End of File