MediaNFS.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_MEDIA_MEDIANFS_H
00013 #define ZYPP_MEDIA_MEDIANFS_H
00014 
00015 #include "zypp/media/MediaHandler.h"
00016 
00020 #define NFS_MOUNT_TIMEOUT 10
00021 
00022 namespace zypp {
00023   namespace media {
00024 
00026     //
00027     //  CLASS NAME : MediaNFS
00032     class MediaNFS : public MediaHandler {
00033 
00034       protected:
00035 
00036         virtual void attachTo (bool next = false);
00037         virtual void releaseFrom( bool eject );
00038         virtual void getFile( const Pathname & filename ) const;
00039         virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
00040         virtual void getDirInfo( std::list<std::string> & retlist,
00041                                  const Pathname & dirname, bool dots = true ) const;
00042         virtual void getDirInfo( filesystem::DirContent & retlist,
00043                                  const Pathname & dirname, bool dots = true ) const;
00044         virtual bool getDoesFileExist( const Pathname & filename ) const;
00045 
00046       public:
00047 
00048         MediaNFS( const Url&       url_r,
00049                   const Pathname & attach_point_hint_r );
00050 
00051         virtual ~MediaNFS() { try { release(); } catch(...) {} }
00052 
00053         virtual bool isAttached() const;
00054     };
00055 
00057   } // namespace media
00058 } // namespace zypp
00059 
00060 #endif // ZYPP_MEDIA_MEDIANFS_H

Generated on Tue Sep 25 19:23:02 2007 for libzypp by  doxygen 1.5.3