libzypp 17.37.10

iodevice_p.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
15#ifndef ZYPPNG_IO_IODEVICE_P_DEFINED
16#define ZYPPNG_IO_IODEVICE_P_DEFINED
17
18#include <vector>
19#include <functional>
20#include <zypp-core/zyppng/io/iodevice.h>
21#include <zypp-core/zyppng/base/private/base_p.h>
22#include "iobuffer_p.h"
23
24
25 namespace zyppng {
26
27 namespace constants {
28 constexpr std::string_view outOfRangeErrMsg("Channel index out of range");
29 }
30
31 enum {
32 DefIoDeviceBufChunkSize = 16384
33 };
34
35 class IODevicePrivate : public BasePrivate {
36 public:
37 IODevicePrivate ( IODevice &p );
38
39 std::vector<IOBuffer> _readChannels;
40 uint _currentReadChannel = 0;
41 int64_t _readBufChunkSize = DefIoDeviceBufChunkSize;
42
43 IODevice::OpenMode _mode = IODevice::Closed;
44 Signal< void() > _readyRead;
45 Signal< void(uint) > _channelReadyRead;
46 Signal< void (int64_t)> _sigBytesWritten;
47 Signal< void ()> _sigAllBytesWritten;
48 Signal< void(uint) > _sigReadChannelFinished;
49 };
50
51}
52
53
54#endif
base_p.h
zyppng::BasePrivate::BasePrivate
BasePrivate(Base &b)
Definition base_p.h:17
zyppng::IODevicePrivate::_sigAllBytesWritten
Signal< void()> _sigAllBytesWritten
Definition iodevice_p.h:47
zyppng::IODevicePrivate::_sigReadChannelFinished
Signal< void(uint) > _sigReadChannelFinished
Definition iodevice_p.h:48
zyppng::IODevicePrivate::_sigBytesWritten
Signal< void(int64_t)> _sigBytesWritten
Definition iodevice_p.h:46
zyppng::IODevicePrivate::_readChannels
std::vector< IOBuffer > _readChannels
Definition iodevice_p.h:39
zyppng::IODevicePrivate::_readyRead
Signal< void() > _readyRead
Definition iodevice_p.h:44
zyppng::IODevicePrivate::IODevicePrivate
IODevicePrivate(IODevice &p)
Definition iodevice.cc:5
zyppng::IODevicePrivate::_mode
IODevice::OpenMode _mode
Definition iodevice_p.h:43
zyppng::IODevicePrivate::_readBufChunkSize
int64_t _readBufChunkSize
Definition iodevice_p.h:41
zyppng::IODevicePrivate::_currentReadChannel
uint _currentReadChannel
Definition iodevice_p.h:40
zyppng::IODevicePrivate::_channelReadyRead
Signal< void(uint) > _channelReadyRead
Definition iodevice_p.h:45
zyppng::IODevice
Definition iodevice.h:33
zyppng::IODevice::Closed
@ Closed
Definition iodevice.h:38
zyppng::Signal
Definition signals.h:151
iobuffer_p.h
iodevice.h
zyppng::constants
Definition iodevice_p.h:27
zyppng::constants::outOfRangeErrMsg
constexpr std::string_view outOfRangeErrMsg("Channel index out of range")
zyppng
Definition MediaNetworkRequestExecutor.h:16
zyppng::DefIoDeviceBufChunkSize
@ DefIoDeviceBufChunkSize
Definition iodevice_p.h:32