53 {
static zypp::shared_ptr<Impl> _nullimpl(
new Impl );
return _nullimpl; }
87 {
static zypp::shared_ptr<Impl> _nullimpl(
new Impl );
return _nullimpl; }
96 : _pimpl( new
Impl(
std::move(label),
std::move(verifyData), medianr ) )
102 {
return _pimpl->_label; }
111 {
return _pimpl->_medianr; }
120 {
return _pimpl->_verifyDataPath; }
124 _pimpl->_verifyDataPath = pName;
129 {
return _pimpl->_customHeaders; }
132 {
return _pimpl->_customHeaders; }
136 _pimpl->_customHeaders.set( key,val );
142 _pimpl->_customHeaders.add( key,val );
149 if (
_pimpl->_verifyDataPath != other.
_pimpl->_verifyDataPath )
153 if ( !
_pimpl->_verifyDataPath.empty() ) {
158 return zypp::indeterminate;
164 if ( !zypp::indeterminate (check) )
169 bool intersect =
false;
170 for (
const auto &u: l1 ) {
171 intersect = ( std::find( l2.begin (), l2.end(), u ) != l2.end() );
178 return intersects( originA, originB );
188 inline std::ostream &
dumpOn( std::ostream &
str,
const ProvideFileSpec::Impl & obj )
189 {
return str << obj; }
193 : _pimpl( new
Impl() )
197 : _pimpl( new
Impl() )
213 {
return _pimpl->_destFilenameHint; }
216 {
_pimpl->_destFilenameHint = filename;
return *
this; }
219 {
return _pimpl->_checkExistsOnly; }
222 {
_pimpl->_checkExistsOnly =
set;
return *
this; }
225 {
return _pimpl->_optional; }
228 {
_pimpl->_optional = (val_r);
return *
this; }
231 {
return _pimpl->_downloadSize; }
234 {
_pimpl->_downloadSize = (val_r);
return *
this; }
237 {
return _pimpl->_checksum; }
240 {
_pimpl->_checksum = (val_r);
return *
this; }
243 {
return _pimpl->_openSize; }
246 {
_pimpl->_openSize = (val_r);
return *
this; }
249 {
return _pimpl->_openChecksum; }
252 {
_pimpl->_openChecksum = (val_r);
return *
this; }
255 {
return _pimpl->_headerSize; }
258 {
_pimpl->_headerSize = (val_r);
return *
this; }
261 {
return _pimpl->_headerChecksum; }
264 {
_pimpl->_headerChecksum = (val_r);
return *
this; }
267 {
return _pimpl->_deltafile; }
270 {
_pimpl->_deltafile = (path);
return *
this; }
273 {
return _pimpl->_mirrorsAllowed; }
276 {
_pimpl->_mirrorsAllowed = std::move(
set);
return *
this; }
279 {
return _pimpl->_customHeaders; }
282 {
return _pimpl->_customHeaders; }
286 _pimpl->_customHeaders.set( key,val );
292 _pimpl->_customHeaders.add( key,val );
ProvideFileSpec & setHeaderChecksum(const zypp::CheckSum &val_r)
Set the headerChecksum.
ProvideFileSpec & setOptional(bool val)
Set whether the resource is optional.
zypp::CheckSum _openChecksum
const zypp::ByteCount & openSize() const
The size of the resource once it has been uncompressed or unpacked.
HeaderValueMap _customHeaders
zypp::CheckSum _headerChecksum
Store and operate with byte count.
const zypp::CheckSum & openChecksum() const
The checksum of the resource once it has been uncompressed or unpacked.
ProvideSpecBasePrivate & operator=(const ProvideSpecBasePrivate &)=delete
std::ostream & dumpOn(std::ostream &str, const ProvideFileSpec &obj)
zypp::RWCOW_pointer< Impl > _pimpl
Implementation class.
std::ostream & operator<<(std::ostream &str, const ProvideFileSpec &obj)
String related utilities and Regular expression matching.
const zypp::Pathname & deltafile() const
The existing deltafile that can be used to reduce download size ( zchunk or metalink ) ...
zypp::Pathname _deltafile
zypp::ByteCount _openSize
ProvideFileSpec & setOpenChecksum(const zypp::CheckSum &val_r)
Set the openChecksum.
zypp::OnMediaLocation asOnMediaLocation(const zypp::Pathname &path, unsigned int mediaNr) const
ProvideFileSpec & setDestFilenameHint(const zypp::Pathname &filename)
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
zypp::Pathname _destFilenameHint
const zypp::CheckSum & checksum() const
The checksum of the resource on the server.
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
ProvideFileSpec & setDeltafile(const zypp::Pathname &path)
Set the deltafile.
virtual ~ProvideSpecBasePrivate()
ProvideFileSpec & setMirrorsAllowed(bool set=true)
Enables or disables the use of mirrors when fetching this file.
const zypp::CheckSum & headerChecksum() const
The checksum of the header prepending the resource (e.g.
zypp::ByteCount _headerSize
ProvideFileSpec & setHeaderSize(const zypp::ByteCount &val_r)
Set the headerSize.
zypp::Pathname _mediaSpecFile
ProvideFileSpec & addCustomHeaderValue(const std::string &key, const HeaderValueMap::Value &val)
const zypp::ByteCount & downloadSize() const
The size of the resource on the server.
const zypp::Pathname & destFilenameHint() const
ProvideFileSpec & setOpenSize(const zypp::ByteCount &val_r)
Set the openSize.
ProvideFileSpec & setChecksum(const zypp::CheckSum &val_r)
Set the checksum.
static zypp::shared_ptr< Impl > nullimpl()
Offer default Impl.
ProvideFileSpec & setDownloadSize(const zypp::ByteCount &val_r)
Set the downloadSize.
bool optional() const
Whether this is an optional resource.
zypp::ByteCount _downloadSize
bool mirrorsAllowed() const
The requested file is allowed to be fetched via mirrors ( defaults to true )
ProvideFileSpec & setCheckExistsOnly(const bool set=true)
ProvideFileSpec & setCustomHeaderValue(const std::string &key, const HeaderValueMap::Value &val)
const zypp::ByteCount & headerSize() const
The size of the header prepending the resource (e.g.
HeaderValueMap & customHeaders()
bool checkExistsOnly() const