MediaSMB.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_MEDIA_MEDIASMB_H
00013 #define ZYPP_MEDIA_MEDIASMB_H
00014 
00015 #include "zypp/media/MediaHandler.h"
00016 
00017 namespace zypp {
00018   namespace media {
00019 
00021     //
00022     //  CLASS NAME : MediaSMB
00031     class MediaSMB : public MediaHandler {
00032 
00033     private:
00034 
00040       const char* _vfstype;
00041 
00042     protected:
00043 
00044       virtual void attachTo (bool next = false);
00045       virtual void releaseFrom( bool eject );
00046       virtual void getFile( const Pathname & filename ) const;
00047       virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
00048       virtual void getDirInfo( std::list<std::string> & retlist,
00049                                const Pathname & dirname, bool dots = true ) const;
00050       virtual void getDirInfo( filesystem::DirContent & retlist,
00051                                const Pathname & dirname, bool dots = true ) const;
00052       virtual bool getDoesFileExist( const Pathname & filename ) const;
00053 
00058       void mountAsCIFS() { _vfstype = "cifs"; }
00059 
00060     public:
00061 
00062       MediaSMB( const Url&       url_r,
00063                 const Pathname & attach_point_hint_r );
00064 
00065       virtual ~MediaSMB() { try { release(); } catch(...) {} }
00066 
00067       virtual bool isAttached() const;
00068     };
00069 
00071   } // namespace media
00072 } // namespace zypp
00073 
00074 #endif // ZYPP_MEDIA_MEDIASMB_H

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