libzypp 17.37.10

unixsignalsource.h
Go to the documentation of this file.
1#ifndef ZYPPNG_UNIXSIGNALSOURCE_H
2#define ZYPPNG_UNIXSIGNALSOURCE_H
3
4#include "abstracteventsource.h"
5
6 namespace zyppng {
7
8 ZYPP_FWD_DECL_TYPE_WITH_REFS ( UnixSignalSource );
9 ZYPP_FWD_DECL_TYPE_WITH_REFS ( EventDispatcher );
10 class UnixSignalSourcePrivate;
11
12 class UnixSignalSource : public AbstractEventSource
13 {
14 ZYPP_DECLARE_PRIVATE(UnixSignalSource)
15 public:
16 ~UnixSignalSource() override;
17
18 bool addSignal( int signum );
19 bool removeSignal( int signum );
20
21 SignalProxy<void(int signum)> sigReceived();
22
23 protected:
24 // AbstractEventSource interface
25 void onFdReady(int fd, int events) override;
26 void onSignal(int signal) override;
27
28 private:
29 friend class EventDispatcher;
30 static UnixSignalSourceRef create ();
31 UnixSignalSource();
32
33 };
34} // namespace zyppng
35
36#endif // ZYPPNG_UNIXSIGNALSOURCE_H
abstracteventsource.h
zyppng::AbstractEventSource::AbstractEventSource
AbstractEventSource()
Definition abstracteventsource.cc:20
zyppng::EventDispatcher
Definition eventdispatcher.h:42
zyppng::SignalProxy
Definition signals.h:325
zyppng::UnixSignalSourcePrivate
Definition unixsignalsource.cpp:14
zyppng::UnixSignalSource
Definition unixsignalsource.h:13
zyppng::UnixSignalSource::addSignal
bool addSignal(int signum)
Definition unixsignalsource.cpp:46
zyppng::UnixSignalSource::onFdReady
void onFdReady(int fd, int events) override
Definition unixsignalsource.cpp:138
zyppng::UnixSignalSource::UnixSignalSource
UnixSignalSource()
Definition unixsignalsource.cpp:30
zyppng::UnixSignalSource::removeSignal
bool removeSignal(int signum)
Definition unixsignalsource.cpp:95
zyppng::UnixSignalSource::create
static UnixSignalSourceRef create()
Definition unixsignalsource.cpp:41
zyppng::UnixSignalSource::~UnixSignalSource
~UnixSignalSource() override
Definition unixsignalsource.cpp:34
zyppng::UnixSignalSource::EventDispatcher
friend class EventDispatcher
Definition unixsignalsource.h:29
zyppng::UnixSignalSource::onSignal
void onSignal(int signal) override
Definition unixsignalsource.cpp:153
zyppng::UnixSignalSource::sigReceived
SignalProxy< void(int signum)> sigReceived()
Definition unixsignalsource.cpp:133
zyppng
Definition MediaNetworkRequestExecutor.h:16
ZYPP_DECLARE_PRIVATE
#define ZYPP_DECLARE_PRIVATE(Class)
Definition zyppglobal.h:87
ZYPP_FWD_DECL_TYPE_WITH_REFS
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:126