libzypp  10.5.0
MediaPlugin.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_MEDIA_MEDIAPLUGIN_H
00013 #define ZYPP_MEDIA_MEDIAPLUGIN_H
00014 
00015 #include "zypp/media/MediaHandler.h"
00016 
00018 namespace zypp
00019 { 
00020 
00021   namespace media
00022   { 
00023 
00029     class MediaPlugin : public MediaHandler
00030     {
00031       public:
00032         MediaPlugin( const Url & url_r, const Pathname & attach_point_hint_r );
00033 
00034         virtual ~MediaPlugin() { try { release(); } catch(...) {} }
00035 
00036       protected:
00037         virtual void attachTo( bool next_r = false );
00038         virtual void releaseFrom( const std::string & ejectDev_r );
00039         virtual void getFile( const Pathname & filename_r ) const;
00040         virtual void getDir( const Pathname & dirname_r, bool recurse_r ) const;
00041         virtual void getDirInfo( std::list<std::string> & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const;
00042         virtual void getDirInfo( filesystem::DirContent & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const;
00043         virtual bool getDoesFileExist( const Pathname & filename_r ) const;
00044     };
00045 
00047   } // namespace media
00050 } // namespace zypp
00052 #endif // ZYPP_MEDIA_MEDIAPLUGIN_H