MHEG5
15.3.0
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * Copyright © 2000 Koninklijke Philips Electronics N.V 00005 * 00006 * This file is part of a DTVKit Software Component 00007 * You are permitted to copy, modify or distribute this file subject to the terms 00008 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00009 * 00010 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00011 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00012 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00013 * 00014 * If you or your organisation is not a member of DTVKit then you have access 00015 * to this source code outside of the terms of the licence agreement 00016 * and you are expected to delete this and any associated files immediately. 00017 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00018 *******************************************************************************/ 00026 #ifndef _MH5DEBUG_H 00027 #define _MH5DEBUG_H 00028 00029 /*---includes for this file--------------------------------------------------*/ 00030 00031 #include "glue_debug.h" 00032 00033 #ifdef MHEG5LOG 00034 #include "mh5profile.h" 00035 #include "mh5base.h" 00036 #include "mh5action.h" 00037 #include "mh5link.h" 00038 #elif defined(TRACING) 00039 #include "mh5base.h" 00040 #endif /* MHEG5LOG */ 00041 00042 /*---Constant and macro definitions for public use---------------------------*/ 00043 00044 #ifdef MHEG5LOG 00045 00046 #define MH5LOGFILE "MH5LOG.TXT" 00047 00048 /* 00049 1 = Log errors only 00050 2 = Log errors and warnings 00051 3 = Log errors, warnings and messages 00052 4 = Log everything 00053 */ 00054 00055 #define MHEG5ERROR 1 00056 #define MHEG5WARNING 2 00057 #define MHEG5MESSAGE 3 00058 #define MHEG5CALLS 4 00059 00060 #define CALL_PRINT(x) MHEG5InfoPrintf x 00061 #define INFO_PRINT(x) MHEG5InfoPrintf x 00062 #define DEBUG_PRINT(x) MHEG5DebugPrintf x 00063 #define WARNING_PRINT(x) MHEG5WarningPrintf x 00064 #define ERROR_PRINT(x) MHEG5ErrorPrintf x 00065 00066 #else /* #ifdef MHEG5LOG */ 00067 00068 #define CALL_PRINT(x) 00069 #define INFO_PRINT(x) 00070 #define DEBUG_PRINT(x) 00071 00072 #ifndef WARNING_PRINT 00073 #define WARNING_PRINT(x) 00074 #endif 00075 #ifndef ERROR_PRINT 00076 #define ERROR_PRINT(x) 00077 #endif 00078 00079 #endif /* MHEG5LOG */ 00080 00081 /*---Enumerations for public use---------------------------------------------*/ 00082 00083 /*---Global type defs for public use-----------------------------------------*/ 00084 00085 /*---Global variable declarations for public use-----------------------------*/ 00086 00087 /*---Global Function prototypes for public use-------------------------------*/ 00088 #ifdef TRACING 00089 extern void MHEG5stringTrace(MHEG5String s, char *out, int start, int max); 00090 #endif 00091 00092 #ifdef MHEG5LOG 00093 00101 void MHEG5LogInit(int logLevel); 00102 00109 void MHEG5LogPrintAction(int logLevel, MHEG5ElemActionType action); 00110 00117 void MHEG5LogPrintEvent(int logLevel, MHEG5EventType event); 00118 00126 void MHEG5LogPrintObjectRef(int logLevel, MH5GroupPtr groupName, MHEG5Int sourceID); 00127 00134 void MHEG5LogPrintObjectPtr(int logLevel, MHEG5Root *target); 00135 00142 void MHEG5LogPrintString(int logLevel, MHEG5String string); 00143 00148 void MHEG5LogExit(void); 00149 00157 void MHEG5LogPrintf(int logLevel, char *format, ...); 00158 00166 void MHEG5InfoPrintf(char *format, ...); 00167 00175 void MHEG5DebugPrintf(char *format, ...); 00176 00184 void MHEG5WarningPrintf(char *format, ...); 00185 00193 void MHEG5ErrorPrintf(char *format, ...); 00194 00195 #endif /* #ifdef MHEG5LOG */ 00196 00197 #endif /*_MH5DEBUG_H*/