1 /* NAME: 2 E3ErrorManager.h 3 4 DESCRIPTION: 5 Header file for E3ErrorManager.c. 6 7 COPYRIGHT: 8 Copyright (c) 1999-2004, Quesa Developers. All rights reserved. 9 10 For the current release of Quesa, please see: 11 12 <http://www.quesa.org/> 13 14 Redistribution and use in source and binary forms, with or without 15 modification, are permitted provided that the following conditions 16 are met: 17 18 o Redistributions of source code must retain the above copyright 19 notice, this list of conditions and the following disclaimer. 20 21 o Redistributions in binary form must reproduce the above 22 copyright notice, this list of conditions and the following 23 disclaimer in the documentation and/or other materials provided 24 with the distribution. 25 26 o Neither the name of Quesa nor the names of its contributors 27 may be used to endorse or promote products derived from this 28 software without specific prior written permission. 29 30 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 36 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 37 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 38 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 39 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 40 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 ___________________________________________________________________________ 42 */ 43 #ifndef E3ERRORMANAGER_HDR 44 #define E3ERRORMANAGER_HDR 45 //============================================================================= 46 // C++ preamble 47 //----------------------------------------------------------------------------- 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 53 54 55 56 //============================================================================= 57 // Function prototypes 58 //----------------------------------------------------------------------------- 59 // Post an error, warning, notice, or platform error 60 void E3ErrorManager_PostError(TQ3Error theError, TQ3Boolean isFatal); 61 void E3ErrorManager_PostWarning(TQ3Warning theWarning); 62 void E3ErrorManager_PostNotice(TQ3Notice theNotice); 63 void E3ErrorManager_PostPlatformError(TQ3Uns32 theError); 64 65 66 // Get the oldest and latest error, warning, notice, or platform error 67 TQ3Boolean E3ErrorManager_GetIsFatalError(TQ3Error theError); 68 void E3ErrorManager_GetError(TQ3Error *oldestError, TQ3Error *latestError); 69 void E3ErrorManager_GetWarning(TQ3Warning *oldestWarning, TQ3Warning *latestWarning); 70 void E3ErrorManager_GetNotice(TQ3Notice *oldestNotice, TQ3Notice *latestNotice); 71 void E3ErrorManager_GetPlatformError(TQ3Uns32 *oldestPlatform, TQ3Uns32 *latestPlatform); 72 73 74 // Clear the current error, warning, notice, or platform error 75 void E3ErrorManager_ClearError(void); 76 void E3ErrorManager_ClearWarning(void); 77 void E3ErrorManager_ClearNotice(void); 78 void E3ErrorManager_ClearPlatformError(void); 79 80 81 // Get/set error handler callbacks 82 TQ3ErrorMethod E3ErrorManager_GetCallback_Error(void); 83 TQ3WarningMethod E3ErrorManager_GetCallback_Warning(void); 84 TQ3NoticeMethod E3ErrorManager_GetCallback_Notice(void); 85 TQ3ErrorMethod E3ErrorManager_GetCallback_PlatformError(void); 86 87 void E3ErrorManager_SetCallback_Error(TQ3ErrorMethod theCallback, TQ3Uns32 theData); 88 void E3ErrorManager_SetCallback_Warning(TQ3WarningMethod theCallback, TQ3Uns32 theData); 89 void E3ErrorManager_SetCallback_Notice(TQ3NoticeMethod theCallback, TQ3Uns32 theData); 90 void E3ErrorManager_SetCallback_PlatformError(TQ3ErrorMethod theCallback, TQ3Uns32 theData); 91 92 93 94 95 96 //============================================================================= 97 // C++ postamble 98 //----------------------------------------------------------------------------- 99 #ifdef __cplusplus 100 } 101 #endif 102 103 #endif 104 105