libzypp: zypp/OnMediaLocation.h Source File

libzypp 17.25.10

OnMediaLocation.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
11 #ifndef ZYPP_SOURCE_ONMEDIALOCATION_H
12 #define ZYPP_SOURCE_ONMEDIALOCATION_H
13
14 #include <iosfwd>
15
16 #include <zypp/base/PtrTypes.h>
17
18 #include <zypp/APIConfig.h>
19 #include <zypp/Pathname.h>
20 #include <zypp/ByteCount.h>
21 #include <zypp/CheckSum.h>
22
24 namespace zypp
25 {
38 class OnMediaLocation
39 {
40 friend std::ostream & operator<<( std::ostream & str, const OnMediaLocation & obj );
41 friend std::ostream & dumpOn( std::ostream & str, const OnMediaLocation & obj );
42
43 public:
45 OnMediaLocation();
46
48 OnMediaLocation( Pathname filename_r, unsigned medianr_r = 1 );
49
51 ~OnMediaLocation();
52
53 public:
55 const Pathname & filename() const;
56
58 unsigned medianr() const;
59
60
62 OnMediaLocation & setLocation( Pathname filename_r, unsigned medianr_r = 1 );
63
65 OnMediaLocation & unsetLocation();
66
67
69 OnMediaLocation & changeFilename( Pathname filename_r );
70
72 OnMediaLocation & changeMedianr( unsigned medianr_r );
73
75 OnMediaLocation & prependPath( const Pathname & prefix_r );
76
77 public:
82 bool optional() const;
84 OnMediaLocation & setOptional( bool val );
85
86 public:
88 const ByteCount & downloadSize() const;
90 OnMediaLocation & setDownloadSize( ByteCount val_r );
91
93 const CheckSum & checksum() const;
95 OnMediaLocation & setChecksum( CheckSum val_r );
96
97 public:
99 const ByteCount & openSize() const;
101 OnMediaLocation & setOpenSize( ByteCount val_r );
102
104 const CheckSum & openChecksum() const;
106 OnMediaLocation & setOpenChecksum( CheckSum val_r );
107
108 public:
110 const ByteCount & headerSize() const;
112 OnMediaLocation & setHeaderSize( ByteCount val_r );
113
115 const CheckSum & headerChecksum() const;
117 OnMediaLocation & setHeaderChecksum( CheckSum val_r );
118
119 public:
120 class Impl;
121 private:
122 RWCOW_pointer<Impl> _pimpl;
123 };
124
126 std::ostream & operator<<( std::ostream & str, const OnMediaLocation & obj );
127
129 std::ostream & dumOn( std::ostream & str, const OnMediaLocation & obj );
130
131 } // namespace zypp
133 #endif // ZYPP_SOURCE_ONMEDIALOCATION_H
ByteCount.h
CheckSum.h
Pathname.h
PtrTypes.h
zypp::ByteCount
Store and operate with byte count.
Definition: ByteCount.h:31
zypp::CheckSum
Definition: CheckSum.h:34
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition: OnMediaLocation.h:39
zypp::OnMediaLocation::optional
bool optional() const
Whether this is an optional resource.
Definition: OnMediaLocation.cc:106
zypp::OnMediaLocation::downloadSize
const ByteCount & downloadSize() const
The size of the resource on the server.
Definition: OnMediaLocation.cc:112
zypp::OnMediaLocation::setDownloadSize
OnMediaLocation & setDownloadSize(ByteCount val_r)
Set the downloadSize.
Definition: OnMediaLocation.cc:115
zypp::OnMediaLocation::filename
const Pathname & filename() const
The path to the resource on the medium.
Definition: OnMediaLocation.cc:85
zypp::OnMediaLocation::operator<<
friend std::ostream & operator<<(std::ostream &str, const OnMediaLocation &obj)
Definition: OnMediaLocation.cc:149
zypp::OnMediaLocation::setOpenSize
OnMediaLocation & setOpenSize(ByteCount val_r)
Set the openSize.
Definition: OnMediaLocation.cc:127
zypp::OnMediaLocation::changeMedianr
OnMediaLocation & changeMedianr(unsigned medianr_r)
Individual manipulation of medianr (prefer setLocation).
Definition: OnMediaLocation.cc:100
zypp::OnMediaLocation::dumOn
std::ostream & dumOn(std::ostream &str, const OnMediaLocation &obj)
Verbose stream output.
zypp::OnMediaLocation::openSize
const ByteCount & openSize() const
The size of the resource once it has been uncompressed or unpacked.
Definition: OnMediaLocation.cc:124
zypp::OnMediaLocation::dumpOn
friend std::ostream & dumpOn(std::ostream &str, const OnMediaLocation &obj)
Definition: OnMediaLocation.cc:152
zypp::OnMediaLocation::headerSize
const ByteCount & headerSize() const
The size of the header prepending the resource (e.g.
Definition: OnMediaLocation.cc:136
zypp::OnMediaLocation::setChecksum
OnMediaLocation & setChecksum(CheckSum val_r)
Set the checksum.
Definition: OnMediaLocation.cc:121
zypp::OnMediaLocation::medianr
unsigned medianr() const
The media number the resource is located on.
Definition: OnMediaLocation.cc:88
zypp::OnMediaLocation::headerChecksum
const CheckSum & headerChecksum() const
The checksum of the header prepending the resource (e.g.
Definition: OnMediaLocation.cc:142
zypp::OnMediaLocation::changeFilename
OnMediaLocation & changeFilename(Pathname filename_r)
Individual manipulation of filename (prefer setLocation).
Definition: OnMediaLocation.cc:97
zypp::OnMediaLocation::_pimpl
RWCOW_pointer< Impl > _pimpl
Implementation class.
Definition: OnMediaLocation.h:120
zypp::OnMediaLocation::setHeaderSize
OnMediaLocation & setHeaderSize(ByteCount val_r)
Set the headerSize.
Definition: OnMediaLocation.cc:139
zypp::OnMediaLocation::checksum
const CheckSum & checksum() const
The checksum of the resource on the server.
Definition: OnMediaLocation.cc:118
zypp::OnMediaLocation::OnMediaLocation
OnMediaLocation()
Default Ctor indicating no media access.
Definition: OnMediaLocation.cc:73
zypp::OnMediaLocation::prependPath
OnMediaLocation & prependPath(const Pathname &prefix_r)
Prepend the filename with prefix_r.
Definition: OnMediaLocation.cc:103
zypp::OnMediaLocation::openChecksum
const CheckSum & openChecksum() const
The checksum of the resource once it has been uncompressed or unpacked.
Definition: OnMediaLocation.cc:130
zypp::OnMediaLocation::unsetLocation
OnMediaLocation & unsetLocation()
Unset filename and set medianr to 0.
Definition: OnMediaLocation.cc:94
zypp::OnMediaLocation::setLocation
OnMediaLocation & setLocation(Pathname filename_r, unsigned medianr_r=1)
Set filename_r and medianr_r (defaults to 1).
Definition: OnMediaLocation.cc:91
zypp::OnMediaLocation::setOpenChecksum
OnMediaLocation & setOpenChecksum(CheckSum val_r)
Set the openChecksum.
Definition: OnMediaLocation.cc:133
zypp::OnMediaLocation::setHeaderChecksum
OnMediaLocation & setHeaderChecksum(CheckSum val_r)
Set the headerChecksum.
Definition: OnMediaLocation.cc:145
zypp::OnMediaLocation::~OnMediaLocation
~OnMediaLocation()
Dtor.
Definition: OnMediaLocation.cc:81
zypp::OnMediaLocation::setOptional
OnMediaLocation & setOptional(bool val)
Set whether the resource is optional.
Definition: OnMediaLocation.cc:109
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
str
String related utilities and Regular expression matching.
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
zypp::OnMediaLocation::Impl
OnMediaLocation implementation.
Definition: OnMediaLocation.cc:27
zypp::RWCOW_pointer
RW_pointer supporting 'copy on write' functionality.
Definition: PtrTypes.h:459