#include <InstSrc.h>
Inheritance diagram for InstSrc:
Public Types | |
typedef InstSrcError | Error |
typedef PM::NumericISrcID | NumericISrcID |
typedef PM::NumericISrcID | UniqueID |
enum | Type { T_UNKNOWN, T_UnitedLinux, T_PlainDir, T_AUTODETECT } |
Public Member Functions | |
NumericISrcID | srcID () const |
bool | specialCache () const |
void | rememberPreviouslyDnlPackage (const Pathname &newpath_r) const |
Pathname | cache_dir () const |
Pathname | cache_descr_dir () const |
Pathname | cache_data_dir () const |
Pathname | cache_media_dir () const |
constInstSrcDescrPtr | descr () const |
InstSrcDescrPtr | descr () |
constInstSrcDataPtr | data () const |
InstSrcDataPtr | data () |
constMediaAccessPtr | media () const |
MediaAccessPtr | media () |
void | preferredLocaleChanged () const |
PMError | enableSource () |
PMError | disableSource () |
bool | enabled () const |
PMError | providePackage (int medianr, const Pathname &name, const Pathname &dir, Pathname &path_r) const |
PMError | provideFile (int medianr, const Pathname &path, Pathname &file_r) const |
PMError | provideDir (int medianr, const Pathname &path, Pathname &dir_r) const |
bool | isRemote (void) const |
PMError | changeUrl (const Url &newUrl_r) |
PMError | releaseMedia (bool if_removable_r=false) const |
std::ostream & | dumpOn (std::ostream &str) const |
Static Public Member Functions | |
std::string | toString (const Type t) |
Type | fromString (std::string s) |
PMError | vconstruct (InstSrcPtr &nsrc_r, const Pathname &cachedir_r) |
PMError | vconstruct (InstSrcPtr &nsrc_r, const Pathname &cachedir_r, const Url &mediaurl_r, const Pathname &produduct_dir_r, Type type_r=T_AUTODETECT) |
Static Public Attributes | |
const NumericISrcID | noID |
Protected Member Functions | |
InstSrc () | |
~InstSrc () | |
Private Member Functions | |
REP_BODY (InstSrc) | |
void | _mgr_attach () |
Pathname | cachePath (const Pathname &sub_r) const |
PMError | _init_openCache (const Pathname &cachedir_r) |
PMError | _init_newCache (const Pathname &cachedir_r) |
PMError | _init_newMedia (const Url &mediaurl_r, const Pathname &produduct_dir_r, Type type_r) |
PMError | writeDescrCache () |
PMError | provideMedia (int medianr) const |
Private Attributes | |
const NumericISrcID | _srcID |
Pathname | _cache |
bool | _cache_deleteOnExit |
bool | _may_use_cache |
Pathname | previouslyDnlPackage |
int | _specialCache |
MediaAccessPtr | _media |
InstSrcDescrPtr | _descr |
InstSrcDataPtr | _data |
int | _medianr |
Static Private Attributes | |
NumericISrcID | _SRCID |
const Pathname | _c_descr_dir |
const Pathname | _c_data_dir |
const Pathname | _c_media_dir |
Friends | |
std::ostream & | operator<< (std::ostream &str, const Type obj) |
|
default error class |
|
Unique InstSrc ID |
|
|
|
Known types of InstSrc. For each type there must be a concrete InstSrcData able to handle that kind of InstSrc. Autodetect switch in _init_newMedia must be adjusted, if types are added/removed.
|
|
constructor Protected, because InstSrc is to be constructed via InstSrc::vconstruct only. |
|
destructor |
|
Used by InstSrc::vconstruct to set up an InstSrc from URL. A new cachedir is created and initialized: cachedir must not exist, but parent dir must. _cache_deleteOnExit is set, so cachedir will be deleted if further initialisation fails. InstSrc::vconstruct will clear the flag, if initialisation succeeded. |
|
Used by InstSrc::vconstruct to set up an InstSrc from URL. Create MediaAcess and open media. Try to get InstSrcDescr from media (if type_r == T_UNKNOWN autodetect type). Media remains open. |
|
Used by InstSrc::vconstruct to set up an InstSrc from an existing cachedir. Setup InstSrc from an (existing!) cachedir. cache_descr_dir must exist. InstSrcDescr is created from cache_descr_dir. MediaAccess is created, but media remains closed. |
|
Called from InstSrcManager on add to it's known sources pool. Unsets _cache_deleteOnExit, and writes description cache. |
|
Full path of InstSrcData cache dir. If it does not exist, no chache write is desired. |
|
Full path of InstSrcDescr cache dir. If it does not exist, no chache write is desired. |
|
Full path of cache_dir. |
|
Full path of (prefered) madia attach point. |
|
Helper function to combine _cache and subpaths. |
|
change URL close current media and re-open with new media |
|
Access to installation source data |
|
Const access to installation source data |
|
Access to installation source description |
|
Const access to installation source description |
|
From InstSrcManager: Release concrete InstSrcData. InstSrcData must withdraw provided Objects from Manager classes. |
|
Reimplemented from CountedRep. |
|
True if enabled (i.e. providing data to Manager classes ). |
|
From InstSrcManager: Provide concrete InstSrcData according to Type info stored in _descr. InstSrcData must provide Objects located on the media to the appropriate Manager classes. |
|
Restore Type from string (on restore from file). Keep it compatible with toString. |
|
is the media for this source is remote and package provide takes some time |
|
Access to media |
|
Const access to media |
|
Triggered on change of preferredLocale |
|
provide directory via medianr and path path is relative to the media root returns error code return local path in dir_r uses media change callback |
|
provide file via medianr and path path is relative to the media root returns error code return local path in file_r uses media change callback |
|
provide media by number |
|
provide package via medianr, name, and sub-dir name is the rpm file name dir is the directory below returns local path or empty on error uses media change callback |
|
release media. if_removable is true: release if CD/DVD only. |
|
Don't use it except.... |
|
|
|
Public, but for internal use by PMUlDataProvider only. |
|
|
|
Convert Type to string (on save to file). Keep it compatible with fromString. |
|
Try to construct an InstSrc from an URL. type_r == T_UNKNOWN means autodetect type of InstSrc located at URL. The new InstSrc provides a valid description. Media is open. Return new InstSrc via nsrc_r, or NULL if error.
|
|
Construct an InstSrc from an (existing!) cachedir. The new InstSrc provides a valid description. Media is closed. Return new InstSrc via nsrc_r, or NULL if error.
|
|
Sync InstSrcDescr to cache. |
|
Output Type as string |
|
Subpath (below _cache) to cached InstSrcData. |
|
Subpath (below _cache) to cached InstSrcDescr. |
|
Subpath (below _cache) to madia attach point. |
|
Cachedir to use. |
|
If true, delete cachedir in destructor. |
|
content of media |
|
description of media |
|
If true, data and description cache directories should be created and used. (false during installation, when no system is present) |
|
direct media access |
|
Current media number. Mutable because media provide/release are const methods. |
|
For internal use by PMUlDataProvider only. |
|
The unique InstSrc ID |
|
Static counter to create unique InstSrc IDs |
|
No or invalid unique InstSrc ID |
|
for remote package provide |