1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/source/OnMediaLocation.h
12 #ifndef ZYPP_SOURCE_ONMEDIALOCATION_H
13 #define ZYPP_SOURCE_ONMEDIALOCATION_H
17 #include "zypp/Pathname.h"
18 #include "zypp/ByteCount.h"
19 #include "zypp/CheckSum.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
25 ///////////////////////////////////////////////////////////////////
27 // CLASS NAME : OnMediaLocation
30 * Describes a path ona certain media amongs as the information
31 * required to download it, like its media number, checksum and
33 * it does not specifies the URI of the file.
37 friend std::ostream & operator<<( std::ostream & str, const OnMediaLocation & obj );
46 unsigned medianr() const { return _medianr; }
47 const Pathname & filename() const { return _filename; }
48 const CheckSum & checksum() const { return _checksum; }
49 const ByteCount & downloadsize() const { return _downloadsize; }
52 OnMediaLocation & medianr( unsigned val_r ) { _medianr = val_r; return *this; }
53 OnMediaLocation & filename( const Pathname & val_r ) { _filename = val_r; return *this; }
54 OnMediaLocation & checksum( const CheckSum & val_r ) { _checksum = val_r; return *this; }
55 OnMediaLocation & downloadsize( const ByteCount & val_r ) { _downloadsize = val_r; return *this; }
61 ByteCount _downloadsize;
63 ///////////////////////////////////////////////////////////////////
65 /** \relates OnMediaLocation Stream output */
66 std::ostream & operator<<( std::ostream & str, const OnMediaLocation & obj );
68 /////////////////////////////////////////////////////////////////
70 ///////////////////////////////////////////////////////////////////
71 #endif // ZYPP_SOURCE_ONMEDIALOCATION_H