|
libzypp
17.25.2
|
Helper class that provides file on construction and cleans up on destruction. More...
#include <MediaAccess.h>
Public Member Functions | |
| FileProvider (MediaAccess::constPtr media_r, const Pathname &file_r) | |
| ~FileProvider () | |
| Pathname | localFile () const |
| If no error, expect operator() to return the local Pathname of the provided file. More... | |
| Pathname | operator() () const |
| Return the local Pathname of the provided file or an empty Pathname on error. More... | |
Private Member Functions | |
| FileProvider (const FileProvider &) | |
| FileProvider & | operator= (const FileProvider &) |
Private Attributes | |
| MediaAccess::constPtr | _media |
| Pathname | _file |
| Pathname | _local_file |
Helper class that provides file on construction and cleans up on destruction.
Caution: There's no synchronisation between multiple FileProvider instances, that provide the same file from the same media. If the first one goes out of scope, the file is cleaned. It's just a convenience for 'access and forgett'.
Caution: We should either store the reference MediaAccess' MediaHandler here (for this MediaHandler must become a ref counting pointer class), or we need more info from MediaHandler (whether he's downloading to the local fs. If not, no releasefile is necessary). Currently we can not releaseFile after the media was closed (it's passed to the handler, which is deleted on close).
| MediaBadFilenameException | |
| MediaException |
Definition at line 372 of file MediaAccess.h.
|
private |
|
inline |
| MediaException |
Definition at line 383 of file MediaAccess.h.
|
inline |
Definition at line 404 of file MediaAccess.h.
|
private |
|
inline |
If no error, expect operator() to return the local Pathname of the provided file.
Definition at line 424 of file MediaAccess.h.
|
inline |
Return the local Pathname of the provided file or an empty Pathname on error.
Definition at line 430 of file MediaAccess.h.
|
private |
Definition at line 376 of file MediaAccess.h.
|
private |
Definition at line 377 of file MediaAccess.h.
|
private |
Definition at line 378 of file MediaAccess.h.