1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/media/MediaSMB.h
12 #ifndef ZYPP_MEDIA_MEDIASMB_H
13 #define ZYPP_MEDIA_MEDIASMB_H
15 #include "zypp/media/MediaHandler.h"
22 ///////////////////////////////////////////////////////////////////
24 // CLASS NAME : MediaSMB
26 * @short Implementation class for SMB MediaHandler
28 * NOTE: The implementation currently serves both, "smb"
29 * and "cifs" URL's, but passes "cifs" to the mount command
33 class MediaSMB : public MediaHandler {
38 * vfstype for mount. This is either "smbfs"
39 * or "cifs" (rewritten by MediaCIFS).
40 * Obsolete: vfstype is allways "cifs".
46 virtual void attachTo (bool next = false);
47 virtual void releaseFrom( const std::string & ejectDev );
48 virtual void getFile( const Pathname & filename ) const;
49 virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
50 virtual void getDirInfo( std::list<std::string> & retlist,
51 const Pathname & dirname, bool dots = true ) const;
52 virtual void getDirInfo( filesystem::DirContent & retlist,
53 const Pathname & dirname, bool dots = true ) const;
54 virtual bool getDoesFileExist( const Pathname & filename ) const;
57 * MediaCIFS rewrites the vfstype to "cifs"
58 * within it's constructor.
60 void mountAsCIFS() { _vfstype = "cifs"; }
63 MediaSMB( const Url& url_r,
64 const Pathname & attach_point_hint_r );
66 virtual ~MediaSMB() { try { release(); } catch(...) {} }
68 virtual bool isAttached() const;
71 bool authenticate( AuthData & authdata, bool firstTry ) const;
74 ///////////////////////////////////////////////////////////////////A
78 #endif // ZYPP_MEDIA_MEDIASMB_H