libzypp: zyppng::UnixSignalSource Class Reference

libzypp 17.38.11

zyppng::UnixSignalSource Class Reference

`#include <zypp-core/ng/base/unixsignalsource.h>`

Inheritance diagram for zyppng::UnixSignalSource:

## Public Member Functions
| ~UnixSignalSource () override
bool | addSignal (int signum)
bool | removeSignal (int signum)
SignalProxy< void(int signum)> | sigReceived ()
Public Member Functions inherited from zyppng::AbstractEventSource
| AbstractEventSource ()
| AbstractEventSource (AbstractEventSourcePrivate &dd)
| ~AbstractEventSource () override
std::weak_ptr< EventDispatcher > | eventDispatcher () const
Public Member Functions inherited from zyppng::Base
| Base ()
virtual | ~Base ()
WeakPtr | parent () const
void | addChild (const Base::Ptr &child)
void | removeChild (const Ptr &child)
const std::unordered_set< Ptr > & | children () const
std::thread::id | threadId () const
template<typename T>
std::vector< std::weak_ptr< T > > | findChildren () const
template<typename T>
std::shared_ptr< T > | shared_this () const
template<typename T>
std::shared_ptr< T > | shared_this ()
template<typename T>
std::weak_ptr< T > | weak_this () const
template<typename T>
std::weak_ptr< T > | weak_this ()
template<typename SenderFunc, typename ReceiverFunc>
auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker>
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)
void | setData (uint32_t quark, zypp::AutoDispose< void * > data)
void * | data (uint32_t quark)
void | clearData (uint32_t quark)

## Protected Member Functions
void | onFdReady (int fd, int events) override
void | onSignal (int signal) override
Protected Member Functions inherited from zyppng::AbstractEventSource
void | updateFdWatch (int fd, int mode)
void | removeFdWatch (int fd)
Protected Member Functions inherited from zyppng::Base
| Base (BasePrivate &dd)

## Private Member Functions
| UnixSignalSource ()

## Static Private Member Functions
static UnixSignalSourceRef | create ()

## Friends
class | EventDispatcher

## Additional Inherited Members
Public Types inherited from zyppng::AbstractEventSource
enum | EventTypes { Read = 0x01 , Write = 0x02 , Exception = 0x04 , Error = 0x08 }
Public Types inherited from zyppng::Base
using | Ptr = std::shared_ptr<Base>
using | WeakPtr = std::weak_ptr<Base>
Static Public Member Functions inherited from zyppng::Base
template<typename Obj, typename Functor>
static decltype(auto) | make_base_slot (Obj *o, Functor &&f)
template<typename SenderFunc, typename ReceiverFunc>
static auto | connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker>
static auto | connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivate > | d_ptr

## Detailed Description

Definition at line 12 of file unixsignalsource.h.

## Constructor & Destructor Documentation

## ◆ ~UnixSignalSource()

zyppng::UnixSignalSource::~UnixSignalSource | ( |  | ) |
| override

Definition at line 34 of file unixsignalsource.cpp.

## ◆ UnixSignalSource()

zyppng::UnixSignalSource::UnixSignalSource | ( |  | ) |
| private

Definition at line 30 of file unixsignalsource.cpp.

## Member Function Documentation

## ◆ addSignal()

bool zyppng::UnixSignalSource::addSignal | ( | int | signum | ) |

Definition at line 46 of file unixsignalsource.cpp.

## ◆ removeSignal()

bool zyppng::UnixSignalSource::removeSignal | ( | int | signum | ) |

Definition at line 95 of file unixsignalsource.cpp.

## ◆ sigReceived()

SignalProxy< void(int)> zyppng::UnixSignalSource::sigReceived | ( |  | ) |

Definition at line 133 of file unixsignalsource.cpp.

## ◆ onFdReady()

void zyppng::UnixSignalSource::onFdReady | ( | int | fd,
|  | int | events )
| overrideprotectedvirtual

Called by the

See also
  EventDispatcher when activity was detected on a registered fd. The events are set according to the activity on the file descriptor.

Implements zyppng::AbstractEventSource.

Definition at line 138 of file unixsignalsource.cpp.

## ◆ onSignal()

void zyppng::UnixSignalSource::onSignal | ( | int | signal | ) |
| overrideprotectedvirtual

Called when a event source has registered to receive unix signals

Note
  this is not supported yet

Implements zyppng::AbstractEventSource.

Definition at line 153 of file unixsignalsource.cpp.

## ◆ create()

UnixSignalSourceRef zyppng::UnixSignalSource::create | ( |  | ) |
| staticprivate

Definition at line 41 of file unixsignalsource.cpp.

## Friends And Related Symbol Documentation

## ◆ EventDispatcher

friend class EventDispatcher
| friend

Definition at line 29 of file unixsignalsource.h.

The documentation for this class was generated from the following files:

- zypp-core/ng/base/unixsignalsource.h
- zypp-core/ng/base/unixsignalsource.cpp