#include <MediaCD.h>
Inheritance diagram for zypp::media::MediaCD:

Public Member Functions | |
| MediaCD (const Url &url_r, const Pathname &attach_point_hint_r) | |
| virtual | ~MediaCD () |
| virtual bool | isAttached () const |
| True if media is attached. | |
Protected Member Functions | |
| virtual void | attachTo (bool next=false) |
| Call concrete handler to attach the media. | |
| virtual void | releaseFrom (bool eject) |
| Call concrete handler to release the media. | |
| virtual void | getFile (const Pathname &filename) const |
| Call concrete handler to provide file below attach point. | |
| virtual void | getDir (const Pathname &dirname, bool recurse_r) const |
| Call concrete handler to provide directory content (not recursive!) below attach point. | |
| virtual void | getDirInfo (std::list< std::string > &retlist, const Pathname &dirname, bool dots=true) const |
| Call concrete handler to provide a content list of directory on media via retlist. | |
| virtual void | getDirInfo (filesystem::DirContent &retlist, const Pathname &dirname, bool dots=true) const |
| Basically the same as getDirInfo above. | |
| virtual bool | getDoesFileExist (const Pathname &filename) const |
| check if a file exists | |
| virtual void | forceEject () |
| Call concrete handler to physically eject the media (i.e. | |
| virtual bool | isAutoMountedMedia (const AttachedMedia &media) |
Private Types | |
| typedef std::list< MediaSource > | DeviceList |
Private Member Functions | |
| DeviceList | detectDevices (bool supportingDVD) |
Static Private Member Functions | |
| static bool | openTray (const std::string &device_r) |
| static bool | closeTray (const std::string &device_r) |
Private Attributes | |
| DeviceList | _devices |
| list of devices to try to mount | |
| int | _lastdev |
| number of last successful mounted device in list | |
Definition at line 28 of file MediaCD.h.
|
|
|
|
||||||||||||
|
Definition at line 121 of file MediaCD.cc. References zypp::media::MediaHandler::_url, zypp::Url::asString(), ERR, zypp::Url::getScheme(), MIL, and ZYPP_THROW. |
|
|
Definition at line 65 of file MediaCD.h. References zypp::media::MediaHandler::release(). |
|
|
Definition at line 245 of file MediaCD.cc. References DBG, EJECT_TOOL_PATH, zypp::externalprogram::ExternalDataSource::receiveLine(), zypp::ExternalProgram::Stderr_To_Stdout, zypp::str::strerror(), and WAR. Referenced by releaseFrom(). |
|
|
Definition at line 304 of file MediaCD.cc. References DBG, zypp::str::strerror(), and WAR. |
|
|
Definition at line 328 of file MediaCD.cc. References DBG, and ZYPP_CAUGHT. Referenced by attachTo(), and forceEject(). |
|
|
Call concrete handler to attach the media. Asserted that not already attached, and attachPoint is a directory.
Implements zypp::media::MediaHandler. Definition at line 469 of file MediaCD.cc. References _devices, _lastdev, zypp::media::MediaHandler::_url, DBG, detectDevices(), zypp::Url::getScheme(), zypp::media::MediaHandler::url(), and ZYPP_THROW. |
|
|
Call concrete handler to release the media. If eject is true, and the media is used in one handler instance only, physically eject the media (i.e. CD-ROM). Asserted that media is attached.
Implements zypp::media::MediaHandler. Definition at line 736 of file MediaCD.cc. References zypp::media::MediaHandler::attachedMedia(), zypp::media::AttachedMedia::attachPoint, FORCE_RELEASE_FOREIGN, zypp::media::MediaHandler::forceRelaseAllMedia(), zypp::media::AttachedMedia::mediaSource, zypp::media::MediaHandler::mediaSourceName(), openTray(), zypp::media::Mount::umount(), ZYPP_CAUGHT, ZYPP_RETHROW, and ZYPP_THROW. |
|
|
Call concrete handler to provide file below attach point. Default implementation provided, that returns whether a file is located at 'localRoot + filename'. Asserted that media is attached.
Implements zypp::media::MediaHandler. Definition at line 953 of file MediaCD.cc. References zypp::media::MediaHandler::getFile(). |
|
||||||||||||
|
Call concrete handler to provide directory content (not recursive!) below attach point. Return E_not_supported_by_media if media does not support retrieval of directory content. Default implementation provided, that returns whether a directory is located at 'localRoot + dirname'. Asserted that media is attached.
Implements zypp::media::MediaHandler. Definition at line 965 of file MediaCD.cc. References zypp::media::MediaHandler::getDir(). |
|
||||||||||||||||
|
Call concrete handler to provide a content list of directory on media via retlist. If dots is false entries starting with '.' are not reported. Return E_not_supported_by_media if media does not support retrieval of directory content. Default implementation provided, that returns the content of a directory at 'localRoot + dirnname' retrieved via 'readdir'. Asserted that media is attached and retlist is empty.
Implements zypp::media::MediaHandler. Definition at line 978 of file MediaCD.cc. References zypp::media::MediaHandler::getDirInfo(). |
|
||||||||||||||||
|
Basically the same as getDirInfo above. The content list is returned as filesystem::DirContent, which includes name and filetype of each directory entry. Retrieving the filetype usg. requires an additional stat call for each entry, thus it's more expensive than a simple readdir. Asserted that media is attached and retlist is empty.
Implements zypp::media::MediaHandler. Definition at line 992 of file MediaCD.cc. References zypp::media::MediaHandler::getDirInfo(). |
|
|
check if a file exists Asserted that url is a file and not a dir.
Implements zypp::media::MediaHandler. Definition at line 998 of file MediaCD.cc. References zypp::media::MediaHandler::getDoesFileExist(). |
|
|
Call concrete handler to physically eject the media (i.e. CD-ROM) in case the media is not attached.. Asserted that media is not attached. Reimplemented from zypp::media::MediaHandler. Definition at line 783 of file MediaCD.cc. References _devices, zypp::media::MediaHandler::_url, DBG, detectDevices(), zypp::Url::getScheme(), isAttached(), zypp::filesystem::PathInfo::isBlk(), zypp::filesystem::PathInfo::major(), and zypp::filesystem::PathInfo::minor(). |
|
|
Reimplemented from zypp::media::MediaHandler. Definition at line 876 of file MediaCD.cc. References zypp::media::AttachedMedia::attachPoint, zypp::media::AttachedMedia::mediaSource, and ZYPP_CAUGHT. |
|
|
True if media is attached.
Reimplemented from zypp::media::MediaHandler. Definition at line 941 of file MediaCD.cc. References zypp::media::MediaHandler::checkAttached(). Referenced by forceEject(). |
|
|
list of devices to try to mount
Definition at line 34 of file MediaCD.h. Referenced by attachTo(), and forceEject(). |
|
|
number of last successful mounted device in list
Definition at line 37 of file MediaCD.h. Referenced by attachTo(). |
1.4.6