032a3b4bcb357fcb21548b3ca00a70e5faa7c630
[platform/upstream/libzypp.git] / zypp / media / MediaISO.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/media/MediaISO.h
10  *
11  */
12 #ifndef ZYPP_MEDIA_MEDIAISO_H
13 #define ZYPP_MEDIA_MEDIAISO_H
14
15 #include "zypp/media/MediaHandler.h"
16 #include "zypp/media/MediaManager.h"
17
18 //////////////////////////////////////////////////////////////////////
19 namespace zypp
20 { ////////////////////////////////////////////////////////////////////
21
22   ////////////////////////////////////////////////////////////////////
23   namespace media
24   { //////////////////////////////////////////////////////////////////
25
26
27     ///////////////////////////////////////////////////////////////////
28     //
29     // CLASS NAME : MediaISO
30     //
31     /**
32      * @short Implementation class for ISO MediaHandler
33      * @see MediaHandler
34      **/
35     class MediaISO : public MediaHandler
36     {
37       private:
38         Pathname      _isofile;
39         MediaAccessId _isosource;
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
67     //////////////////////////////////////////////////////////////////
68   } // namespace media
69   ////////////////////////////////////////////////////////////////////
70
71   ////////////////////////////////////////////////////////////////////
72 } // namespace zypp
73 //////////////////////////////////////////////////////////////////////
74
75 #endif // ZYPP_MEDIA_MEDIAISO_H
76
77 // vim: set ts=2 sts=2 sw=2 ai et:
78