libzypp: zypp/media/MediaPlugin.h Source File

libzypp 17.25.10

MediaPlugin.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_MEDIA_MEDIAPLUGIN_H
13 #define ZYPP_MEDIA_MEDIAPLUGIN_H
14
15 #include <zypp/media/MediaHandler.h>
16
18 namespace zypp
19 {
21 namespace media
22 {
23
29 class MediaPlugin : public MediaHandler
30 {
31 public:
32 MediaPlugin( const Url & url_r, const Pathname & attach_point_hint_r );
33
34 virtual ~MediaPlugin() override { try { release(); } catch(...) {} }
35
36 protected:
37 virtual void attachTo( bool next_r = false ) override;
38 virtual void releaseFrom( const std::string & ejectDev_r ) override;
39 virtual void getFile( const Pathname & filename_r, const ByteCount &expectedFileSize_r ) const override;
40 virtual void getDir( const Pathname & dirname_r, bool recurse_r ) const override;
41 virtual void getDirInfo( std::list<std::string> & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const override;
42 virtual void getDirInfo( filesystem::DirContent & retlist_r, const Pathname & dirname_r, bool dots_r = true ) const override;
43 virtual bool getDoesFileExist( const Pathname & filename_r ) const override;
44 };
45
47 } // namespace media
50 } // namespace zypp
52 #endif // ZYPP_MEDIA_MEDIAPLUGIN_H
MediaHandler.h
zypp::ByteCount
Store and operate with byte count.
Definition: ByteCount.h:31
zypp::Url
Url manipulation class.
Definition: Url.h:92
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:45
zypp::media::MediaHandler
Abstract base class for 'physical' MediaHandler like MediaCD, etc.
Definition: MediaHandler.h:45
zypp::media::MediaHandler::release
void release(const std::string &ejectDev="")
Use concrete handler to release the media.
Definition: MediaHandler.cc:740
zypp::media::MediaPlugin
Implementation class for plugin MediaHandler.
Definition: MediaPlugin.h:30
zypp::media::MediaPlugin::attachTo
virtual void attachTo(bool next_r=false) override
Call concrete handler to attach the media.
Definition: MediaPlugin.cc:36
zypp::media::MediaPlugin::getFile
virtual void getFile(const Pathname &filename_r, const ByteCount &expectedFileSize_r) const override
Call concrete handler to provide file below attach point.
Definition: MediaPlugin.cc:42
zypp::media::MediaPlugin::getDoesFileExist
virtual bool getDoesFileExist(const Pathname &filename_r) const override
check if a file exists
Definition: MediaPlugin.cc:54
zypp::media::MediaPlugin::getDir
virtual void getDir(const Pathname &dirname_r, bool recurse_r) const override
Call concrete handler to provide directory content (not recursive!) below attach point.
Definition: MediaPlugin.cc:45
zypp::media::MediaPlugin::releaseFrom
virtual void releaseFrom(const std::string &ejectDev_r) override
Call concrete handler to release the media.
Definition: MediaPlugin.cc:39
zypp::media::MediaPlugin::getDirInfo
virtual void getDirInfo(std::list< std::string > &retlist_r, const Pathname &dirname_r, bool dots_r=true) const override
Call concrete handler to provide a content list of directory on media via retlist.
Definition: MediaPlugin.cc:48
zypp::media::MediaPlugin::~MediaPlugin
virtual ~MediaPlugin() override
Definition: MediaPlugin.h:34
zypp::media::MediaPlugin::MediaPlugin
MediaPlugin(const Url &url_r, const Pathname &attach_point_hint_r)
Definition: MediaPlugin.cc:31
zypp::filesystem::DirContent
std::list< DirEntry > DirContent
Returned by readdir.
Definition: PathInfo.h:547
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2