libzypp 17.37.17
|
Abstract base class for 'physical' MediaHandler like MediaCD, etc. More...
#include <zypp/media/MediaHandler.h>
Public Types | |
using | Ptr = shared_ptr<MediaHandler> |
using | constPtr = shared_ptr<const MediaHandler> |
Public Member Functions | |
bool | dependsOnParent (MediaAccessId parentId, bool exactIdMatch) |
Check if the current media handler depends on an another handler specified by media access id. | |
bool | dependsOnParent () |
void | resetParentId () |
Called in case, where the media manager takes over the destruction of the parent id (e.g. | |
Pathname | attachPoint () const |
Return the currently used attach point. | |
void | setAttachPoint (const Pathname &path, bool temp) |
Set a new attach point. | |
void | setAttachPoint (const AttachPointRef &ref) |
Set a (shared) attach point. | |
AttachPoint | attachPointHint () const |
Get the actual attach point hint. | |
void | attachPointHint (const Pathname &path, bool temp) |
Set the attach point hint as specified by the user. | |
Pathname | createAttachPoint () const |
Try to create a default / temporary attach point. | |
Pathname | createAttachPoint (const Pathname &attach_root) const |
Try to create a temporary attach point in specified root. | |
void | removeAttachPoint () |
Remove unused attach point. | |
virtual bool | checkAttachPoint (const Pathname &apoint) const |
Verify if the specified directory as attach point (root) as requires by the particular media handler implementation. | |
bool | isUseableAttachPoint (const Pathname &path, bool mtab=true) const |
Ask media manager, if the specified path is already used as attach point or if there are another attach points bellow of it. | |
std::string | mediaSourceName () const |
Get the media source name or an empty string. | |
void | setMediaSource (const MediaSourceRef &ref) |
Set new media source reference. | |
AttachedMedia | findAttachedMedia (const MediaSourceRef &media) const |
Ask the media manager if specified media source is already attached. | |
AttachedMedia | attachedMedia () const |
Returns the attached media. | |
bool | isSharedMedia () const |
Returns a hint if the media is shared or not. | |
bool | checkAttached (bool matchMountFs) const |
Check actual mediaSource attachment against the current mount table of the system. | |
void | forceRelaseAllMedia (bool matchMountFs) |
Call to this function will try to release all media matching the currenlty attached media source, that it is able to find in the mount table. | |
void | forceRelaseAllMedia (const MediaSourceRef &ref, bool matchMountFs) |
MediaHandler (MirroredOrigin origin_r, const Pathname &attach_point_r, Pathname urlpath_below_attachpoint_r, const bool does_download_r) | |
If the concrete media handler provides a nonempty attach_point, it must be an existing directory. | |
virtual | ~MediaHandler () |
Contolling MediaAccess takes care, that attached media is released prior to deleting this. | |
bool | downloads () const |
Hint if files are downloaded or not. | |
std::string | protocol () const |
Protocol hint for MediaAccess. | |
Url | url () const |
Primary Url used. | |
OriginEndpoint | originEndpoint () const |
Primary OriginEndpoint used. | |
void | attach (bool next) |
Use concrete handler to attach the media. | |
virtual bool | isAttached () const |
True if media is attached. | |
Pathname | localRoot () const |
Return the local directory that corresponds to medias url, no matter if media isAttached or not. | |
Pathname | localPath (const Pathname &pathname) const |
Files provided will be available at 'localPath(filename)'. | |
void | disconnect () |
Use concrete handler to isconnect media. | |
void | release (const std::string &ejectDev="") |
Use concrete handler to release the media. | |
void | provideFile (const OnMediaLocation &file) const |
Use concrete handler to provide file denoted by path below 'localRoot'. | |
void | provideFileCopy (const OnMediaLocation &srcFile, const Pathname &targetFilename) const |
Call concrete handler to provide a copy of a file under a different place in the file system (usually not under attach point) as a copy. | |
void | provideDir (const Pathname &dirname) const |
Use concrete handler to provide directory denoted by path below 'localRoot' (not recursive!). | |
void | provideDirTree (const Pathname &dirname) const |
Use concrete handler to provide directory tree denoted by path below 'localRoot' (recursive! | |
void | releaseFile (const Pathname &filename) const |
Remove filename below localRoot IFF handler downloads files to the local filesystem. | |
void | releaseDir (const Pathname &dirname) const |
Remove directory tree below localRoot IFF handler downloads files to the local filesystem. | |
void | releasePath (const Pathname &pathname) const |
Remove pathname below localRoot IFF handler downloads files to the local filesystem. | |
void | dirInfo (std::list< std::string > &retlist, const Pathname &dirname, bool dots=true) const |
Return content of directory on media via retlist. | |
void | dirInfo (filesystem::DirContent &retlist, const Pathname &dirname, bool dots=true) const |
Basically the same as dirInfo above. | |
bool | doesFileExist (const Pathname &filename) const |
check if a file exists | |
virtual bool | hasMoreDevices () |
Check if the media has one more device available for attach(true). | |
virtual void | getDetectedDevices (std::vector< std::string > &devices, unsigned int &index) const |
Fill in a vector of detected ejectable devices and the index of the currently attached device within the vector. | |
virtual void | precacheFiles (const std::vector< OnMediaLocation > &files) |
Tries to fetch the given files and precaches them. |
Static Public Member Functions | |
static bool | setAttachPrefix (const Pathname &attach_prefix) |
static std::string | getRealPath (const std::string &path) |
static Pathname | getRealPath (const Pathname &path) |
static bool | checkAttachPoint (const Pathname &apoint, bool empty_dir, bool writeable) |
Verify if the specified directory as attach point (root) using requested checks. |
Protected Member Functions | |
virtual void | attachTo (bool next=false)=0 |
Call concrete handler to attach the media. | |
virtual void | disconnectFrom () |
Call concrete handler to disconnect media. | |
virtual void | releaseFrom (const std::string &ejectDev="")=0 |
Call concrete handler to release the media. | |
virtual void | forceEject (const std::string &device) |
Call concrete handler to physically eject the media (i.e. | |
virtual void | getFile (const OnMediaLocation &file) const |
Call concrete handler to provide file below attach point. | |
virtual void | getFileCopy (const OnMediaLocation &file, const Pathname &targetFilename) const |
Call concrete handler to provide a file under a different place in the file system (usually not under attach point) as a copy. | |
virtual void | getDir (const Pathname &dirname, bool recurse_r) const =0 |
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 =0 |
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 =0 |
Basically the same as getDirInfo above. | |
virtual bool | getDoesFileExist (const Pathname &filename) const =0 |
check if a file exists | |
void | getDirectoryYast (std::list< std::string > &retlist, const Pathname &dirname, bool dots=true) const |
Retrieve and if available scan dirname/directory.yast. | |
void | getDirectoryYast (filesystem::DirContent &retlist, const Pathname &dirname, bool dots=true) const |
Retrieve and if available scan dirname/directory.yast. |
Protected Attributes | |
MirroredOrigin | _origin |
Contains the authority URL and mirrors. | |
MediaAccessId | _parentId |
Access Id of media handler we depend on. |
Private Attributes | |
MediaSourceRef | _mediaSource |
The attached media source description reference. | |
AttachPointRef | _attachPoint |
This is where the media will be actually attached ("mounted"). | |
AttachPoint | _attachPointHint |
The user provided attach preferred point. | |
Pathname | _relativeRoot |
The relative root directory of the data on the media. | |
bool | _does_download |
True if concrete handler downloads files to the local filesystem. | |
time_t | _attach_mtime |
timestamp of the the last attach verification |
Static Private Attributes | |
static Pathname | _attachPrefix |
User defined default attach point prefix. |
Friends | |
std::ostream & | operator<< (std::ostream &str, const MediaHandler &obj) |
Abstract base class for 'physical' MediaHandler like MediaCD, etc.
Handles the requests forwarded by MediaAccess. The public interface contains nonvirtual methods, which should do common sanitychecks and logging. For the real action they call virtual methods overloaded by the concrete handler.
Definition at line 50 of file MediaHandler.h.
Definition at line 54 of file MediaHandler.h.
using zypp::media::MediaHandler::constPtr = shared_ptr<const MediaHandler> |
Definition at line 55 of file MediaHandler.h.
zypp::media::MediaHandler::MediaHandler | ( | MirroredOrigin | origin_r, |
const Pathname & | attach_point_r, | ||
Pathname | urlpath_below_attachpoint_r, | ||
const bool | does_download_r ) |
If the concrete media handler provides a nonempty attach_point, it must be an existing directory.
On an empty attach_point, MediaHandler will create a temporay directory, which will be erased from destructor.
On any error, the attach_point is set to an empty Pathname, which should lead to E_bad_attachpoint.
Definition at line 55 of file MediaHandler.cc.
|
virtual |
Contolling MediaAccess takes care, that attached media is released prior to deleting this.
Definition at line 106 of file MediaHandler.cc.
Definition at line 283 of file MediaHandler.cc.
|
static |
Definition at line 122 of file MediaHandler.cc.
|
static |
Definition at line 128 of file MediaHandler.cc.
bool zypp::media::MediaHandler::dependsOnParent | ( | MediaAccessId | parentId, |
bool | exactIdMatch ) |
Check if the current media handler depends on an another handler specified by media access id.
parentId | The id of the parent handler to check against. |
Definition at line 928 of file MediaHandler.cc.
bool zypp::media::MediaHandler::dependsOnParent | ( | ) |
Definition at line 922 of file MediaHandler.cc.
void zypp::media::MediaHandler::resetParentId | ( | ) |
Called in case, where the media manager takes over the destruction of the parent id (e.g.
while destruction of the media manager).
Definition at line 116 of file MediaHandler.cc.
Pathname zypp::media::MediaHandler::attachPoint | ( | ) | const |
Return the currently used attach point.
Definition at line 185 of file MediaHandler.cc.
Set a new attach point.
path | The attach point directory path. |
temp | If to remove the attach point while cleanup. |
Definition at line 200 of file MediaHandler.cc.
void zypp::media::MediaHandler::setAttachPoint | ( | const AttachPointRef & | ref | ) |
Set a (shared) attach point.
ref | New attach point reference. |
Definition at line 223 of file MediaHandler.cc.
AttachPoint zypp::media::MediaHandler::attachPointHint | ( | ) | const |
Get the actual attach point hint.
Definition at line 255 of file MediaHandler.cc.
Set the attach point hint as specified by the user.
path | The attach point directory path. |
temp | If to remove the attach point while cleanup. |
Definition at line 240 of file MediaHandler.cc.
Pathname zypp::media::MediaHandler::createAttachPoint | ( | ) | const |
Try to create a default / temporary attach point.
It tries to create it in attachPrefix if avaliable, then in built-in directories.
MediaBadAttachPointException | if no attach point can be created |
Definition at line 312 of file MediaHandler.cc.
Try to create a temporary attach point in specified root.
attach_root | The attach root dir where to create the attach point in. |
Definition at line 348 of file MediaHandler.cc.
void zypp::media::MediaHandler::removeAttachPoint | ( | ) |
Remove unused attach point.
If the attach point is temporary, the attach point directory and all it content will be removed.
Definition at line 143 of file MediaHandler.cc.
Verify if the specified directory as attach point (root) as requires by the particular media handler implementation.
apoint | The directory to check. |
Reimplemented in zypp::media::MediaNetworkCommonHandler.
Definition at line 848 of file MediaHandler.cc.
|
static |
Verify if the specified directory as attach point (root) using requested checks.
apoint | The directory to check. |
empty_dir | Check if the directory is empty. |
writeable | Check if the directory is writeable. |
Definition at line 855 of file MediaHandler.cc.
bool zypp::media::MediaHandler::isUseableAttachPoint | ( | const Pathname & | path, |
bool | mtab = true ) const |
Ask media manager, if the specified path is already used as attach point or if there are another attach points bellow of it.
path | The attach point path to check. |
mtab | Whether to check against the mtab, too. |
Definition at line 416 of file MediaHandler.cc.
|
inline |
Get the media source name or an empty string.
Definition at line 225 of file MediaHandler.h.
void zypp::media::MediaHandler::setMediaSource | ( | const MediaSourceRef & | ref | ) |
Set new media source reference.
ref | The new reference. |
Definition at line 432 of file MediaHandler.cc.
AttachedMedia zypp::media::MediaHandler::findAttachedMedia | ( | const MediaSourceRef & | media | ) | const |
Ask the media manager if specified media source is already attached.
Definition at line 269 of file MediaHandler.cc.
AttachedMedia zypp::media::MediaHandler::attachedMedia | ( | ) | const |
Returns the attached media.
Used by MediaManager to find other handlers using the same source.
Definition at line 448 of file MediaHandler.cc.
bool zypp::media::MediaHandler::isSharedMedia | ( | ) | const |
Returns a hint if the media is shared or not.
Definition at line 465 of file MediaHandler.cc.
Check actual mediaSource attachment against the current mount table of the system.
Used to implement isAttached().
matchMountFs | If to use the filesystem type from the mount table (nfs, smb and cifs) or from mediaSource while compare of a mount entry with mediaSource. |
Definition at line 479 of file MediaHandler.cc.
void zypp::media::MediaHandler::forceRelaseAllMedia | ( | bool | matchMountFs | ) |
Call to this function will try to release all media matching the currenlty attached media source, that it is able to find in the mount table.
This means also foreign (user) mounts!
matchMountFs | If to use the filesystem type from the mount table (nfs, smb and cifs) or from mediaSource while compare of a mount entry with mediaSource. |
Definition at line 778 of file MediaHandler.cc.
void zypp::media::MediaHandler::forceRelaseAllMedia | ( | const MediaSourceRef & | ref, |
bool | matchMountFs ) |
Definition at line 783 of file MediaHandler.cc.
|
protectedpure virtual |
Call concrete handler to attach the media.
Asserted that not already attached, and attachPoint is a directory.
next | try next available device in turn until end of device list is reached (for media which are accessible through multiple devices like cdroms). |
MediaException |
Implemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNetworkCommonHandler, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
|
inlineprotectedvirtual |
Call concrete handler to disconnect media.
Asserted that media is attached.
This is useful for media which e.g. holds open a connection to a server like FTP. After calling disconnect() the media object still is valid and files are present.
After calling disconnect(), it's not possible to call provideFile() or provideDir() anymore.
MediaException |
Reimplemented in zypp::media::MediaCurl2, and zypp::media::MediaCurl.
Definition at line 321 of file MediaHandler.h.
|
protectedpure virtual |
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.
ejectDev | Device to eject. None if empty. |
MediaException |
Implemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaCurl2, zypp::media::MediaCurl, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
|
inlineprotectedvirtual |
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 in zypp::media::MediaCD.
Definition at line 343 of file MediaHandler.h.
|
protectedvirtual |
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.
MediaException |
Reimplemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNetworkCommonHandler, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
Definition at line 1188 of file MediaHandler.cc.
|
protectedvirtual |
Call concrete handler to provide a file under a different place in the file system (usually not under attach point) as a copy.
Media must be attached before by callee.
Default implementation provided that calls getFile(srcFilename) and copies the result around.
MediaException |
Reimplemented in zypp::media::MediaCurl2, and zypp::media::MediaCurl.
Definition at line 1201 of file MediaHandler.cc.
|
protectedpure virtual |
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.
MediaException |
Implemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNetworkCommonHandler, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
Definition at line 1219 of file MediaHandler.cc.
|
protectedpure virtual |
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.
MediaException |
Implemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNetworkCommonHandler, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
Definition at line 1241 of file MediaHandler.cc.
|
protectedpure virtual |
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.
MediaException |
Implemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNetworkCommonHandler, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
Definition at line 1285 of file MediaHandler.cc.
|
protectedpure virtual |
check if a file exists
Asserted that url is a file and not a dir.
MediaException |
Implemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaCurl2, zypp::media::MediaCurl, zypp::media::MediaDIR, zypp::media::MediaDISK, zypp::media::MediaISO, zypp::media::MediaNFS, and zypp::media::MediaPlugin.
Definition at line 1326 of file MediaHandler.cc.
|
protected |
Retrieve and if available scan dirname/directory.yast.
Asserted that media is attached.
MediaException |
Definition at line 1114 of file MediaHandler.cc.
|
protected |
Retrieve and if available scan dirname/directory.yast.
Asserted that media is attached.
MediaException |
Definition at line 1134 of file MediaHandler.cc.
|
inline |
Hint if files are downloaded or not.
Definition at line 492 of file MediaHandler.h.
|
inline |
Protocol hint for MediaAccess.
Definition at line 497 of file MediaHandler.h.
|
inline |
Primary Url used.
Definition at line 502 of file MediaHandler.h.
|
inline |
Primary OriginEndpoint used.
Definition at line 507 of file MediaHandler.h.
void zypp::media::MediaHandler::attach | ( | bool | next | ) |
Use concrete handler to attach the media.
next | try next available device in turn until end of device list is reached (for media which are accessible through multiple devices like cdroms). |
MediaException |
Definition at line 633 of file MediaHandler.cc.
|
inlinevirtual |
True if media is attached.
Reimplemented in zypp::media::MediaCD, zypp::media::MediaCIFS, zypp::media::MediaDISK, zypp::media::MediaISO, and zypp::media::MediaNFS.
Definition at line 524 of file MediaHandler.h.
Pathname zypp::media::MediaHandler::localRoot | ( | ) | const |
Return the local directory that corresponds to medias url, no matter if media isAttached or not.
Files requested will be available at 'localRoot() + filename' or better 'localPath( filename )'.
Returns empty pathname if E_bad_attachpoint
Definition at line 206 of file MediaHandler.cc.
Files provided will be available at 'localPath(filename)'.
Returns empty pathname if E_bad_attachpoint
Definition at line 664 of file MediaHandler.cc.
void zypp::media::MediaHandler::disconnect | ( | ) |
Use concrete handler to isconnect media.
This is useful for media which e.g. holds open a connection to a server like FTP. After calling disconnect() the media object still is valid and files are present.
After calling disconnect(), it's not possible to call provideFile() or provideDir() anymore.
MediaException |
Definition at line 687 of file MediaHandler.cc.
void zypp::media::MediaHandler::release | ( | const std::string & | ejectDev = "" | ) |
Use concrete handler to release the media.
eject | Device to physically eject. None if empty. |
MediaException |
Definition at line 704 of file MediaHandler.cc.
void zypp::media::MediaHandler::provideFile | ( | const OnMediaLocation & | file | ) | const |
Use concrete handler to provide file denoted by path below 'localRoot'.
Filename is interpreted relative to the attached url and a path prefix is preserved.
MediaException |
Definition at line 969 of file MediaHandler.cc.
void zypp::media::MediaHandler::provideFileCopy | ( | const OnMediaLocation & | srcFile, |
const Pathname & | targetFilename ) const |
Call concrete handler to provide a copy of a file under a different place in the file system (usually not under attach point) as a copy.
Media must be attached before by callee.
srcFilename | Filename of source file on the media |
targetFilename | Filename for the target in the file system |
MediaException |
Definition at line 957 of file MediaHandler.cc.
void zypp::media::MediaHandler::provideDir | ( | const Pathname & | dirname | ) | const |
Use concrete handler to provide directory denoted by path below 'localRoot' (not recursive!).
dirname is interpreted relative to the attached url and a path prefix is preserved.
MediaException |
Definition at line 989 of file MediaHandler.cc.
void zypp::media::MediaHandler::provideDirTree | ( | const Pathname & | dirname | ) | const |
Use concrete handler to provide directory tree denoted by path below 'localRoot' (recursive!
!). dirname is interpreted relative to the attached url and a path prefix is preserved.
MediaException |
Definition at line 1008 of file MediaHandler.cc.
|
inline |
Remove filename below localRoot IFF handler downloads files to the local filesystem.
Never remove anything from media.
MediaException |
Definition at line 618 of file MediaHandler.h.
|
inline |
Remove directory tree below localRoot IFF handler downloads files to the local filesystem.
Never remove anything from media.
MediaException |
Definition at line 627 of file MediaHandler.h.
void zypp::media::MediaHandler::releasePath | ( | const Pathname & | pathname | ) | const |
Remove pathname below localRoot IFF handler downloads files to the local filesystem.
Never remove anything from media.
If pathname denotes a directory it is recursively removed. If pathname is empty or '/' everything below the localRoot is recursively removed. If pathname denotes a file it is unlinked.
MediaException |
Definition at line 1027 of file MediaHandler.cc.
void zypp::media::MediaHandler::dirInfo | ( | std::list< std::string > & | retlist, |
const Pathname & | dirname, | ||
bool | dots = true ) const |
Return content of directory on media via retlist.
If dots is false entries starting with '.' are not reported.
The request is forwarded to the concrete handler, which may atempt to retieve the content e.g. via 'readdir'
Caution: This is not supported by all media types. Be prepared to handle E_not_supported_by_media.
MediaException |
Definition at line 1053 of file MediaHandler.cc.
void zypp::media::MediaHandler::dirInfo | ( | filesystem::DirContent & | retlist, |
const Pathname & | dirname, | ||
bool | dots = true ) const |
Basically the same as dirInfo above.
The content 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.
Caution: This is not supported by all media types. Be prepared to handle E_not_supported_by_media.
MediaException |
Definition at line 1075 of file MediaHandler.cc.
check if a file exists
Asserted that url is a file and not a dir.
MediaException |
Definition at line 1097 of file MediaHandler.cc.
|
virtual |
Check if the media has one more device available for attach(true).
Reimplemented in zypp::media::MediaCD.
Definition at line 1335 of file MediaHandler.cc.
|
virtual |
Fill in a vector of detected ejectable devices and the index of the currently attached device within the vector.
The contents of the vector are the device names (/dev/cdrom and such).
devices | vector to load with the device names |
index | index of the currently used device in the devices vector |
Reimplemented in zypp::media::MediaCD.
Definition at line 1340 of file MediaHandler.cc.
|
virtual |
Tries to fetch the given files and precaches them.
Those files need to be queried using provideFile and can be read from the cache directly. The implementation is not allowed to block but needs to use seperate means to download the files concurrently. A backend can choose to completely ignore this functionaly, the default implementation does nothing.
files | List of files that should be precached, the OnMediaLocation needs to belong to the handler it is passed to |
Definition at line 1351 of file MediaHandler.cc.
|
friend |
Definition at line 1181 of file MediaHandler.cc.
|
staticprivate |
User defined default attach point prefix.
Definition at line 65 of file MediaHandler.h.
|
mutableprivate |
The attached media source description reference.
Definition at line 71 of file MediaHandler.h.
|
private |
This is where the media will be actually attached ("mounted").
All files are provided bellow this + _relativeRoot directory.
Definition at line 77 of file MediaHandler.h.
|
private |
The user provided attach preferred point.
It may contain following values:
"", true => create temporary attach point bellow of _attachPrefix or a built-in default and remove it if not needed any more. dir, false => user specified attach point (not removed)
Definition at line 89 of file MediaHandler.h.
|
private |
The relative root directory of the data on the media.
See also localRoot() and urlpath_below_attachpoint_r constructor argument.
Definition at line 96 of file MediaHandler.h.
|
private |
True if concrete handler downloads files to the local filesystem.
If true releaseFile/Dir will delete them.
Definition at line 102 of file MediaHandler.h.
|
mutableprivate |
timestamp of the the last attach verification
Definition at line 105 of file MediaHandler.h.
|
protected |
Contains the authority URL and mirrors.
Definition at line 112 of file MediaHandler.h.
|
protected |
Access Id of media handler we depend on.
Definition at line 117 of file MediaHandler.h.