irda/irdastack/irtranp/debug.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <e32svr.h>
       
    17 
       
    18 // The bottom define enables/disables debbuging in the IrTranp Protocol
       
    19 //#define _DEBUGTRANP_
       
    20 
       
    21 #ifndef _DEBUG_H_
       
    22 #define _DEBUG_H_
       
    23 
       
    24 #ifdef _DEBUGTRANP_ // define debug macros
       
    25 	
       
    26 	// These defines enable/disable various levels of debugging
       
    27 	#define DEBUG_COMREADWRITE		// IrComm read write layer
       
    28 	#define DEBUG_SCEP				// SCEP layer
       
    29 	#define DEBUG_BFTP				// BFTP layer
       
    30 	#define DEBUG_SESSION			// Session Layer
       
    31 
       
    32 	#define DEBUG_OPEN() {RDebug::Open();} // Creates connection to Debug port	
       
    33 #else
       
    34 	#define DEBUG_OPEN()
       
    35 #endif  //_DEBUGTRANP_
       
    36 
       
    37 #ifdef DEBUG_SCEP // enables debuging in SCEP layer
       
    38 	#define SCEPPRINT(a) {RDebug::Print(a);}
       
    39 	#define SCEPPRINT_2(a,b) {RDebug::Print(a,b);}
       
    40 	#define SCEPPRINT_3(a,b,c) {RDebug::Print(a,b,c);}
       
    41 #else
       
    42 	#define SCEPPRINT(a)
       
    43 	#define SCEPPRINT_2(a,b)
       
    44 	#define SCEPPRINT_3(a,b,c)
       
    45 #endif //DEBUG_SCEP
       
    46 
       
    47 #ifdef DEBUG_COMREADWRITE
       
    48 	#define COMRWPRINT(a) {RDebug::Print(a);}
       
    49 	#define COMRWPRINT_2(a,b) {RDebug::Print(a,b);}
       
    50 	#define COMRWPRINT_3(a,b,c) {RDebug::Print(a,b,c);}
       
    51 #else
       
    52 	#define COMRWPRINT(a)
       
    53 	#define COMRWPRINT_2(a,b)
       
    54 	#define COMRWPRINT_3(a,b,c)
       
    55 #endif //DEBUG_COMREADWRITE
       
    56 
       
    57 #ifdef DEBUG_BFTP
       
    58 	#define BFTPPRINT(a) {RDebug::Print(a);}
       
    59 #else
       
    60 	#define BFTPPRINT(a)
       
    61 #endif //DEBUG_BFTP
       
    62 
       
    63 #ifdef DEBUG_SESSION
       
    64 	#define SESSIONPRINT(a) {RDebug::Print(a);}
       
    65 	#define SESSIONPRINT_2(a,b) {RDebug::Print(a,b);}
       
    66 #else
       
    67 	#define SESSIONPRINT(a)
       
    68 	#define SESSIONPRINT_2(a,b)
       
    69 #endif //DEBUG_SESSION
       
    70 
       
    71 
       
    72 #endif //_DEBUG_H_