libzypp  17.35.11
progressobserveradaptor.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
9 #ifndef ZYPP_NG_PROGRESSOBSERVERADAPTOR_INCLUDED
10 #define ZYPP_NG_PROGRESSOBSERVERADAPTOR_INCLUDED
11 
12 #include <zypp/ZYppCallbacks.h>
13 #include <zypp-core/zyppng/ui/ProgressObserver>
14 
15 namespace zyppng {
17  {
18 
20 
22 
23  ProgressObserverRef observer();
24 
25  private:
26  void init();
27  bool update(bool fin = false);
28 
29  ProgressObserverRef _observer;
32  bool _first = true;
33  };
34 }
35 
36 #endif // ZYPP_NG_PROGRESSOBSERVERADAPTOR_INCLUDED
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition: progressdata.h:140
zypp::ProgressData::ReceiverFnc _fnc
zypp::callback::SendReport< zypp::ProgressReport > & _report
ProgressObserverAdaptor(zypp::callback::SendReport< zypp::ProgressReport > &report)