libzypp 17.37.10

zyppng::NetworkRequestDispatcherPrivate Class Reference

`#include <zypp-curl/ng/network/private/networkrequestdispatcher_p.h>`

Inheritance diagram for zyppng::NetworkRequestDispatcherPrivate:

## Public Member Functions
| NetworkRequestDispatcherPrivate (NetworkRequestDispatcher &p)
| ~NetworkRequestDispatcherPrivate () override
Public Member Functions inherited from zyppng::BasePrivate
| BasePrivate (Base &b)
virtual | ~BasePrivate ()
virtual void | init ()

## Public Attributes
int | _maxConnections = 10
std::deque< std::shared_ptr< NetworkRequest > > | _pendingDownloads
std::vector< std::shared_ptr< NetworkRequest > > | _runningDownloads
std::shared_ptr< Timer > | _timer
std::map< curl_socket_t, std::shared_ptr< SocketNotifier > > | _socketHandler
bool | _isRunning = false
bool | _locked = false
CURLM * | _multi = nullptr
NetworkRequestError | _lastError
std::string | _userAgent
std::unordered_map< std::string, std::unordered_map< std::string, std::string > > | _customHeaders
Signal< void(NetworkRequestDispatcher &, NetworkRequest &)> | _sigDownloadStarted
Signal< void(NetworkRequestDispatcher &, NetworkRequest &)> | _sigDownloadFinished
Signal< void(NetworkRequestDispatcher &)> | _sigQueueFinished
Signal< void(NetworkRequestDispatcher &)> | _sigError
Public Attributes inherited from zyppng::BasePrivate
Base::WeakPtr | parent
std::unordered_set< Base::Ptr > | children
Base * | z_ptr = nullptr
std::thread::id | threadId = std::this_thread::get_id()

## Private Member Functions
void | multiTimerTimout (const Timer &t)
int | socketCallback (CURL *easy, curl_socket_t s, int what, void *)
void | cancelAll (const NetworkRequestError &result)
bool | addRequestToMultiHandle (NetworkRequest &req)
void | setFinished (NetworkRequest &req, NetworkRequestError result)
void | onSocketActivated (const SocketNotifier &listener, int events)
void | handleMultiSocketAction (curl_socket_t nativeSocket, int evBitmask)
void | dequeuePending ()

## Static Private Member Functions
static int | multi_timer_cb (CURLM *multi, long timeout_ms, void *g)
static int | static_socket_callback (CURL *easy, curl_socket_t s, int what, void *userp, SocketNotifier *socketp)

## Detailed Description

Definition at line 29 of file networkrequestdispatcher_p.h.

## Constructor & Destructor Documentation

## ◆ NetworkRequestDispatcherPrivate()

zyppng::NetworkRequestDispatcherPrivate::NetworkRequestDispatcherPrivate | ( | NetworkRequestDispatcher & | p | ) |

Definition at line 47 of file networkrequestdispatcher.cc.

## ◆ ~NetworkRequestDispatcherPrivate()

zyppng::NetworkRequestDispatcherPrivate::~NetworkRequestDispatcherPrivate | ( |  | ) |
| override

Definition at line 68 of file networkrequestdispatcher.cc.

## Member Function Documentation

## ◆ multi_timer_cb()

int zyppng::NetworkRequestDispatcherPrivate::multi_timer_cb | ( | CURLM * | multi,
|  | long | timeout_ms,
|  | void * | g )
| static private

Definition at line 75 of file networkrequestdispatcher.cc.

## ◆ static_socket_callback()

int zyppng::NetworkRequestDispatcherPrivate::static_socket_callback | ( | CURL * | easy,
|  | curl_socket_t | s,
|  | int | what,
|  | void * | userp,
|  | SocketNotifier * | socketp )
| static private

Definition at line 94 of file networkrequestdispatcher.cc.

## ◆ multiTimerTimout()

void zyppng::NetworkRequestDispatcherPrivate::multiTimerTimout | ( | const Timer & | t | ) |
| private

Definition at line 89 of file networkrequestdispatcher.cc.

## ◆ socketCallback()

int zyppng::NetworkRequestDispatcherPrivate::socketCallback | ( | CURL * | easy,
|  | curl_socket_t | s,
|  | int | what,
|  | void * | )
| private

Definition at line 101 of file networkrequestdispatcher.cc.

## ◆ cancelAll()

void zyppng::NetworkRequestDispatcherPrivate::cancelAll | ( | const NetworkRequestError & | result | ) |
| private

Definition at line 263 of file networkrequestdispatcher.cc.

## ◆ addRequestToMultiHandle()

bool zyppng::NetworkRequestDispatcherPrivate::addRequestToMultiHandle | ( | NetworkRequest & | req | ) |
| private

Definition at line 329 of file networkrequestdispatcher.cc.

## ◆ setFinished()

void zyppng::NetworkRequestDispatcherPrivate::setFinished | ( | NetworkRequest & | req,
|  | NetworkRequestError | result )
| private

Definition at line 279 of file networkrequestdispatcher.cc.

## ◆ onSocketActivated()

void zyppng::NetworkRequestDispatcherPrivate::onSocketActivated | ( | const SocketNotifier & | listener,
|  | int | events )
| private

Definition at line 163 of file networkrequestdispatcher.cc.

## ◆ handleMultiSocketAction()

void zyppng::NetworkRequestDispatcherPrivate::handleMultiSocketAction | ( | curl_socket_t | nativeSocket,
|  | int | evBitmask )
| private

Definition at line 176 of file networkrequestdispatcher.cc.

## ◆ dequeuePending()

void zyppng::NetworkRequestDispatcherPrivate::dequeuePending | ( |  | ) |
| private

Definition at line 343 of file networkrequestdispatcher.cc.

## Member Data Documentation

## ◆ _maxConnections

int zyppng::NetworkRequestDispatcherPrivate::_maxConnections = 10

Definition at line 36 of file networkrequestdispatcher_p.h.

## ◆ _pendingDownloads

std::deque< std::shared_ptr<NetworkRequest> > zyppng::NetworkRequestDispatcherPrivate::_pendingDownloads

Definition at line 38 of file networkrequestdispatcher_p.h.

## ◆ _runningDownloads

std::vector< std::shared_ptr<NetworkRequest> > zyppng::NetworkRequestDispatcherPrivate::_runningDownloads

Definition at line 39 of file networkrequestdispatcher_p.h.

## ◆ _timer

std::shared_ptr<Timer> zyppng::NetworkRequestDispatcherPrivate::_timer

Definition at line 41 of file networkrequestdispatcher_p.h.

## ◆ _socketHandler

std::map< curl_socket_t, std::shared_ptr<SocketNotifier> > zyppng::NetworkRequestDispatcherPrivate::_socketHandler

Definition at line 42 of file networkrequestdispatcher_p.h.

## ◆ _isRunning

bool zyppng::NetworkRequestDispatcherPrivate::_isRunning = false

Definition at line 44 of file networkrequestdispatcher_p.h.

## ◆ _locked

bool zyppng::NetworkRequestDispatcherPrivate::_locked = false

Definition at line 45 of file networkrequestdispatcher_p.h.

## ◆ _multi

CURLM* zyppng::NetworkRequestDispatcherPrivate::_multi = nullptr

Definition at line 46 of file networkrequestdispatcher_p.h.

## ◆ _lastError

NetworkRequestError zyppng::NetworkRequestDispatcherPrivate::_lastError

Definition at line 48 of file networkrequestdispatcher_p.h.

## ◆ _userAgent

std::string zyppng::NetworkRequestDispatcherPrivate::_userAgent

Definition at line 50 of file networkrequestdispatcher_p.h.

## ◆ _customHeaders

std::unordered_map< std::string, std::unordered_map<std::string, std::string> > zyppng::NetworkRequestDispatcherPrivate::_customHeaders

Definition at line 51 of file networkrequestdispatcher_p.h.

## ◆ _sigDownloadStarted

Signal< void ( NetworkRequestDispatcher &, NetworkRequest & )> zyppng::NetworkRequestDispatcherPrivate::_sigDownloadStarted

Definition at line 54 of file networkrequestdispatcher_p.h.

## ◆ _sigDownloadFinished

Signal< void ( NetworkRequestDispatcher &, NetworkRequest & )> zyppng::NetworkRequestDispatcherPrivate::_sigDownloadFinished

Definition at line 55 of file networkrequestdispatcher_p.h.

## ◆ _sigQueueFinished

Signal< void ( NetworkRequestDispatcher & )> zyppng::NetworkRequestDispatcherPrivate::_sigQueueFinished

Definition at line 56 of file networkrequestdispatcher_p.h.

## ◆ _sigError

Signal< void ( NetworkRequestDispatcher & )> zyppng::NetworkRequestDispatcherPrivate::_sigError

Definition at line 57 of file networkrequestdispatcher_p.h.

The documentation for this class was generated from the following files:

- zypp-curl/ng/network/private/networkrequestdispatcher_p.h
- zypp-curl/ng/network/networkrequestdispatcher.cc