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 /** \deprecated in favor of releaseFrom(string&) */
48 virtual void releaseFrom( bool eject ) ZYPP_DEPRECATED;
49 virtual void releaseFrom( const std::string & ejectDev );
50 virtual void getFile( const Pathname & filename ) const;
51 virtual void getDir( const Pathname & dirname, bool recurse_r ) const;
52 virtual void getDirInfo( std::list<std::string> & retlist,
53 const Pathname & dirname, bool dots = true ) const;
54 virtual void getDirInfo( filesystem::DirContent & retlist,
55 const Pathname & dirname, bool dots = true ) const;
56 virtual bool getDoesFileExist( const Pathname & filename ) const;
59 * MediaCIFS rewrites the vfstype to "cifs"
60 * within it's constructor.
62 void mountAsCIFS() { _vfstype = "cifs"; }
65 MediaSMB( const Url& url_r,
66 const Pathname & attach_point_hint_r );
68 virtual ~MediaSMB() { try { release(); } catch(...) {} }
70 virtual bool isAttached() const;
73 bool authenticate( AuthData & authdata, bool firstTry ) const;
76 ///////////////////////////////////////////////////////////////////A
80 #endif // ZYPP_MEDIA_MEDIASMB_H