libzypp
17.35.11
abstracteventsource.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_NG_BASE_ABSTRACTEVENTSOURCE_H_INCLUDED
15
#define ZYPP_NG_BASE_ABSTRACTEVENTSOURCE_H_INCLUDED
16
17
#include <
zypp-core/zyppng/base/zyppglobal.h
>
18
#include <zypp-core/zyppng/base/Signals>
19
#include <zypp-core/zyppng/base/Base>
20
21
namespace
zyppng
{
22
23
class
EventDispatcher;
24
class
AbstractEventSourcePrivate;
25
37
class
LIBZYPP_NG_EXPORT
AbstractEventSource
:
public
Base
38
{
39
ZYPP_DECLARE_PRIVATE
(
AbstractEventSource
)
40
public
:
41
46
enum
EventTypes
{
47
Read = 0x01,
//< The fd is ready to read data without blocking
48
Write = 0x02,
//< The fd has written pending data
49
Exception
= 0x04,
//< A exception has happend on the fd
50
Error
= 0x08
//< There was a error polling the fd
51
};
52
53
AbstractEventSource
();
54
AbstractEventSource
(
AbstractEventSourcePrivate
&dd );
55
~
AbstractEventSource
()
override
;
56
60
std::weak_ptr<EventDispatcher> eventDispatcher ()
const
;
61
67
virtual
void
onFdReady (
int
fd,
int
events ) = 0;
68
73
virtual
void
onSignal (
int
signal ) = 0;
74
75
protected
:
81
void
updateFdWatch (
int
fd,
int
mode );
82
87
void
removeFdWatch (
int
fd );
88
};
89
90
}
91
92
#endif
zypp::io::Error
Definition:
IOTools.h:74
zyppglobal.h
zyppng::Base
Definition:
base.h:59
zyppng::AbstractEventSource::EventTypes
EventTypes
Definition:
abstracteventsource.h:46
ZYPP_DECLARE_PRIVATE
#define ZYPP_DECLARE_PRIVATE(Class)
Definition:
zyppglobal.h:87
zypp::Exception
Base class for Exception.
Definition:
Exception.h:146
LIBZYPP_NG_EXPORT
#define LIBZYPP_NG_EXPORT
Definition:
zyppglobal.h:8
zyppng
Definition:
MediaNetwork.h:23
zyppng::AbstractEventSource
Definition:
abstracteventsource.h:37
zyppng::AbstractEventSourcePrivate
Definition:
abstracteventsource_p.h:22
zypp-core
zyppng
base
abstracteventsource.h
Generated by
1.8.14