14 #ifndef ZYPP_MEDIA_PRIVATE_PROVIDE_P_H_INCLUDED 15 #define ZYPP_MEDIA_PRIVATE_PROVIDE_P_H_INCLUDED 21 #include <zypp-media/auth/CredentialManager> 22 #include <zypp-media/ng/Provide> 23 #include <zypp-media/ng/ProvideItem> 24 #include <zypp-media/ng/ProvideSpec> 26 #include <zypp-core/zyppng/base/Timer> 60 bool dequeueRequest( ProvideRequestRef req, std::exception_ptr error );
65 AttachedMediaInfo_Ptr
addMedium ( AttachedMediaInfo_Ptr &&medium );
84 std::list<ProvideItemRef> &
items();
88 std::vector<zypp::Url>
sanitizeUrls (
const std::vector<zypp::Url> &urls );
90 ProvideStatusRef
log () {
constexpr auto DEFAULT_MAX_DYNAMIC_WORKERS
std::optional< zypp::ManagedFile > addToFileCache(const zypp::Pathname &downloadedFile)
bool queueRequest(ProvideRequestRef req)
Signal< Provide::MediaChangeAction(const std::string &, const std::string &, const int32_t, const std::vector< std::string > &, const std::optional< std::string > &) > _sigMediaChange
std::list< ProvideItemRef > _items
Signal< std::optional< zypp::media::AuthData > const zypp::Url &reqUrl, const std::string &triedUsername, const std::map< std::string, std::string > &extraValues) > _sigAuthRequired
const zypp::Pathname & workerPath() const
std::string nextMediaId() const
std::unordered_map< std::string, ProvideQueue::Config > _schemeConfigs
std::optional< std::chrono::steady_clock::time_point > _deathTimer
zypp::Pathname _workerPath
Timer::Ptr _scheduleTrigger
std::vector< AttachedMediaInfo_Ptr > & attachedMediaInfos()
bool isInCache(const zypp::Pathname &downloadedFile) const
expected< ProvideQueue::Config > schemeConfig(const std::string &scheme)
ProvidePrivate(zypp::Pathname &&workDir, Provide &pub)
std::deque< QueueItem > _queues
void onItemStateChanged(ProvideItem &item)
std::list< ProvideItemRef > & items()
void onPulseTimeout(Timer &)
The Timer class provides repetitive and single-shot timers.
std::vector< AttachedMediaInfo_Ptr > _attachedMediaInfos
void schedule(ScheduleReason reason)
constexpr auto DEFAULT_CPU_WORKERS
constexpr auto DEFAULT_ACTIVE_CONN_PER_HOST
const std::string queueName(ProvideQueue &q) const
void dequeueItem(ProvideItem *item)
zypp::media::CredManagerOptions _credManagerOptions
std::shared_ptr< Timer > Ptr
static std::shared_ptr< Timer > create()
Creates a new Timer object, the timer is not started at this point.
constexpr std::string_view DEFAULT_PROVIDE_WORKER_PATH
std::unordered_map< std::string, FileCacheItem > _fileCache
bool dequeueRequest(ProvideRequestRef req, std::exception_ptr error)
constexpr auto DEFAULT_ACTIVE_CONN
void queueItem(ProvideItemRef item)
zypp::media::CredManagerOptions & credManagerOptions()
std::unordered_map< std::string, std::string > _workerAlias
#define ZYPP_DECLARE_PUBLIC(Class)
AttachedMediaInfo_Ptr addMedium(AttachedMediaInfo_Ptr &&medium)
std::unordered_map< std::string, ProvideQueueRef > _workerQueues
std::string effectiveScheme(const std::string &scheme) const
std::deque< ProvideRequestRef > _requests
constexpr std::string_view ATTACHED_MEDIA_SUFFIX
std::vector< zypp::Url > sanitizeUrls(const std::vector< zypp::Url > &urls)