libzypp  17.28.0
zypp::OnMediaLocation Class Reference

Describes a resource file located on a medium. More...

#include <OnMediaLocation.h>

Classes

class  Impl
 OnMediaLocation implementation. More...
 

Public Member Functions

 OnMediaLocation ()
 Default Ctor indicating no media access. More...
 
 OnMediaLocation (Pathname filename_r, unsigned medianr_r=1)
 Ctor taking a filename_r and medianr_r (defaults to 1). More...
 
 ~OnMediaLocation ()
 Dtor. More...
 
const Pathnamefilename () const
 The path to the resource on the medium. More...
 
unsigned medianr () const
 The media number the resource is located on. More...
 
OnMediaLocationsetLocation (Pathname filename_r, unsigned medianr_r=1)
 Set filename_r and medianr_r (defaults to 1). More...
 
OnMediaLocationunsetLocation ()
 Unset filename and set medianr to 0. More...
 
OnMediaLocationchangeFilename (Pathname filename_r)
 Individual manipulation of filename (prefer setLocation). More...
 
OnMediaLocationchangeMedianr (unsigned medianr_r)
 Individual manipulation of medianr (prefer setLocation). More...
 
OnMediaLocationprependPath (const Pathname &prefix_r)
 Prepend the filename with prefix_r. More...
 
bool optional () const
 Whether this is an optional resource. More...
 
OnMediaLocationsetOptional (bool val)
 Set whether the resource is optional. More...
 
const ByteCountdownloadSize () const
 The size of the resource on the server. More...
 
OnMediaLocationsetDownloadSize (ByteCount val_r)
 Set the downloadSize. More...
 
const CheckSumchecksum () const
 The checksum of the resource on the server. More...
 
OnMediaLocationsetChecksum (CheckSum val_r)
 Set the checksum. More...
 
const ByteCountopenSize () const
 The size of the resource once it has been uncompressed or unpacked. More...
 
OnMediaLocationsetOpenSize (ByteCount val_r)
 Set the openSize. More...
 
const CheckSumopenChecksum () const
 The checksum of the resource once it has been uncompressed or unpacked. More...
 
OnMediaLocationsetOpenChecksum (CheckSum val_r)
 Set the openChecksum. More...
 
const ByteCountheaderSize () const
 The size of the header prepending the resource (e.g. More...
 
OnMediaLocationsetHeaderSize (ByteCount val_r)
 Set the headerSize. More...
 
const CheckSumheaderChecksum () const
 The checksum of the header prepending the resource (e.g. More...
 
OnMediaLocationsetHeaderChecksum (CheckSum val_r)
 Set the headerChecksum. More...
 
const Pathnamedeltafile () const
 The existing deltafile that can be used to reduce download size ( zchunk or metalink ) More...
 
OnMediaLocationsetDeltafile (Pathname path)
 Set the deltafile. More...
 

Private Attributes

RWCOW_pointer< Impl_pimpl
 Implementation class. More...
 

Friends

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

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const OnMediaLocation &obj)
 Stream output. More...
 
std::ostream & dumOn (std::ostream &str, const OnMediaLocation &obj)
 Verbose stream output. More...
 

Detailed Description

Describes a resource file located on a medium.

Holds the path of a resource on a medium and contains additional info required to retrieve and verify it (like media number, checksum, size,...)

It does not specify the Url of the medium itself.

Media number 0 usually indicates no media access.

Definition at line 38 of file OnMediaLocation.h.

Constructor & Destructor Documentation

◆ OnMediaLocation() [1/2]

zypp::OnMediaLocation::OnMediaLocation ( )

Default Ctor indicating no media access.

Definition at line 75 of file OnMediaLocation.cc.

◆ OnMediaLocation() [2/2]

zypp::OnMediaLocation::OnMediaLocation ( Pathname  filename_r,
unsigned  medianr_r = 1 
)

Ctor taking a filename_r and medianr_r (defaults to 1).

Definition at line 79 of file OnMediaLocation.cc.

◆ ~OnMediaLocation()

zypp::OnMediaLocation::~OnMediaLocation ( )

Dtor.

Definition at line 83 of file OnMediaLocation.cc.

Member Function Documentation

◆ filename()

const Pathname & zypp::OnMediaLocation::filename ( ) const

The path to the resource on the medium.

Definition at line 87 of file OnMediaLocation.cc.

◆ medianr()

unsigned zypp::OnMediaLocation::medianr ( ) const

The media number the resource is located on.

Definition at line 90 of file OnMediaLocation.cc.

◆ setLocation()

OnMediaLocation & zypp::OnMediaLocation::setLocation ( Pathname  filename_r,
unsigned  medianr_r = 1 
)

Set filename_r and medianr_r (defaults to 1).

Definition at line 93 of file OnMediaLocation.cc.

◆ unsetLocation()

OnMediaLocation & zypp::OnMediaLocation::unsetLocation ( )

Unset filename and set medianr to 0.

Definition at line 96 of file OnMediaLocation.cc.

◆ changeFilename()

OnMediaLocation & zypp::OnMediaLocation::changeFilename ( Pathname  filename_r)

Individual manipulation of filename (prefer setLocation).

Definition at line 99 of file OnMediaLocation.cc.

◆ changeMedianr()

OnMediaLocation & zypp::OnMediaLocation::changeMedianr ( unsigned  medianr_r)

Individual manipulation of medianr (prefer setLocation).

Definition at line 102 of file OnMediaLocation.cc.

◆ prependPath()

OnMediaLocation & zypp::OnMediaLocation::prependPath ( const Pathname prefix_r)

Prepend the filename with prefix_r.

Definition at line 105 of file OnMediaLocation.cc.

◆ optional()

bool zypp::OnMediaLocation::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 108 of file OnMediaLocation.cc.

◆ setOptional()

OnMediaLocation & zypp::OnMediaLocation::setOptional ( bool  val)

Set whether the resource is optional.

Definition at line 111 of file OnMediaLocation.cc.

◆ downloadSize()

const ByteCount & zypp::OnMediaLocation::downloadSize ( ) const

The size of the resource on the server.

Definition at line 114 of file OnMediaLocation.cc.

◆ setDownloadSize()

OnMediaLocation & zypp::OnMediaLocation::setDownloadSize ( ByteCount  val_r)

Set the downloadSize.

Definition at line 117 of file OnMediaLocation.cc.

◆ checksum()

const CheckSum & zypp::OnMediaLocation::checksum ( ) const

The checksum of the resource on the server.

Definition at line 120 of file OnMediaLocation.cc.

◆ setChecksum()

OnMediaLocation & zypp::OnMediaLocation::setChecksum ( CheckSum  val_r)

Set the checksum.

Definition at line 123 of file OnMediaLocation.cc.

◆ openSize()

const ByteCount & zypp::OnMediaLocation::openSize ( ) const

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

Definition at line 126 of file OnMediaLocation.cc.

◆ setOpenSize()

OnMediaLocation & zypp::OnMediaLocation::setOpenSize ( ByteCount  val_r)

Set the openSize.

Definition at line 129 of file OnMediaLocation.cc.

◆ openChecksum()

const CheckSum & zypp::OnMediaLocation::openChecksum ( ) const

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

Definition at line 132 of file OnMediaLocation.cc.

◆ setOpenChecksum()

OnMediaLocation & zypp::OnMediaLocation::setOpenChecksum ( CheckSum  val_r)

Set the openChecksum.

Definition at line 135 of file OnMediaLocation.cc.

◆ headerSize()

const ByteCount & zypp::OnMediaLocation::headerSize ( ) const

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

for zchunk).

Definition at line 138 of file OnMediaLocation.cc.

◆ setHeaderSize()

OnMediaLocation & zypp::OnMediaLocation::setHeaderSize ( ByteCount  val_r)

Set the headerSize.

Definition at line 141 of file OnMediaLocation.cc.

◆ headerChecksum()

const CheckSum & zypp::OnMediaLocation::headerChecksum ( ) const

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

for zchunk).

Definition at line 144 of file OnMediaLocation.cc.

◆ setHeaderChecksum()

OnMediaLocation & zypp::OnMediaLocation::setHeaderChecksum ( CheckSum  val_r)

Set the headerChecksum.

Definition at line 147 of file OnMediaLocation.cc.

◆ deltafile()

const Pathname & zypp::OnMediaLocation::deltafile ( ) const

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

Definition at line 150 of file OnMediaLocation.cc.

◆ setDeltafile()

OnMediaLocation & zypp::OnMediaLocation::setDeltafile ( Pathname  path)

Set the deltafile.

Definition at line 153 of file OnMediaLocation.cc.

Friends And Related Function Documentation

◆ operator<< [1/2]

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

Definition at line 156 of file OnMediaLocation.cc.

◆ dumpOn

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

Definition at line 159 of file OnMediaLocation.cc.

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  str,
const OnMediaLocation obj 
)
related

Stream output.

Definition at line 156 of file OnMediaLocation.cc.

◆ dumOn()

std::ostream & dumOn ( std::ostream &  str,
const OnMediaLocation obj 
)
related

Verbose stream output.

Member Data Documentation

◆ _pimpl

RWCOW_pointer<Impl> zypp::OnMediaLocation::_pimpl
private

Implementation class.

Pointer to implementation.

Definition at line 128 of file OnMediaLocation.h.


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