libzypp  13.10.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  private:
43  std::string findUnusedLoopDevice();
44 
45  protected:
46 
47  virtual void attachTo (bool next = false);
48  virtual void releaseFrom( const std::string & ejectDev = "" );
49  virtual void getFile( const Pathname & filename ) const;
50  virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
51  virtual void getDirInfo( std::list<std::string> & retlist,
52  const Pathname & dirname, bool dots = true ) const;
53  virtual void getDirInfo( filesystem::DirContent & retlist,
54  const Pathname & dirname, bool dots = true ) const;
55  virtual bool getDoesFileExist( const Pathname & filename ) const;
56 
57  public:
58 
59  MediaISO(const Url &url_r,
60  const Pathname &attach_point_hint_r);
61 
62  virtual
63  ~MediaISO();
64 
65  virtual bool
66  isAttached() const;
67  };
68 
69 
71  } // namespace media
73 
75 } // namespace zypp
77 
78 #endif // ZYPP_MEDIA_MEDIAISO_H
79 
80 // vim: set ts=2 sts=2 sw=2 ai et:
81 
virtual void releaseFrom(const std::string &ejectDev="")
Call concrete handler to release the media.
Definition: MediaISO.cc:294
virtual bool getDoesFileExist(const Pathname &filename) const
check if a file exists
Definition: MediaISO.cc:348
virtual void getFile(const Pathname &filename) const
Call concrete handler to provide file below attach point.
Definition: MediaISO.cc:320
virtual bool isAttached() const
True if media is attached.
Definition: MediaISO.cc:146
std::string findUnusedLoopDevice()
Definition: MediaISO.cc:152
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:333
unsigned int MediaAccessId
Media manager access Id type.
Definition: MediaSource.h:29
Abstract base class for &#39;physical&#39; MediaHandler like MediaCD, etc.
Definition: MediaHandler.h:45
std::list< DirEntry > DirContent
Returned by readdir.
Definition: PathInfo.h:544
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:326
virtual void attachTo(bool next=false)
Call concrete handler to attach the media.
Definition: MediaISO.cc:178
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:48