LibreOffice
LibreOffice 5.1 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 #define OSL_SIGNAL_USER_RVPCONNECTIONERROR (OSL_SIGNAL_USER_RESERVED - 3)
37 
38 typedef void* oslSignalHandler;
39 
40 typedef enum
41 {
51 } oslSignal;
52 
53 typedef enum
54 {
61 
62 #ifdef SAL_W32
63 # pragma pack(push, 8)
64 #endif
65 
66 typedef struct
67 {
68  oslSignal Signal;
69  sal_Int32 UserSignal;
70  void* UserData;
72 
73 #if defined( SAL_W32)
74 # pragma pack(pop)
75 #endif
76 
79 typedef oslSignalAction (SAL_CALL *oslSignalHandlerFunction)(void* pData, oslSignalInfo* pInfo);
80 
81 SAL_DLLPUBLIC oslSignalHandler SAL_CALL osl_addSignalHandler(
82  oslSignalHandlerFunction Handler, void* pData);
83 
85  oslSignalHandler hHandler);
86 
87 SAL_DLLPUBLIC oslSignalAction SAL_CALL osl_raiseSignal(
88  sal_Int32 UserSignal, void* UserData);
89 
103  sal_Bool bEnable );
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif // INCLUDED_OSL_SIGNAL_H
110 
111 
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void * UserData
Definition: signal.h:70
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
oslSignalAction(* oslSignalHandlerFunction)(void *pData, oslSignalInfo *pInfo)
the function-ptr.
Definition: signal.h:79
Definition: signal.h:48
Definition: signal.h:59
void * oslSignalHandler
Definition: signal.h:38
Definition: signal.h:50
Definition: signal.h:66
SAL_DLLPUBLIC sal_Bool osl_setErrorReporting(sal_Bool bEnable)
Enables or disables error reporting.
#define SAL_MAX_ENUM
Definition: types.h:242
oslSignal Signal
Definition: signal.h:68
Definition: signal.h:42
Definition: signal.h:45
unsigned char sal_Bool
Definition: types.h:48
Definition: signal.h:49
Definition: signal.h:43
Definition: signal.h:55
Definition: signal.h:58
SAL_DLLPUBLIC oslSignalHandler osl_addSignalHandler(oslSignalHandlerFunction Handler, void *pData)
Definition: signal.h:57
Definition: signal.h:47
SAL_DLLPUBLIC sal_Bool osl_removeSignalHandler(oslSignalHandler hHandler)
oslSignal
Definition: signal.h:40
sal_Int32 UserSignal
Definition: signal.h:69
Definition: signal.h:46
SAL_DLLPUBLIC oslSignalAction osl_raiseSignal(sal_Int32 UserSignal, void *UserData)
Definition: signal.h:44
oslSignalAction
Definition: signal.h:53
Definition: signal.h:56