MediaDISK.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00012 #ifndef ZYPP_MEDIA_MEDIADISK_H
00013 #define ZYPP_MEDIA_MEDIADISK_H
00014
00015 #include "zypp/media/MediaHandler.h"
00016
00017 namespace zypp {
00018 namespace media {
00019
00021
00022
00027 class MediaDISK : public MediaHandler {
00028
00029 private:
00030
00031 unsigned long _mountflags;
00032
00033 std::string _device;
00034 std::string _filesystem;
00035
00036 protected:
00037
00038 virtual void attachTo (bool next = false);
00039 virtual void releaseFrom( const std::string & ejectDev );
00040 virtual void getFile( const Pathname & filename ) const;
00041 virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
00042 virtual void getDirInfo( std::list<std::string> & retlist,
00043 const Pathname & dirname, bool dots = true ) const;
00044 virtual void getDirInfo( filesystem::DirContent & retlist,
00045 const Pathname & dirname, bool dots = true ) const;
00046 virtual bool getDoesFileExist( const Pathname & filename ) const;
00047
00048 public:
00049
00050 MediaDISK( const Url & url_r,
00051 const Pathname & attach_point_hint_r );
00052
00053 virtual ~MediaDISK() { try { release(); } catch(...) {} }
00054
00055 virtual bool isAttached() const;
00056
00057 bool verifyIfDiskVolume(const Pathname &name);
00058 };
00059
00061
00062 }
00063 }
00064
00065 #endif // ZYPP_MEDIA_MEDIADISK_H