libzypp: zyppng::AsyncOpBase Class Reference

libzypp 17.36.6

Public Member Functions | Protected Attributes | List of all members
zyppng::AsyncOpBase Class Reference

`#include <zypp-core/zyppng/async/asyncop.h>`

Inheritance diagram for zyppng::AsyncOpBase:

## Public Member Functions
virtual bool | canCancel ()
virtual void | cancel ()
SignalProxy< void()> | sigStarted ()
SignalProxy< void(const std::string &, int, int)> | sigProgress ()
SignalProxy< void()> | sigReady ()
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)

## Protected Attributes
Signal< void()> | _sigStarted
Signal< void()> | _sigReady
Signal< void(const std::string &, int, int)> | _sigProgress
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivate > | d_ptr

## Additional Inherited Members
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 Member Functions inherited from zyppng::Base
| Base (BasePrivate &dd)

## Detailed Description

Definition at line 89 of file asyncop.h.

## Member Function Documentation

## ◆ canCancel()

virtual bool zyppng::AsyncOpBase::canCancel | ( |  | ) |
| inlinevirtual

Should return true if the async op supports cancelling, otherwise false

Definition at line 96 of file asyncop.h.

## ◆ cancel()

virtual void zyppng::AsyncOpBase::cancel | ( |  | ) |
| inlinevirtual

Explicitely cancels the async operation if it supports that, otherwise throws a CancelNotImplementedException

Generally every AsyncOp HAS TO support cancelling by releasing the last reference to it, however in some special cases we need to be able to cancel programatically from the backends and notify the frontends by returning a error from a AsyncOp.

Definition at line 108 of file asyncop.h.

## ◆ sigStarted()

SignalProxy< void()> zyppng::AsyncOpBase::sigStarted | ( |  | ) |
| inline

Signal that is emitted once the AsyncOp is started

Definition at line 115 of file asyncop.h.

## ◆ sigProgress()

SignalProxy< void(const std::string &, int, int)> zyppng::AsyncOpBase::sigProgress | ( |  | ) |
| inline

Signal that might be emitted during operation of the AsyncOp, not every AsyncOp will use this

Definition at line 123 of file asyncop.h.

## ◆ sigReady()

SignalProxy< void()> zyppng::AsyncOpBase::sigReady | ( |  | ) |
| inline

Signal that is emitted once the AsyncOp is ready and no callback was registered with onReady

Definition at line 131 of file asyncop.h.

## Member Data Documentation

## ◆ _sigStarted

Signal<void()> zyppng::AsyncOpBase::_sigStarted
| protected

Definition at line 136 of file asyncop.h.

## ◆ _sigReady

Signal<void()> zyppng::AsyncOpBase::_sigReady
| protected

Definition at line 137 of file asyncop.h.

## ◆ _sigProgress

Signal<void( const std::string & , int , int )> zyppng::AsyncOpBase::_sigProgress
| protected

Definition at line 138 of file asyncop.h.

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

- zypp-core/zyppng/async/asyncop.h