libzypp  17.35.15
zyppng::Downloader Class Reference

The Downloader class. More...

#include <zypp-curl/ng/network/downloader.h>

Inheritance diagram for zyppng::Downloader:

Public Types

using Ptr = DownloaderRef
 
using WeakPtr = DownloaderWeakRef
 
- Public Types inherited from zyppng::Base
using Ptr = std::shared_ptr< Base >
 
using WeakPtr = std::weak_ptr< Base >
 

Public Member Functions

 Downloader ()
 
 Downloader (std::shared_ptr< MirrorControl > mc)
 
 ~Downloader () override
 
std::shared_ptr< DownloaddownloadFile (const DownloadSpec &spec)
 
std::shared_ptr< NetworkRequestDispatcher > requestDispatcher () const
 
SignalProxy< void(Downloader &parent, Download &download)> sigStarted ()
 
SignalProxy< void(Downloader &parent, Download &download)> sigFinished ()
 
SignalProxy< void(Downloader &parent)> queueEmpty ()
 
- Public Member Functions inherited from zyppng::Base
 Base ()
 
virtual ~Base ()
 
WeakPtr parent () const
 
void addChild (const Base::Ptr &child)
 
void removeChild (const Ptr &child)
 
const std::unordered_set< Ptr > & children () const
 
std::thread::id threadId () const
 
template<typename T >
std::vector< std::weak_ptr< T > > findChildren () const
 
template<typename T >
std::shared_ptr< T > shared_this () const
 
template<typename T >
std::shared_ptr< T > shared_this ()
 
template<typename T >
std::weak_ptr< T > weak_this () const
 
template<typename T >
std::weak_ptr< T > weak_this ()
 
template<typename SenderFunc , typename ReceiverFunc >
auto connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
 
template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker>
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connectionconnectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)
 

Additional Inherited Members

- Static Public Member Functions inherited from zyppng::Base
template<typename Obj , typename Functor >
static decltype(auto) make_base_slot (Obj *o, Functor &&f)
 
template<typename SenderFunc , typename ReceiverFunc >
static auto connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc)
 
template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker>
static auto connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)
 
- Protected Member Functions inherited from zyppng::Base
 Base (BasePrivate &dd)
 
- Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivated_ptr
 

Detailed Description

The Downloader class.

Provides a high level interface to the

See also
HttpRequestDispatcher, implementing Metalink on top. If in doubt which one to use, always use this one.

Definition at line 38 of file downloader.h.

Member Typedef Documentation

◆ Ptr

using zyppng::Downloader::Ptr = DownloaderRef

Definition at line 43 of file downloader.h.

◆ WeakPtr

using zyppng::Downloader::WeakPtr = DownloaderWeakRef

Definition at line 44 of file downloader.h.

Constructor & Destructor Documentation

◆ Downloader() [1/2]

zyppng::Downloader::Downloader ( )

Definition at line 370 of file downloader.cc.

◆ Downloader() [2/2]

zyppng::Downloader::Downloader ( std::shared_ptr< MirrorControl mc)

Definition at line 376 of file downloader.cc.

◆ ~Downloader()

zyppng::Downloader::~Downloader ( )
override

Definition at line 380 of file downloader.cc.

Member Function Documentation

◆ downloadFile()

std::shared_ptr< Download > zyppng::Downloader::downloadFile ( const DownloadSpec spec)

Generates a new Download object in waiting state

Definition at line 389 of file downloader.cc.

◆ requestDispatcher()

std::shared_ptr< NetworkRequestDispatcher > zyppng::Downloader::requestDispatcher ( ) const

Returns the internally used

See also
zyppng::NetworkRequestDispatcher used by the Downloader to enqueue network requests

Definition at line 401 of file downloader.cc.

◆ sigStarted()

SignalProxy< void(Downloader &parent, Download &download)> zyppng::Downloader::sigStarted ( )

Emitted when a

See also
zyppng::Download created by this Downloader instance was started

Definition at line 406 of file downloader.cc.

◆ sigFinished()

SignalProxy< void(Downloader &parent, Download &download)> zyppng::Downloader::sigFinished ( )

Signal that is emitted when a

See also
zyppng::Download created by this Downloader instance was finished
Note
Just as with
See also
zyppng::NetworkRequest 's the finished signal does not mean the Download was successful

Definition at line 411 of file downloader.cc.

◆ queueEmpty()

SignalProxy< void(Downloader &parent)> zyppng::Downloader::queueEmpty ( )

Signal is always emitted when there are not Downloads anymore waiting in the queue

Definition at line 416 of file downloader.cc.


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