libzypp  17.34.1
eventloop.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \----------------------------------------------------------------------/
9 *
10 * This file contains private API, this might break at any time between releases.
11 * You have been warned!
12 *
13 */
14 #ifndef ZYPP_BASE_EVENTLOOP_DEFINED
15 #define ZYPP_BASE_EVENTLOOP_DEFINED
16 
18 #include <zypp-core/zyppng/base/Signals>
19 #include <zypp-core/zyppng/base/Base>
20 
21 // CONTINUE WITH THREAD DATA AND PUT THE DISPATCHER INSTANCE THERE!
22 
23 namespace zyppng {
24 
25  ZYPP_FWD_DECL_TYPE_WITH_REFS ( EventDispatcher );
26  ZYPP_FWD_DECL_TYPE_WITH_REFS ( EventLoop );
27  class EventLoopPrivate;
28 
30 
43  {
45 
46  public:
47  using Ptr = EventLoopRef;
48  using WeakPtr = EventLoopWeakRef;
49 
50  static Ptr create ();
51  ~EventLoop() override;
52 
56  void run ();
57 
61  void quit ();
62 
63 
67  std::shared_ptr<EventDispatcher> eventDispatcher () const;
68 
69  private:
70  EventLoop();
71 
72  };
73 
74 }
75 
76 #endif
std::weak_ptr< Base > WeakPtr
Definition: base.h:66
ZYPP_FWD_DECL_TYPE_WITH_REFS(Context)
#define ZYPP_DECLARE_PRIVATE(Class)
Definition: zyppglobal.h:86
#define LIBZYPP_NG_EXPORT
Definition: zyppglobal.h:7
std::shared_ptr< Base > Ptr
Definition: base.h:65