libzypp: zypp/media/detail/MediaNetworkRequestExecutor.h Source File

libzypp 17.38.7

MediaNetworkRequestExecutor.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_MEDIA_DETAIL_MEDIANETWORKREQUEST_EXECUTOR_INCLUDED
10#define ZYPP_MEDIA_DETAIL_MEDIANETWORKREQUEST_EXECUTOR_INCLUDED
11
12#include <zypp/ZYppCallbacks.h>
13#include <zypp-core/ng/base/zyppglobal.h>
14#include <zypp-core/ng/base/signals.h>
15
16 namespace zyppng {
17 ZYPP_FWD_DECL_TYPE_WITH_REFS(EventDispatcher);
18 ZYPP_FWD_DECL_TYPE_WITH_REFS(NetworkRequestDispatcher);
19 ZYPP_FWD_DECL_TYPE_WITH_REFS(NetworkRequest);
20}
21
22 namespace zypp::media {
23 class TransferSettings;
24}
25
26namespace zypp::internal
27{
28
35 class MediaNetworkRequestExecutor
36 {
37 public:
38
39 MediaNetworkRequestExecutor();
40 void executeRequest(zyppng::NetworkRequestRef &req, callback::SendReport<media::DownloadProgressReport> *report = nullptr );
41
42 zyppng::SignalProxy<void( const zypp::Url &url, media::TransferSettings &settings, const std::string &availAuthTypes, bool firstTry, bool &canContinue )> sigAuthRequired() {
43 return _sigAuthRequired;
44 }
45
46 protected:
47 zyppng::Signal<void( const zypp::Url &url, media::TransferSettings &settings, const std::string &availAuthTypes, bool firstTry, bool &canContinue )> _sigAuthRequired;
48 zyppng::EventDispatcherRef _evDispatcher; //< keep the ev dispatcher alive as long as MediaCurl2 is
49 zyppng::NetworkRequestDispatcherRef _nwDispatcher; //< keep the dispatcher alive as well
50 };
51
52}
53
54
55#endif
ZYppCallbacks.h
zypp::Url
Url manipulation class.
Definition Url.h:93
zypp::internal::MediaNetworkRequestExecutor::MediaNetworkRequestExecutor
MediaNetworkRequestExecutor()
Definition MediaNetworkRequestExecutor.cc:13
zypp::internal::MediaNetworkRequestExecutor::executeRequest
void executeRequest(zyppng::NetworkRequestRef &req, callback::SendReport< media::DownloadProgressReport > *report=nullptr)
Definition MediaNetworkRequestExecutor.cc:20
zypp::internal::MediaNetworkRequestExecutor::_nwDispatcher
zyppng::NetworkRequestDispatcherRef _nwDispatcher
Definition MediaNetworkRequestExecutor.h:49
zypp::internal::MediaNetworkRequestExecutor::_sigAuthRequired
zyppng::Signal< void(const zypp::Url &url, media::TransferSettings &settings, const std::string &availAuthTypes, bool firstTry, bool &canContinue)> _sigAuthRequired
Definition MediaNetworkRequestExecutor.h:47
zypp::internal::MediaNetworkRequestExecutor::_evDispatcher
zyppng::EventDispatcherRef _evDispatcher
Definition MediaNetworkRequestExecutor.h:48
zypp::internal::MediaNetworkRequestExecutor::sigAuthRequired
zyppng::SignalProxy< void(const zypp::Url &url, media::TransferSettings &settings, const std::string &availAuthTypes, bool firstTry, bool &canContinue)> sigAuthRequired()
Definition MediaNetworkRequestExecutor.h:42
zypp::media::TransferSettings
Holds transfer setting.
Definition transfersettings.h:34
zyppng::EventDispatcher
Definition eventdispatcher.h:43
zyppng::NetworkRequest
Definition request.h:43
zyppng::SignalProxy
Definition signals.h:325
zyppng::Signal
Definition signals.h:151
zypp::internal
Definition DownloadProgressTracker.cc:13
zypp::media
Definition MediaNetworkRequestExecutor.h:22
zypp::url
Url details namespace.
Definition UrlBase.cc:58
zyppng
Definition MediaNetworkRequestExecutor.h:16
signals.h
zypp::callback::SendReport
Definition Callback.h:237
zyppglobal.h
ZYPP_FWD_DECL_TYPE_WITH_REFS
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)
Definition zyppglobal.h:119