LibreOffice: osl/signal.h Source File

LibreOffice LibreOffice 7.0 SDK C/C++ API Reference

signal.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20 #ifndef INCLUDED_OSL_SIGNAL_H
21 #define INCLUDED_OSL_SIGNAL_H
22
23 #include "sal/config.h"
24
25 #include "sal/saldllapi.h"
26 #include "sal/types.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #define OSL_SIGNAL_USER_RESERVED 0
33
34 #define OSL_SIGNAL_USER_RESOURCEFAILURE (OSL_SIGNAL_USER_RESERVED - 1)
35 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
36
37 typedef void* oslSignalHandler;
38
39 typedef enum
40 {
41 osl_Signal_System,
42 osl_Signal_Terminate,
43 osl_Signal_AccessViolation,
44 osl_Signal_IntegerDivideByZero,
45 osl_Signal_FloatDivideByZero,
46 osl_Signal_DebugBreak,
47 osl_Signal_User,
48 osl_Signal_Alarm,
49 osl_Signal_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
50 } oslSignal;
51
52 typedef enum
53 {
54 osl_Signal_ActCallNextHdl,
55 osl_Signal_ActIgnore,
56 osl_Signal_ActAbortApp,
57 osl_Signal_ActKillApp,
58 osl_Signal_Act_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
59 } oslSignalAction;
60
61 #ifdef _WIN32
62 # pragma pack(push, 8)
63 #endif
64
65 typedef struct
66 {
67 oslSignal Signal;
68 sal_Int32 UserSignal;
69 void* UserData;
70 } oslSignalInfo;
71
72 #if defined( _WIN32)
73 # pragma pack(pop)
74 #endif
75
78 typedef oslSignalAction (SAL_CALL *oslSignalHandlerFunction)(void* pData, oslSignalInfo* pInfo);
79
80 SAL_DLLPUBLIC oslSignalHandler SAL_CALL osl_addSignalHandler(
81 oslSignalHandlerFunction Handler, void* pData);
82
83 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_removeSignalHandler(
84 oslSignalHandler hHandler);
85
86 SAL_DLLPUBLIC oslSignalAction SAL_CALL osl_raiseSignal(
87 sal_Int32 UserSignal, void* UserData);
88
99 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setErrorReporting(
100 sal_Bool bEnable );
101
102 #ifdef __cplusplus
103 }
104 #endif
105
106 #endif // INCLUDED_OSL_SIGNAL_H
107
108
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
oslSignalHandlerFunction
oslSignalAction(* oslSignalHandlerFunction)(void *pData, oslSignalInfo *pInfo)
The function-ptr representing the signal handler-function.
Definition: signal.h:78
osl_Signal_DebugBreak
@ osl_Signal_DebugBreak
Definition: signal.h:46
osl_Signal_FORCE_EQUAL_SIZE
@ osl_Signal_FORCE_EQUAL_SIZE
Definition: signal.h:49
osl_raiseSignal
SAL_DLLPUBLIC oslSignalAction osl_raiseSignal(sal_Int32 UserSignal, void *UserData)
oslSignalInfo::Signal
oslSignal Signal
Definition: signal.h:67
osl_Signal_System
@ osl_Signal_System
Definition: signal.h:41
osl_addSignalHandler
SAL_DLLPUBLIC oslSignalHandler osl_addSignalHandler(oslSignalHandlerFunction Handler, void *pData)
saldllapi.h
osl_Signal_IntegerDivideByZero
@ osl_Signal_IntegerDivideByZero
Definition: signal.h:44
osl_Signal_Alarm
@ osl_Signal_Alarm
Definition: signal.h:48
osl_removeSignalHandler
SAL_DLLPUBLIC sal_Bool osl_removeSignalHandler(oslSignalHandler hHandler)
oslSignalHandler
void * oslSignalHandler
Definition: signal.h:37
oslSignalInfo::UserSignal
sal_Int32 UserSignal
Definition: signal.h:68
osl_Signal_ActIgnore
@ osl_Signal_ActIgnore
Definition: signal.h:55
sal_Bool
unsigned char sal_Bool
Definition: types.h:34
config.h
oslSignal
oslSignal
Definition: signal.h:40
osl_Signal_FloatDivideByZero
@ osl_Signal_FloatDivideByZero
Definition: signal.h:45
osl_Signal_Terminate
@ osl_Signal_Terminate
Definition: signal.h:42
osl_Signal_Act_FORCE_EQUAL_SIZE
@ osl_Signal_Act_FORCE_EQUAL_SIZE
Definition: signal.h:58
osl_setErrorReporting
SAL_DLLPUBLIC sal_Bool osl_setErrorReporting(sal_Bool bEnable)
Enables or disables error reporting.
osl_Signal_ActCallNextHdl
@ osl_Signal_ActCallNextHdl
Definition: signal.h:54
oslSignalInfo::UserData
void * UserData
Definition: signal.h:69
types.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
osl_Signal_ActKillApp
@ osl_Signal_ActKillApp
Definition: signal.h:57
oslSignalInfo
Definition: signal.h:66
oslSignalAction
oslSignalAction
Definition: signal.h:53
SAL_MAX_ENUM
#define SAL_MAX_ENUM
Definition: types.h:219
osl_Signal_ActAbortApp
@ osl_Signal_ActAbortApp
Definition: signal.h:56
osl_Signal_User
@ osl_Signal_User
Definition: signal.h:47
osl_Signal_AccessViolation
@ osl_Signal_AccessViolation
Definition: signal.h:43