MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5debug.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
26 #ifndef _MH5DEBUG_H
27 #define _MH5DEBUG_H
28 
29 /*---includes for this file--------------------------------------------------*/
30 
31 #include "glue_debug.h"
32 
33 #ifdef MHEG5LOG
34 #include "mh5profile.h"
35 #include "mh5base.h"
36 #include "mh5action.h"
37 #include "mh5link.h"
38 #elif defined(TRACING)
39 #include "mh5base.h"
40 #endif /* MHEG5LOG */
41 
42 /*---Constant and macro definitions for public use---------------------------*/
43 
44 #ifdef MHEG5LOG
45 
46 #define MH5LOGFILE "MH5LOG.TXT"
47 
48 /*
49  1 = Log errors only
50  2 = Log errors and warnings
51  3 = Log errors, warnings and messages
52  4 = Log everything
53  */
54 
55 #define MHEG5ERROR 1
56 #define MHEG5WARNING 2
57 #define MHEG5MESSAGE 3
58 #define MHEG5CALLS 4
59 
60 #define CALL_PRINT(x) MHEG5InfoPrintf x
61 #define INFO_PRINT(x) MHEG5InfoPrintf x
62 #define DEBUG_PRINT(x) MHEG5DebugPrintf x
63 #define WARNING_PRINT(x) MHEG5WarningPrintf x
64 #define ERROR_PRINT(x) MHEG5ErrorPrintf x
65 
66 #else /* #ifdef MHEG5LOG */
67 
68 #define CALL_PRINT(x)
69 #define INFO_PRINT(x)
70 #define DEBUG_PRINT(x)
71 
72 #ifndef WARNING_PRINT
73 #define WARNING_PRINT(x)
74 #endif
75 #ifndef ERROR_PRINT
76 #define ERROR_PRINT(x)
77 #endif
78 
79 #endif /* MHEG5LOG */
80 
81 /*---Enumerations for public use---------------------------------------------*/
82 
83 /*---Global type defs for public use-----------------------------------------*/
84 
85 /*---Global variable declarations for public use-----------------------------*/
86 
87 /*---Global Function prototypes for public use-------------------------------*/
88 #ifdef TRACING
89 extern void MHEG5stringTrace(MHEG5String s, char *out, int start, int max);
90 #endif
91 
92 #ifdef MHEG5LOG
93 
101 void MHEG5LogInit(int logLevel);
102 
109 void MHEG5LogPrintAction(int logLevel, MHEG5ElemActionType action);
110 
117 void MHEG5LogPrintEvent(int logLevel, MHEG5EventType event);
118 
126 void MHEG5LogPrintObjectRef(int logLevel, MH5GroupPtr groupName, MHEG5Int sourceID);
127 
134 void MHEG5LogPrintObjectPtr(int logLevel, MHEG5Root *target);
135 
142 void MHEG5LogPrintString(int logLevel, MHEG5String string);
143 
148 void MHEG5LogExit(void);
149 
157 void MHEG5LogPrintf(int logLevel, char *format, ...);
158 
166 void MHEG5InfoPrintf(char *format, ...);
167 
175 void MHEG5DebugPrintf(char *format, ...);
176 
184 void MHEG5WarningPrintf(char *format, ...);
185 
193 void MHEG5ErrorPrintf(char *format, ...);
194 
195 #endif /* #ifdef MHEG5LOG */
196 
197 #endif /*_MH5DEBUG_H*/
Basis MHEG5 data types.
Definition: mh5base.h:82
Debug tracing.
Definition: mh5group.h:47
This file defines the profile for the MHEG engine.
Manage elementary actions Manage a table of all actions and call a specific action which is defined b...
Definition: mh5root.h:43