1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: signal.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _OSL_SIGNAL_H_
32 #define _OSL_SIGNAL_H_
34 #include "sal/types.h"
40 #define OSL_SIGNAL_USER_RESERVED 0
42 #define OSL_SIGNAL_USER_RESOURCEFAILURE (OSL_SIGNAL_USER_RESERVED - 1)
43 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
44 #define OSL_SIGNAL_USER_RVPCONNECTIONERROR (OSL_SIGNAL_USER_RESERVED - 3)
46 typedef void* oslSignalHandler
;
52 osl_Signal_AccessViolation
,
53 osl_Signal_IntegerDivideByZero
,
54 osl_Signal_FloatDivideByZero
,
55 osl_Signal_DebugBreak
,
58 osl_Signal_FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
63 osl_Signal_ActCallNextHdl
,
65 osl_Signal_ActAbortApp
,
66 osl_Signal_ActKillApp
,
67 osl_Signal_Act_FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
71 # pragma pack(push, 8)
72 #elif defined(SAL_OS2)
73 # pragma pack(push, 4)
83 #if defined( SAL_W32) || defined(SAL_OS2)
87 /** the function-ptr. representing the signal handler-function.
89 typedef oslSignalAction (SAL_CALL
*oslSignalHandlerFunction
)(void* pData
, oslSignalInfo
* pInfo
);
91 oslSignalHandler SAL_CALL
osl_addSignalHandler(oslSignalHandlerFunction Handler
, void* pData
);
93 sal_Bool SAL_CALL
osl_removeSignalHandler(oslSignalHandler hHandler
);
95 oslSignalAction SAL_CALL
osl_raiseSignal(sal_Int32 UserSignal
, void* UserData
);
97 /** Enables or disables error reporting
99 On default error reporting is enabled after process startup.
102 Enables or disables error reporting.
105 sal_True if previous state of error reporting was enabled<br>
106 sal_False if previous state of error reporting was disbaled<br>
109 sal_Bool SAL_CALL
osl_setErrorReporting( sal_Bool bEnable
);
115 #endif /* _OSL_SIGNAL_H_ */