libzypp 17.37.17
zyppng::ProvideFileSpec Class Reference

#include <zypp-media/ng/providespec.h>

Classes

class  Impl

Public Member Functions

 ProvideFileSpec ()
 ProvideFileSpec (const zypp::OnMediaLocation &loc)
 ProvideFileSpec (const ProvideFileSpec &)=default
 ProvideFileSpec (ProvideFileSpec &&) noexcept=default
ProvideFileSpecoperator= (const ProvideFileSpec &)=default
ProvideFileSpecoperator= (ProvideFileSpec &&) noexcept=default
 ~ProvideFileSpec ()
 Dtor.
const zypp::PathnamedestFilenameHint () const
ProvideFileSpecsetDestFilenameHint (const zypp::Pathname &filename)
bool checkExistsOnly () const
ProvideFileSpecsetCheckExistsOnly (const bool set=true)
bool optional () const
 Whether this is an optional resource.
ProvideFileSpecsetOptional (bool val)
 Set whether the resource is optional.
const zypp::ByteCountdownloadSize () const
 The size of the resource on the server.
ProvideFileSpecsetDownloadSize (const zypp::ByteCount &val_r)
 Set the downloadSize.
const zypp::CheckSumchecksum () const
 The checksum of the resource on the server.
ProvideFileSpecsetChecksum (const zypp::CheckSum &val_r)
 Set the checksum.
const zypp::ByteCountopenSize () const
 The size of the resource once it has been uncompressed or unpacked.
ProvideFileSpecsetOpenSize (const zypp::ByteCount &val_r)
 Set the openSize.
const zypp::CheckSumopenChecksum () const
 The checksum of the resource once it has been uncompressed or unpacked.
ProvideFileSpecsetOpenChecksum (const zypp::CheckSum &val_r)
 Set the openChecksum.
const zypp::ByteCountheaderSize () const
 The size of the header prepending the resource (e.g.
ProvideFileSpecsetHeaderSize (const zypp::ByteCount &val_r)
 Set the headerSize.
const zypp::CheckSumheaderChecksum () const
 The checksum of the header prepending the resource (e.g.
ProvideFileSpecsetHeaderChecksum (const zypp::CheckSum &val_r)
 Set the headerChecksum.
const zypp::Pathnamedeltafile () const
 The existing deltafile that can be used to reduce download size ( zchunk or metalink )
ProvideFileSpecsetDeltafile (const zypp::Pathname &path)
 Set the deltafile.
bool mirrorsAllowed () const
 The requested file is allowed to be fetched via mirrors ( defaults to true )
ProvideFileSpecsetMirrorsAllowed (bool set=true)
 Enables or disables the use of mirrors when fetching this file.
HeaderValueMapcustomHeaders ()
const HeaderValueMapcustomHeaders () const
ProvideFileSpecsetCustomHeaderValue (const std::string &key, const HeaderValueMap::Value &val)
ProvideFileSpecaddCustomHeaderValue (const std::string &key, const HeaderValueMap::Value &val)
zypp::OnMediaLocation asOnMediaLocation (const zypp::Pathname &path, unsigned int mediaNr) const

Static Public Member Functions

template<typename... T>
static ProvideFileSpecRef create (T... args)

Private Attributes

zypp::RWCOW_pointer< Impl_pimpl
 Implementation class.

Friends

std::ostream & operator<< (std::ostream &str, const ProvideFileSpec &obj)
std::ostream & dumpOn (std::ostream &str, const ProvideFileSpec &obj)

Detailed Description

Definition at line 91 of file providespec.h.

Constructor & Destructor Documentation

◆ ProvideFileSpec() [1/4]

zyppng::ProvideFileSpec::ProvideFileSpec ( )

Definition at line 172 of file providespec.cc.

◆ ProvideFileSpec() [2/4]

zyppng::ProvideFileSpec::ProvideFileSpec ( const zypp::OnMediaLocation & loc)

Definition at line 176 of file providespec.cc.

◆ ProvideFileSpec() [3/4]

zyppng::ProvideFileSpec::ProvideFileSpec ( const ProvideFileSpec & )
default

◆ ProvideFileSpec() [4/4]

zyppng::ProvideFileSpec::ProvideFileSpec ( ProvideFileSpec && )
defaultnoexcept

◆ ~ProvideFileSpec()

zyppng::ProvideFileSpec::~ProvideFileSpec ( )

Dtor.

Definition at line 189 of file providespec.cc.

Member Function Documentation

◆ operator=() [1/2]

ProvideFileSpec & zyppng::ProvideFileSpec::operator= ( const ProvideFileSpec & )
default

◆ operator=() [2/2]

ProvideFileSpec & zyppng::ProvideFileSpec::operator= ( ProvideFileSpec && )
defaultnoexcept

◆ create()

template<typename... T>
ProvideFileSpecRef zyppng::ProvideFileSpec::create ( T... args)
inlinestatic

Definition at line 111 of file providespec.h.

◆ destFilenameHint()

const zypp::filesystem::Pathname & zyppng::ProvideFileSpec::destFilenameHint ( ) const

The destination file name, this is optional and is only a hint to the Provide instance where to put the file IF possible. The file provider does not need to consider this.

Definition at line 192 of file providespec.cc.

◆ setDestFilenameHint()

ProvideFileSpec & zyppng::ProvideFileSpec::setDestFilenameHint ( const zypp::Pathname & filename)

Definition at line 195 of file providespec.cc.

◆ checkExistsOnly()

bool zyppng::ProvideFileSpec::checkExistsOnly ( ) const

Definition at line 198 of file providespec.cc.

◆ setCheckExistsOnly()

ProvideFileSpec & zyppng::ProvideFileSpec::setCheckExistsOnly ( const bool set = true)

Definition at line 201 of file providespec.cc.

◆ optional()

bool zyppng::ProvideFileSpec::optional ( ) const

Whether this is an optional resource.

This is a hint to the downloader not to report an error if the resource is not present on the server.

Definition at line 204 of file providespec.cc.

◆ setOptional()

ProvideFileSpec & zyppng::ProvideFileSpec::setOptional ( bool val)

Set whether the resource is optional.

Definition at line 207 of file providespec.cc.

◆ downloadSize()

const zypp::ByteCount & zyppng::ProvideFileSpec::downloadSize ( ) const

The size of the resource on the server.

Definition at line 210 of file providespec.cc.

◆ setDownloadSize()

ProvideFileSpec & zyppng::ProvideFileSpec::setDownloadSize ( const zypp::ByteCount & val_r)

Set the downloadSize.

Definition at line 213 of file providespec.cc.

◆ checksum()

const zypp::CheckSum & zyppng::ProvideFileSpec::checksum ( ) const

The checksum of the resource on the server.

Definition at line 216 of file providespec.cc.

◆ setChecksum()

ProvideFileSpec & zyppng::ProvideFileSpec::setChecksum ( const zypp::CheckSum & val_r)

Set the checksum.

Definition at line 219 of file providespec.cc.

◆ openSize()

const zypp::ByteCount & zyppng::ProvideFileSpec::openSize ( ) const

The size of the resource once it has been uncompressed or unpacked.

Definition at line 222 of file providespec.cc.

◆ setOpenSize()

ProvideFileSpec & zyppng::ProvideFileSpec::setOpenSize ( const zypp::ByteCount & val_r)

Set the openSize.

Definition at line 225 of file providespec.cc.

◆ openChecksum()

const zypp::CheckSum & zyppng::ProvideFileSpec::openChecksum ( ) const

The checksum of the resource once it has been uncompressed or unpacked.

Definition at line 228 of file providespec.cc.

◆ setOpenChecksum()

ProvideFileSpec & zyppng::ProvideFileSpec::setOpenChecksum ( const zypp::CheckSum & val_r)

Set the openChecksum.

Definition at line 231 of file providespec.cc.

◆ headerSize()

const zypp::ByteCount & zyppng::ProvideFileSpec::headerSize ( ) const

The size of the header prepending the resource (e.g.

for zchunk).

Definition at line 234 of file providespec.cc.

◆ setHeaderSize()

ProvideFileSpec & zyppng::ProvideFileSpec::setHeaderSize ( const zypp::ByteCount & val_r)

Set the headerSize.

Definition at line 237 of file providespec.cc.

◆ headerChecksum()

const zypp::CheckSum & zyppng::ProvideFileSpec::headerChecksum ( ) const

The checksum of the header prepending the resource (e.g.

for zchunk).

Definition at line 240 of file providespec.cc.

◆ setHeaderChecksum()

ProvideFileSpec & zyppng::ProvideFileSpec::setHeaderChecksum ( const zypp::CheckSum & val_r)

Set the headerChecksum.

Definition at line 243 of file providespec.cc.

◆ deltafile()

const zypp::Pathname & zyppng::ProvideFileSpec::deltafile ( ) const

The existing deltafile that can be used to reduce download size ( zchunk or metalink )

Definition at line 246 of file providespec.cc.

◆ setDeltafile()

ProvideFileSpec & zyppng::ProvideFileSpec::setDeltafile ( const zypp::Pathname & path)

Set the deltafile.

Definition at line 249 of file providespec.cc.

◆ mirrorsAllowed()

bool zyppng::ProvideFileSpec::mirrorsAllowed ( ) const

The requested file is allowed to be fetched via mirrors ( defaults to true )

Definition at line 252 of file providespec.cc.

◆ setMirrorsAllowed()

ProvideFileSpec & zyppng::ProvideFileSpec::setMirrorsAllowed ( bool set = true)

Enables or disables the use of mirrors when fetching this file.

Definition at line 255 of file providespec.cc.

◆ customHeaders() [1/2]

HeaderValueMap & zyppng::ProvideFileSpec::customHeaders ( )

Returns a map of custom key->value pairs that can control special aspects of how the provide operation is processed.

Todo
should this actually just be a list of pair(string,string) instead of map? -> easier way to send multiple values to a worker

Definition at line 258 of file providespec.cc.

◆ customHeaders() [2/2]

const HeaderValueMap & zyppng::ProvideFileSpec::customHeaders ( ) const

Definition at line 261 of file providespec.cc.

◆ setCustomHeaderValue()

ProvideFileSpec & zyppng::ProvideFileSpec::setCustomHeaderValue ( const std::string & key,
const HeaderValueMap::Value & val )

Set the custom header value identified by key to val

Definition at line 264 of file providespec.cc.

◆ addCustomHeaderValue()

ProvideFileSpec & zyppng::ProvideFileSpec::addCustomHeaderValue ( const std::string & key,
const HeaderValueMap::Value & val )

Adds the custom header value val to the list of values identified by key

Definition at line 270 of file providespec.cc.

◆ asOnMediaLocation()

zypp::OnMediaLocation zyppng::ProvideFileSpec::asOnMediaLocation ( const zypp::Pathname & path,
unsigned int mediaNr ) const

Definition at line 276 of file providespec.cc.

◆ operator<<

std::ostream & operator<< ( std::ostream & str,
const ProvideFileSpec & obj )
friend

Definition at line 290 of file providespec.cc.

◆ dumpOn

std::ostream & dumpOn ( std::ostream & str,
const ProvideFileSpec & obj )
friend

Definition at line 293 of file providespec.cc.

Member Data Documentation

◆ _pimpl

zypp::RWCOW_pointer<Impl> zyppng::ProvideFileSpec::_pimpl
private

Implementation class.

Pointer to implementation.

Definition at line 201 of file providespec.h.


The documentation for this class was generated from the following files: