libzypp  15.28.6
MediaISO.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_MEDIA_MEDIAISO_H
13 #define ZYPP_MEDIA_MEDIAISO_H
14 
17 
19 namespace zypp
20 {
21 
23  namespace media
24  {
25 
26 
28  //
29  // CLASS NAME : MediaISO
30  //
35  class MediaISO : public MediaHandler
36  {
37  private:
38  Pathname _isofile;
40  std::string _filesystem;
41 
42  protected:
43 
44  virtual void attachTo (bool next = false);
45  virtual void releaseFrom( const std::string & ejectDev = "" );
46  virtual void getFile( const Pathname & filename, const ByteCount &expectedFileSize_r ) const;
47  virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
48  virtual void getDirInfo( std::list<std::string> & retlist,
49  const Pathname & dirname, bool dots = true ) const;
50  virtual void getDirInfo( filesystem::DirContent & retlist,
51  const Pathname & dirname, bool dots = true ) const;
52  virtual bool getDoesFileExist( const Pathname & filename ) const;
53 
54  public:
55 
56  MediaISO(const Url &url_r,
57  const Pathname &attach_point_hint_r);
58 
59  virtual
60  ~MediaISO();
61 
62  virtual bool
63  isAttached() const;
64  };
65 
66 
68  } // namespace media
70 
72 } // namespace zypp
74 
75 #endif // ZYPP_MEDIA_MEDIAISO_H
76 
77 // vim: set ts=2 sts=2 sw=2 ai et:
78 
virtual void releaseFrom(const std::string &ejectDev="")
Call concrete handler to release the media.
Definition: MediaISO.cc:253
virtual bool getDoesFileExist(const Pathname &filename) const
check if a file exists
Definition: MediaISO.cc:307
Store and operate with byte count.
Definition: ByteCount.h:30
virtual bool isAttached() const
True if media is attached.
Definition: MediaISO.cc:142
virtual void getFile(const Pathname &filename, const ByteCount &expectedFileSize_r) const
Call concrete handler to provide file below attach point.
Definition: MediaISO.cc:279
std::string _filesystem
Definition: MediaISO.h:40
virtual void getDirInfo(std::list< std::string > &retlist, const Pathname &dirname, bool dots=true) const
Call concrete handler to provide a content list of directory on media via retlist.
Definition: MediaISO.cc:292
unsigned int MediaAccessId
Media manager access Id type.
Definition: MediaSource.h:29
Abstract base class for 'physical' MediaHandler like MediaCD, etc.
Definition: MediaHandler.h:45
std::list< DirEntry > DirContent
Returned by readdir.
Definition: PathInfo.h:547
virtual void getDir(const Pathname &dirname, bool recurse_r) const
Call concrete handler to provide directory content (not recursive!) below attach point.
Definition: MediaISO.cc:285
virtual void attachTo(bool next=false)
Call concrete handler to attach the media.
Definition: MediaISO.cc:148
MediaAccessId _isosource
Definition: MediaISO.h:39
Implementation class for ISO MediaHandler.
Definition: MediaISO.h:35
Url manipulation class.
Definition: Url.h:87
MediaISO(const Url &url_r, const Pathname &attach_point_hint_r)
Definition: MediaISO.cc:44