11#ifndef ZYPP_MEDIA_PROVIDESPEC_H_INCLUDED
12#define ZYPP_MEDIA_PROVIDESPEC_H_INCLUDED
20#include <zypp-core/OnMediaLocation>
21#include <zypp-media/ng/ProvideFwd>
22#include <zypp-media/ng/HeaderValueMap>
23#include <boost/iterator/iterator_adaptor.hpp>
37 const std::string &
label()
const;
110 template <typename... T>
111 static ProvideFileSpecRef
create ( T... args ) {
112 return std::make_shared<ProvideFileSpec>( std::forward<T>(args)... );
Store and operate with byte count.
bool optional() const
Whether this is an optional resource.
ProvideFileSpec & setHeaderChecksum(const zypp::CheckSum &val_r)
Set the headerChecksum.
const zypp::CheckSum & openChecksum() const
The checksum of the resource once it has been uncompressed or unpacked.
ProvideFileSpec & setCustomHeaderValue(const std::string &key, const HeaderValueMap::Value &val)
ProvideFileSpec & setDeltafile(const zypp::Pathname &path)
Set the deltafile.
ProvideFileSpec & setCheckExistsOnly(const bool set=true)
HeaderValueMap & customHeaders()
const zypp::Pathname & destFilenameHint() const
ProvideFileSpec & setOptional(bool val)
Set whether the resource is optional.
friend std::ostream & operator<<(std::ostream &str, const ProvideFileSpec &obj)
const zypp::ByteCount & downloadSize() const
The size of the resource on the server.
zypp::OnMediaLocation asOnMediaLocation(const zypp::Pathname &path, unsigned int mediaNr) const
ProvideFileSpec & setOpenSize(const zypp::ByteCount &val_r)
Set the openSize.
ProvideFileSpec & setMirrorsAllowed(bool set=true)
Enables or disables the use of mirrors when fetching this file.
ProvideFileSpec & setChecksum(const zypp::CheckSum &val_r)
Set the checksum.
bool mirrorsAllowed() const
The requested file is allowed to be fetched via mirrors ( defaults to true )
const zypp::ByteCount & openSize() const
The size of the resource once it has been uncompressed or unpacked.
ProvideFileSpec & setOpenChecksum(const zypp::CheckSum &val_r)
Set the openChecksum.
ProvideFileSpec(const ProvideFileSpec &)=default
const zypp::Pathname & deltafile() const
The existing deltafile that can be used to reduce download size ( zchunk or metalink )
ProvideFileSpec & setDestFilenameHint(const zypp::Pathname &filename)
zypp::RWCOW_pointer< Impl > _pimpl
Implementation class.
const zypp::CheckSum & checksum() const
The checksum of the resource on the server.
static ProvideFileSpecRef create(T... args)
ProvideFileSpec & setDownloadSize(const zypp::ByteCount &val_r)
Set the downloadSize.
const zypp::CheckSum & headerChecksum() const
The checksum of the header prepending the resource (e.g.
ProvideFileSpec & setHeaderSize(const zypp::ByteCount &val_r)
Set the headerSize.
friend std::ostream & dumpOn(std::ostream &str, const ProvideFileSpec &obj)
ProvideFileSpec & addCustomHeaderValue(const std::string &key, const HeaderValueMap::Value &val)
ProvideFileSpec(ProvideFileSpec &&) noexcept=default
const zypp::ByteCount & headerSize() const
The size of the header prepending the resource (e.g.
bool checkExistsOnly() const
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
String related utilities and Regular expression matching.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
RW_pointer supporting 'copy on write' functionality.