156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/*---------------------------------------------------------------------------- 256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * 356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * File: 456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * eas_report.h 556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * 656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Contents and purpose: 756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * This file contains the debug message handling routines for the EAS library. 856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * These routines should be modified as needed for your system. 956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * 1056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * DO NOT MODIFY THIS FILE! 1156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * 1256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Copyright 2005 Sonic Network Inc. 137df30109963092559d3760c0661a020f9daf1030The Android Open Source Project 147df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 157df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * you may not use this file except in compliance with the License. 167df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * You may obtain a copy of the License at 177df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 187df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 197df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * 207df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 217df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 227df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 237df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * See the License for the specific language governing permissions and 247df30109963092559d3760c0661a020f9daf1030The Android Open Source Project * limitations under the License. 2556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * 2656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *---------------------------------------------------------------------------- 2756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * Revision Control: 2856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * $Revision: 82 $ 2956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks * $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $ 3056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks *---------------------------------------------------------------------------- 3156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks*/ 3256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 3356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/* sentinel */ 3456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#ifndef _EAS_REPORT_H 3556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_REPORT_H 3656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 3756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_SEVERITY_NOFILTER 0 3856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_SEVERITY_FATAL 1 3956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_SEVERITY_ERROR 2 4056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_SEVERITY_WARNING 3 4156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_SEVERITY_INFO 4 4256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#define _EAS_SEVERITY_DETAIL 5 4356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 4456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/* for C++ linkage */ 4556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#ifdef __cplusplus 4656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparksextern "C" { 4756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#endif 4856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 4956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#ifndef _NO_DEBUG_PREPROCESSOR 5056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 5156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/* structure for included debug message header files */ 5256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparkstypedef struct 5356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks{ 5456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks unsigned long m_nHashCode; 5556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks int m_nSerialNum; 5656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks char *m_pDebugMsg; 5756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks} S_DEBUG_MESSAGES; 5856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 5956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/* debug message handling prototypes */ 6056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparksextern void EAS_ReportEx (int severity, unsigned long hashCode, int serialNum, ...); 6156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 6256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#else 6356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 6456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks/* these prototypes are used if the debug preprocessor is not used */ 6556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparksextern void EAS_Report (int severity, const char* fmt, ...); 6656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparksextern void EAS_ReportX (int severity, const char* fmt, ...); 6756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 6856c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#endif 6956c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 7056c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparksextern void EAS_SetDebugLevel (int severity); 7156c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparksextern void EAS_SetDebugFile (void *file, int flushAfterWrite); 7256c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 7356c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#ifdef __cplusplus 7456c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks} /* end extern "C" */ 7556c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#endif 7656c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks 7756c99cd2c2c1e6ab038dac5fced5b92ccf11ff6cDave Sparks#endif 78