libzypp 17.34.1
downloader_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#ifndef ZYPP_CURL_NG_NETWORK_PRIVATE_DOWNLOADER_P_H_INCLUDED
15#define ZYPP_CURL_NG_NETWORK_PRIVATE_DOWNLOADER_P_H_INCLUDED
16
18
27#if ENABLE_ZCHUNK_COMPRESSION
29#endif
30
31namespace zyppng {
32
46 template <typename Derived>
48 // Source State, State Change Event TargetState, Transition Condition, Transition operation
51#if ENABLE_ZCHUNK_COMPRESSION
53#endif
55
57#if ENABLE_ZCHUNK_COMPRESSION
59#endif
61
65
67#if ENABLE_ZCHUNK_COMPRESSION
69#endif
72
73#if ENABLE_ZCHUNK_COMPRESSION
76
79#endif
80
84
87 >;
88
89 class DownloadPrivate : public DownloadPrivateBase, public DownloadStatemachine<DownloadPrivate>
90 {
91 public:
92 DownloadPrivate ( Downloader &parent, std::shared_ptr<NetworkRequestDispatcher> requestDispatcher, std::shared_ptr<MirrorControl> mirrors, DownloadSpec &&spec, Download &p );
93 void start ();
94 void init() override;
95 };
96
98 {
100 public:
101 DownloaderPrivate( std::shared_ptr<MirrorControl> mc, Downloader &p );
102
103 std::vector< std::shared_ptr<Download> > _runningDownloads;
104 std::shared_ptr<NetworkRequestDispatcher> _requestDispatcher;
105
106 void onDownloadStarted ( Download &download );
107 void onDownloadFinished ( Download &download );
108
112 std::shared_ptr<MirrorControl> _mirrors;
113 };
114
115}
116
117#endif
Base::WeakPtr parent
Definition base_p.h:22
DownloadPrivate(Downloader &parent, std::shared_ptr< NetworkRequestDispatcher > requestDispatcher, std::shared_ptr< MirrorControl > mirrors, DownloadSpec &&spec, Download &p)
void init() override
std::shared_ptr< MirrorControl > _mirrors
Signal< void(Downloader &parent, Download &download)> _sigStarted
std::vector< std::shared_ptr< Download > > _runningDownloads
void onDownloadFinished(Download &download)
Signal< void(Downloader &parent)> _queueEmpty
std::shared_ptr< NetworkRequestDispatcher > _requestDispatcher
Signal< void(Downloader &parent, Download &download)> _sigFinished
void onDownloadStarted(Download &download)
DownloaderPrivate(std::shared_ptr< MirrorControl > mc, Downloader &p)
The Downloader class.
Definition downloader.h:39
This defines the actual StateMachine.
#define ZYPP_DECLARE_PUBLIC(Class)
Definition zyppglobal.h:97