libzypp: zypp-core/ng/io/private/asyncdatasource_p.h Source File

libzypp 17.38.13

asyncdatasource_p.h
Go to the documentation of this file.
1#ifndef ZYPP_CORE_ZYPPNG_IO_PRIVATE_ASYNCDATASOURCE_P_H_INCLUDED
2#define ZYPP_CORE_ZYPPNG_IO_PRIVATE_ASYNCDATASOURCE_P_H_INCLUDED
3
4#include <zypp-core/ng/io/AsyncDataSource>
5#include <zypp-core/ng/base/SocketNotifier>
6#include "iodevice_p.h"
7#include "iobuffer_p.h"
8
9namespace zyppng {
10
11 class AsyncDataSourcePrivate : public IODevicePrivate {
12 ZYPP_DECLARE_PUBLIC(AsyncDataSource)
13 public:
14 AsyncDataSourcePrivate ( AsyncDataSource &pub ) : IODevicePrivate(pub) {}
15 struct ReadChannelDev {
16 int _readFd = -1;
17 SocketNotifier::Ptr _readNotifier;
18 };
19 std::vector<ReadChannelDev> _readFds;
20
21 SocketNotifier::Ptr _writeNotifier;
22 IOBuffer _writeBuffer;
23 int _writeFd = -1;
24
25 void notifierActivated (const SocketNotifier &notify, int evTypes );
26 void readyRead ( uint channel );
27 void readyWrite ( );
28
29 void closeWriteChannel ( AsyncDataSource::ChannelCloseReason reason );
30 void closeReadChannel ( uint channel, AsyncDataSource::ChannelCloseReason reason );
31
32 Signal<void( AsyncDataSource::ChannelCloseReason )> _sigWriteFdClosed;
33 Signal<void( uint, AsyncDataSource::ChannelCloseReason )> _sigReadFdClosed;
34 };
35
36}
37
38
39#endif // ZYPP_CORE_ZYPPNG_IO_PRIVATE_ASYNCDATASOURCE_P_H_INCLUDED
zyppng::AsyncDataSourcePrivate::readyRead
void readyRead(uint channel)
Definition asyncdatasource.cpp:32
zyppng::AsyncDataSourcePrivate::closeReadChannel
void closeReadChannel(uint channel, AsyncDataSource::ChannelCloseReason reason)
Definition asyncdatasource.cpp:124
zyppng::AsyncDataSourcePrivate::AsyncDataSourcePrivate
AsyncDataSourcePrivate(AsyncDataSource &pub)
Definition asyncdatasource_p.h:14
zyppng::AsyncDataSourcePrivate::closeWriteChannel
void closeWriteChannel(AsyncDataSource::ChannelCloseReason reason)
Definition asyncdatasource.cpp:113
zyppng::AsyncDataSourcePrivate::_writeBuffer
IOBuffer _writeBuffer
Definition asyncdatasource_p.h:22
zyppng::AsyncDataSourcePrivate::readyWrite
void readyWrite()
Definition asyncdatasource.cpp:75
zyppng::AsyncDataSourcePrivate::_writeNotifier
SocketNotifier::Ptr _writeNotifier
Definition asyncdatasource_p.h:21
zyppng::AsyncDataSourcePrivate::notifierActivated
void notifierActivated(const SocketNotifier &notify, int evTypes)
Definition asyncdatasource.cpp:10
zyppng::AsyncDataSourcePrivate::_sigReadFdClosed
Signal< void(uint, AsyncDataSource::ChannelCloseReason)> _sigReadFdClosed
Definition asyncdatasource_p.h:33
zyppng::AsyncDataSourcePrivate::_readFds
std::vector< ReadChannelDev > _readFds
Definition asyncdatasource_p.h:19
zyppng::AsyncDataSourcePrivate::_sigWriteFdClosed
Signal< void(AsyncDataSource::ChannelCloseReason)> _sigWriteFdClosed
Definition asyncdatasource_p.h:32
zyppng::AsyncDataSourcePrivate::_writeFd
int _writeFd
Definition asyncdatasource_p.h:23
zyppng::AsyncDataSource
Definition asyncdatasource.h:12
zyppng::AsyncDataSource::ChannelCloseReason
ChannelCloseReason
Definition asyncdatasource.h:16
zyppng::IOBuffer
Definition iobuffer_p.h:10
zyppng::IODevicePrivate::IODevicePrivate
IODevicePrivate(IODevice &p)
Definition iodevice.cc:5
zyppng::Signal
Definition signals.h:151
zyppng::SocketNotifier
Definition socketnotifier.h:69
zyppng::SocketNotifier::Ptr
std::shared_ptr< SocketNotifier > Ptr
Definition socketnotifier.h:73
iobuffer_p.h
iodevice_p.h
zyppng
Definition MediaNetworkRequestExecutor.h:16
zyppng::AsyncDataSourcePrivate::ReadChannelDev
Definition asyncdatasource_p.h:15
zyppng::AsyncDataSourcePrivate::ReadChannelDev::_readNotifier
SocketNotifier::Ptr _readNotifier
Definition asyncdatasource_p.h:17
zyppng::AsyncDataSourcePrivate::ReadChannelDev::_readFd
int _readFd
Definition asyncdatasource_p.h:16
ZYPP_DECLARE_PUBLIC
#define ZYPP_DECLARE_PUBLIC(Class)
Definition zyppglobal.h:91