libzypp
10.5.0
|
Describes a path on a certain media amongs as the information required to download it, like its media number, checksum and size. More...
#include <OnMediaLocation.h>
Public Member Functions | |
OnMediaLocation () | |
Default ctor indicating no media access. | |
OnMediaLocation (const Pathname &filename_r, unsigned medianr_r=1) | |
Ctor taking a filename and media number (defaults to 1). | |
unsigned | medianr () const |
media number where the resource is located. | |
const Pathname & | filename () const |
The path to the resource relatve to the url and path. | |
const CheckSum & | checksum () const |
the checksum of the resource | |
const ByteCount & | downloadSize () const |
The size of the resource on the server. | |
const ByteCount & | openSize () const |
The size of the resource once it has been uncompressed or unpacked. | |
const CheckSum & | openChecksum () const |
The checksum of the resource once it has been uncompressed or unpacked. | |
const bool | optional () const |
whether this is an optional resource. | |
OnMediaLocation & | unsetLocation () |
Unset filename and set medianr to 0 . | |
OnMediaLocation & | setLocation (const Pathname &val_r, unsigned mediaNumber_r=1) |
Set filename and media number (defaults to 1 ). | |
OnMediaLocation & | setDownloadSize (const ByteCount &val_r) |
Set the files size. | |
OnMediaLocation & | setChecksum (const CheckSum &val_r) |
Set the files checksum. | |
OnMediaLocation & | setOpenSize (const ByteCount &val_r) |
Set the files open (uncompressed) size. | |
OnMediaLocation & | setOpenChecksum (const CheckSum &val_r) |
Set the files open (uncompressed) checksum. | |
OnMediaLocation & | setOptional (bool val) |
Set the wether the resource is optional or not. | |
OnMediaLocation & | changeMedianr (unsigned val_r) |
Individual manipulation of medianr (prefer setLocation). | |
OnMediaLocation & | changeFilename (const Pathname &val_r) |
Individual manipulation of filename (prefer setLocation). | |
Private Attributes | |
unsigned | _medianr |
Pathname | _filename |
CheckSum | _checksum |
ByteCount | _downloadsize |
ByteCount | _opendownloadsize |
CheckSum | _openchecksum |
bool | _optional |
Friends | |
std::ostream & | operator<< (std::ostream &str, const OnMediaLocation &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const OnMediaLocation &obj) |
Describes a path on a certain media amongs as the information required to download it, like its media number, checksum and size.
It does not specify the URI of the file.
Media number 0
usually indicates no media access.
Definition at line 39 of file OnMediaLocation.h.
zypp::OnMediaLocation::OnMediaLocation | ( | ) | [inline] |
Default ctor indicating no media access.
Definition at line 45 of file OnMediaLocation.h.
zypp::OnMediaLocation::OnMediaLocation | ( | const Pathname & | filename_r, |
unsigned | medianr_r = 1 |
||
) | [inline] |
Ctor taking a filename and media number (defaults to 1).
Definition at line 51 of file OnMediaLocation.h.
unsigned zypp::OnMediaLocation::medianr | ( | ) | const [inline] |
media number where the resource is located.
for a url cd:// this could be 1..N. for a url of type http://host/path/CD1, a media number 2 means looking on http://host/path/CD1/../CD2
Definition at line 64 of file OnMediaLocation.h.
const Pathname& zypp::OnMediaLocation::filename | ( | ) | const [inline] |
The path to the resource relatve to the url and path.
If the base is http://novell.com/download/repository, the resource filename could be "/repodata/repomd.xml"
Definition at line 70 of file OnMediaLocation.h.
const CheckSum& zypp::OnMediaLocation::checksum | ( | ) | const [inline] |
the checksum of the resource
Definition at line 74 of file OnMediaLocation.h.
const ByteCount& zypp::OnMediaLocation::downloadSize | ( | ) | const [inline] |
The size of the resource on the server.
Therefore the size of the download.
Definition at line 79 of file OnMediaLocation.h.
const ByteCount& zypp::OnMediaLocation::openSize | ( | ) | const [inline] |
The size of the resource once it has been uncompressed or unpacked.
If the file is file.txt.gz then this is the size of file.txt
Definition at line 86 of file OnMediaLocation.h.
const CheckSum& zypp::OnMediaLocation::openChecksum | ( | ) | const [inline] |
The checksum of the resource once it has been uncompressed or unpacked.
If the file is file.txt.gz then this is the checksum of file.txt
Definition at line 93 of file OnMediaLocation.h.
const bool zypp::OnMediaLocation::optional | ( | ) | const [inline] |
whether this is an optional resource.
That is a file that may not be present. This is just a hint to the resource downloader to not error in case the not found resource is not found.
Definition at line 100 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::unsetLocation | ( | ) | [inline] |
Unset filename
and set medianr
to 0
.
Definition at line 104 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::setLocation | ( | const Pathname & | val_r, |
unsigned | mediaNumber_r = 1 |
||
) | [inline] |
Set filename and media number (defaults to 1
).
Definition at line 108 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::setDownloadSize | ( | const ByteCount & | val_r | ) | [inline] |
Set the files size.
Definition at line 113 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::setChecksum | ( | const CheckSum & | val_r | ) | [inline] |
Set the files checksum.
Definition at line 117 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::setOpenSize | ( | const ByteCount & | val_r | ) | [inline] |
Set the files open (uncompressed) size.
Definition at line 121 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::setOpenChecksum | ( | const CheckSum & | val_r | ) | [inline] |
Set the files open (uncompressed) checksum.
Definition at line 125 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::setOptional | ( | bool | val | ) | [inline] |
Set the wether the resource is optional or not.
Definition at line 132 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::changeMedianr | ( | unsigned | val_r | ) | [inline] |
Individual manipulation of medianr
(prefer setLocation).
Using setLocation is prefered as us usually have to adjust filename
and medianr
in sync.
Definition at line 141 of file OnMediaLocation.h.
OnMediaLocation& zypp::OnMediaLocation::changeFilename | ( | const Pathname & | val_r | ) | [inline] |
Individual manipulation of filename
(prefer setLocation).
Using setLocation is preferedas us usually have to adjust filename
and medianr
in sync.
Definition at line 149 of file OnMediaLocation.h.
std::ostream& operator<< | ( | std::ostream & | str, |
const OnMediaLocation & | obj | ||
) | [friend] |
Definition at line 28 of file OnMediaLocation.cc.
std::ostream & operator<< | ( | std::ostream & | str, |
const OnMediaLocation & | obj | ||
) | [related] |
Stream output
Definition at line 28 of file OnMediaLocation.cc.
unsigned zypp::OnMediaLocation::_medianr [private] |
Definition at line 153 of file OnMediaLocation.h.
Pathname zypp::OnMediaLocation::_filename [private] |
Definition at line 154 of file OnMediaLocation.h.
CheckSum zypp::OnMediaLocation::_checksum [private] |
Definition at line 155 of file OnMediaLocation.h.
Definition at line 156 of file OnMediaLocation.h.
Definition at line 157 of file OnMediaLocation.h.
CheckSum zypp::OnMediaLocation::_openchecksum [private] |
Definition at line 158 of file OnMediaLocation.h.
bool zypp::OnMediaLocation::_optional [private] |
Definition at line 159 of file OnMediaLocation.h.