Rudiments: /home/dmuse/src/rudiments/include/rudiments/signalclasses.h Source File

Rudiments

- Main Page
- Classes

signalclasses.h
1 // Copyright (c) 1999-2002 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_SIGNALCLASSES_H
5 #define RUDIMENTS_SIGNALCLASSES_H
6
7 #include <rudiments/private/signalclassesincludes.h>
8
9 class signalsetprivate;
10
14 class RUDIMENTS_DLLSPEC signalset {
15 friend class signalmanager;
16 friend class signalhandler;
17 public:
18
20 signalset();
21
23 ~signalset();
24
27 bool addSignal(int32_t signum);
28
31 bool addAllSignals();
32
35 bool removeSignal(int32_t signum);
36
39 bool removeShutDownSignals();
40
43 bool removeCrashSignals();
44
47 bool removeAllSignals();
48
51 int32_t signalIsInSet(int32_t signum) const;
52
53 #include <rudiments/private/signalset.h>
54 };
55
56
57
60 class RUDIMENTS_DLLSPEC signalmanager {
61 public:
71 static uint32_t alarm(uint32_t seconds);
72
75 static bool ignoreSignals(const signalset *sset);
76
80 static bool waitForSignals(const signalset *mask);
81
86 static bool examineBlockedSignals(signalset *sset);
87 };
88
89
92 class signalhandlerprivate;
93 class RUDIMENTS_DLLSPEC signalhandler {
94 public:
95
97 signalhandler();
98
100 ~signalhandler();
101
104 void setHandler(void (*handler)(int32_t));
105
108 void (*getHandler())(int32_t);
109
116 bool handleSignal(int32_t signum);
117
126 bool handleSignal(int32_t signum, signalhandler *oldhandler);
127
129 void removeAllFlags();
130
133 void addFlag(int32_t flag);
134
137 void removeFlag(int32_t flag);
138
141 int32_t getFlags() const;
142
143
145 void setMask(const signalset *sset);
146
148 const signalset *getMask() const;
149
160 static bool isSignalHandlerIntUsed();
161
162 #include <rudiments/private/signalhandler.h>
163
164 };
165
166 #endif
signalhandler::getHandler
void(*)(int32_t) getHandler()
Definition: signalclasses.h:108
signalhandler
Definition: signalclasses.h:93
signalmanager
Definition: signalclasses.h:60
signalset
Definition: signalclasses.h:14