Objective Systems, Inc.  

ootrace.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2009 by Objective Systems, Inc.
00003  *
00004  * This software is furnished under an open source license and may be
00005  * used and copied only in accordance with the terms of this license.
00006  * The text of the license may generally be found in the root
00007  * directory of this installation in the COPYING file.  It
00008  * can also be viewed online at the following URL:
00009  *
00010  *   http://www.obj-sys.com/open/license.html
00011  *
00012  * Any redistributions of this file including modified versions must
00013  * maintain this copyright notice.
00014  *
00015  *****************************************************************************/
00016 
00021 #include "ooCommon.h"
00022 #ifndef _OOTRACE_H_
00023 #define _OOTRACE_H_
00024 
00025 
00026 /* tracing */
00027 #define OOTRCLVLERR  1
00028 #define OOTRCLVLWARN 2
00029 #define OOTRCLVLINFO 3
00030 #define OOTRCLVLDBGA 4
00031 #define OOTRCLVLDBGB 5
00032 #define OOTRCLVLDBGC 6
00033 
00034 #ifdef _OOWARNING
00035 #define TRACELVL OOTRCLVLWARN
00036 #endif
00037 #ifdef _OOINFO
00038 #define TRACELVL OOTRCLVLINFO
00039 #endif
00040 #ifdef _OODEBUGA
00041 #define TRACELVL OOTRCLVLDBGA
00042 #endif
00043 #ifdef _OODEBUGB
00044 #define TRACELVL OOTRCLVLDBGB
00045 #endif
00046 #ifdef _OODEBUGC
00047 #define TRACELVL OOTRCLVLDBGC
00048 #endif
00049 
00050 /* Ensure we always log error messages */
00051 #ifndef TRACELVL
00052 #define TRACELVL 1
00053 #endif
00054 
00055 #define OOTRACEERR1(a)        ooTrace(OOTRCLVLERR,a)
00056 #define OOTRACEERR2(a,b)      ooTrace(OOTRCLVLERR,a,b)
00057 #define OOTRACEERR3(a,b,c)    ooTrace(OOTRCLVLERR,a,b,c)
00058 #define OOTRACEERR4(a,b,c,d)  ooTrace(OOTRCLVLERR,a,b,c,d)
00059 #define OOTRACEWARN1(a)       ooTrace(OOTRCLVLWARN,a)
00060 #define OOTRACEWARN2(a,b)     ooTrace(OOTRCLVLWARN,a,b)
00061 #define OOTRACEWARN3(a,b,c)   ooTrace(OOTRCLVLWARN,a,b,c)
00062 #define OOTRACEWARN4(a,b,c,d) ooTrace(OOTRCLVLWARN,a,b,c,d)
00063 #define OOTRACEINFO1(a)       ooTrace(OOTRCLVLINFO, a)
00064 #define OOTRACEINFO2(a,b)     ooTrace(OOTRCLVLINFO,a,b)
00065 #define OOTRACEINFO3(a,b,c)   ooTrace(OOTRCLVLINFO,a,b,c)
00066 #define OOTRACEINFO4(a,b,c,d) ooTrace(OOTRCLVLINFO,a,b,c,d)
00067 #define OOTRACEINFO5(a,b,c,d,e) ooTrace(OOTRCLVLINFO,a,b,c,d,e)
00068 #define OOTRACEINFO6(a,b,c,d,e,f) ooTrace(OOTRCLVLINFO,a,b,c,d,e, f)
00069 #ifndef _COMPACT
00070 #define OOTRACEDBGA1(a)       ooTrace(OOTRCLVLDBGA,a)
00071 #define OOTRACEDBGA2(a,b)     ooTrace(OOTRCLVLDBGA,a,b)
00072 #define OOTRACEDBGA3(a,b,c)   ooTrace(OOTRCLVLDBGA,a,b,c)
00073 #define OOTRACEDBGA4(a,b,c,d) ooTrace(OOTRCLVLDBGA,a,b,c,d)
00074 #define OOTRACEDBGA5(a,b,c,d,e) ooTrace(OOTRCLVLDBGA,a,b,c,d,e)
00075 #define OOTRACEDBGB1(a)       ooTrace(OOTRCLVLDBGB,a)
00076 #define OOTRACEDBGB2(a,b)     ooTrace(OOTRCLVLDBGB,a,b)
00077 #define OOTRACEDBGB3(a,b,c)   ooTrace(OOTRCLVLDBGB,a,b,c)
00078 #define OOTRACEDBGB4(a,b,c,d) ooTrace(OOTRCLVLDBGB,a,b,c,d)
00079 #define OOTRACEDBGC1(a)       ooTrace(OOTRCLVLDBGC,a)
00080 #define OOTRACEDBGC2(a,b)     ooTrace(OOTRCLVLDBGC,a,b)
00081 #define OOTRACEDBGC3(a,b,c)   ooTrace(OOTRCLVLDBGC,a,b,c)
00082 #define OOTRACEDBGC4(a,b,c,d) ooTrace(OOTRCLVLDBGC,a,b,c,d)
00083 #define OOTRACEDBGC5(a,b,c,d,e) ooTrace(OOTRCLVLDBGC,a,b,c,d,e)
00084 #else
00085 #define OOTRACEDBGA1(a)
00086 #define OOTRACEDBGA2(a,b)
00087 #define OOTRACEDBGA3(a,b,c)
00088 #define OOTRACEDBGA4(a,b,c,d)
00089 #define OOTRACEDBGA5(a,b,c,d,e)
00090 #define OOTRACEDBGB1(a)
00091 #define OOTRACEDBGB2(a,b)
00092 #define OOTRACEDBGB3(a,b,c)
00093 #define OOTRACEDBGB4(a,b,c,d)
00094 #define OOTRACEDBGC1(a)
00095 #define OOTRACEDBGC2(a,b)
00096 #define OOTRACEDBGC3(a,b,c)
00097 #define OOTRACEDBGC4(a,b,c,d)
00098 #define OOTRACEDBGC5(a,b,c,d,e)
00099 #endif
00100 
00101 #ifdef __cplusplus
00102 extern "C" {
00103 #endif
00104 
00105 #ifndef EXTERN
00106 #ifdef MAKE_DLL
00107 #define EXTERN __declspec(dllexport)
00108 #else
00109 #define EXTERN
00110 #endif /* MAKE_DLL */
00111 #endif /* EXTERN */
00112 
00121 EXTERN void ooSetTraceThreshold(OOUINT32 traceLevel);
00122 
00132 EXTERN void ooTrace(OOUINT32 traceLevel, const char * fmtspec, ...);
00133 
00141 void ooTraceLogMessage(const char * logMessage);
00142 
00146 void ooChangeIPToNWOrder(char * internetIP, char* networkIP);
00147 
00148 int ooLogAsn1Error(int stat, const char * fname, int lno);
00149 #ifdef __cplusplus
00150 }
00151 #endif
00152 #endif

This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1