1/*----------------------------------------------------------------------------
2 *
3 * File:
4 * eas_report.h
5 *
6 * Contents and purpose:
7 * This file contains the debug message handling routines for the EAS library.
8 * These routines should be modified as needed for your system.
9 *
10 * DO NOT MODIFY THIS FILE!
11 *
12 * Copyright 2005 Sonic Network Inc.
13
14 * Licensed under the Apache License, Version 2.0 (the "License");
15 * you may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 *      http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 *
26 *----------------------------------------------------------------------------
27 * Revision Control:
28 *   $Revision: 82 $
29 *   $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $
30 *----------------------------------------------------------------------------
31*/
32
33/* sentinel */
34#ifndef _EAS_REPORT_H
35#define _EAS_REPORT_H
36
37#define _EAS_SEVERITY_NOFILTER 0
38#define _EAS_SEVERITY_FATAL 1
39#define _EAS_SEVERITY_ERROR 2
40#define _EAS_SEVERITY_WARNING 3
41#define _EAS_SEVERITY_INFO 4
42#define _EAS_SEVERITY_DETAIL 5
43
44/* for C++ linkage */
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49#ifndef _NO_DEBUG_PREPROCESSOR
50
51/* structure for included debug message header files */
52typedef struct
53{
54    unsigned long m_nHashCode;
55    int m_nSerialNum;
56    char *m_pDebugMsg;
57} S_DEBUG_MESSAGES;
58
59/* debug message handling prototypes */
60extern void EAS_ReportEx (int severity, unsigned long hashCode, int serialNum, ...);
61
62#else
63
64/* these prototypes are used if the debug preprocessor is not used */
65extern void EAS_Report (int severity, const char* fmt, ...);
66extern void EAS_ReportX (int severity, const char* fmt, ...);
67
68#endif
69
70extern void EAS_SetDebugLevel (int severity);
71extern void EAS_SetDebugFile (void *file, int flushAfterWrite);
72
73#ifdef __cplusplus
74} /* end extern "C" */
75#endif
76
77#endif
78