14#ifndef ZYPP_CURL_NG_NETWORK_PRIVATE_MIRRORCONTROL_P_H
15#define ZYPP_CURL_NG_NETWORK_PRIVATE_MIRRORCONTROL_P_H
17#include <zypp-core/zyppng/core/Url>
18#include <zypp-core/zyppng/base/Signals>
19#include <zypp-core/zyppng/base/Base>
20#include <zypp-core/zyppng/base/Timer>
23#include <zypp-curl/parser/MetaLinkParser>
25#include <unordered_map>
63 using Ptr = std::shared_ptr<MirrorControl>;
69 void registerMirrors(
const std::vector<zypp::media::MetalinkMirror> &urls );
94 std::unordered_map<std::string, MirrorHandle>
_handles;
113 void startTransfer();
114 void finishTransfer(
const bool success );
115 void cancelTransfer();
116 operator bool()
const;
124 bool _cancelOnDestruct =
false;
126 std::shared_ptr<Helper>
_data;
std::list< PublicKeyData > _data
std::pair< std::vector< Url >::const_iterator, MirrorHandle > MirrorPick
PickResult pickBestMirror(const std::vector< Url > &mirrors)
sigc::connection _queueEmptyConn
bool allMirrorsReady() const
Timer::Ptr _newMirrSigDelay
std::shared_ptr< Mirror > MirrorHandle
void registerMirrors(const std::vector< zypp::media::MetalinkMirror > &urls)
std::string makeKey(const zypp::Url &url) const
std::shared_ptr< MirrorControl > Ptr
SignalProxy< void()> sigAllMirrorsReady()
SignalProxy< void()> sigNewMirrorsReady()
Signal< void()> _sigNewMirrorsReady
NetworkRequestDispatcher::Ptr _dispatcher
std::unordered_map< std::string, MirrorHandle > _handles
Signal< void()> _sigAllMirrorsReady
std::shared_ptr< NetworkRequest > Ptr
sigc::connection _finishedConn
void finishTransfer(const bool success)
NetworkRequest::Ptr _request
uint maxConnections() const
bool hasFreeConnections() const
enum zyppng::MirrorControl::PickResult::@1 code