libzypp 17.31.23
|
Base class implementing common features of RepoInfo and ServiceInfo. More...
#include <repo/RepoInfoBase.h>
Classes | |
class | Impl |
RepoInfoBase data. More... | |
Public Member Functions | |
RepoInfoBase () | |
RepoInfoBase (const std::string &alias) | |
virtual | ~RepoInfoBase () |
std::string | alias () const |
unique identifier for this source. | |
std::string | escaped_alias () const |
Same as alias(), just escaped in a way to be a valid file name. | |
std::string | name () const |
Repository name. | |
std::string | rawName () const |
The raw metadata name (no default, no variables replaced). | |
std::string | label () const |
Label for use in messages for the user interface. | |
std::string | asUserString () const |
User string: label (alias or name) | |
bool | enabled () const |
If enabled is false, then this repository must be ignored as if does not exists, except when checking for duplicate alias. | |
bool | autorefresh () const |
If true, the repostory must be refreshed before creating resolvables from it. | |
Pathname | filepath () const |
File where this repo was read from. | |
void | setAlias (const std::string &alias) |
set the repository alias | |
void | setName (const std::string &name) |
set the repository name | |
void | setEnabled (bool enabled) |
enable or disable the repository | |
void | setAutorefresh (bool autorefresh) |
enable or disable autorefresh | |
void | setFilepath (const Pathname &filename) |
set the path to the .repo file | |
virtual std::ostream & | dumpOn (std::ostream &str) const |
Write a human-readable representation of this RepoInfoBase object into the str stream. | |
virtual std::ostream & | dumpAsIniOn (std::ostream &str) const |
Write this RepoInfoBase object into str in a .repo (ini) file format. | |
virtual std::ostream & | dumpAsXmlOn (std::ostream &str, const std::string &content="") const |
Write an XML representation of this object with content (if available). | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const RepoInfoBase &obj) |
Related Functions | |
(Note that these are not member functions.) | |
typedef shared_ptr< RepoInfoBase > | RepoInfoBase_Ptr |
typedef shared_ptr< const RepoInfoBase > | RepoInfoBase_constPtr |
bool | operator== (const RepoInfoBase &lhs, const RepoInfoBase &rhs) |
bool | operator!= (const RepoInfoBase &lhs, const RepoInfoBase &rhs) |
std::ostream & | operator<< (std::ostream &str, const RepoInfoBase &obj) |
Stream output. | |
Base class implementing common features of RepoInfo and ServiceInfo.
Definition at line 39 of file RepoInfoBase.h.
zypp::repo::RepoInfoBase::RepoInfoBase | ( | ) |
Definition at line 77 of file RepoInfoBase.cc.
zypp::repo::RepoInfoBase::RepoInfoBase | ( | const std::string & | alias | ) |
Definition at line 81 of file RepoInfoBase.cc.
|
virtual |
Definition at line 85 of file RepoInfoBase.cc.
std::string zypp::repo::RepoInfoBase::alias | ( | ) | const |
unique identifier for this source.
If not specified It should be generated from the base url.
Normally, in a .repo file the section name is used ( [somerepo] )
Definition at line 111 of file RepoInfoBase.cc.
std::string zypp::repo::RepoInfoBase::escaped_alias | ( | ) | const |
Same as alias(), just escaped in a way to be a valid file name.
Definition at line 114 of file RepoInfoBase.cc.
std::string zypp::repo::RepoInfoBase::name | ( | ) | const |
Repository name.
Short label or description of the repository. Defaults to alias. Subject to repo variable replacement (
Definition at line 117 of file RepoInfoBase.cc.
std::string zypp::repo::RepoInfoBase::rawName | ( | ) | const |
The raw metadata name (no default, no variables replaced).
Definition at line 124 of file RepoInfoBase.cc.
std::string zypp::repo::RepoInfoBase::label | ( | ) | const |
Label for use in messages for the user interface.
Returns an alias or name, according to ZConfig::repoLabelIsAlias().
Definition at line 127 of file RepoInfoBase.cc.
|
inline |
User string: label (alias or name)
Definition at line 82 of file RepoInfoBase.h.
bool zypp::repo::RepoInfoBase::enabled | ( | ) | const |
If enabled is false, then this repository must be ignored as if does not exists, except when checking for duplicate alias.
Definition at line 104 of file RepoInfoBase.cc.
bool zypp::repo::RepoInfoBase::autorefresh | ( | ) | const |
If true, the repostory must be refreshed before creating resolvables from it.
Definition at line 108 of file RepoInfoBase.cc.
Pathname zypp::repo::RepoInfoBase::filepath | ( | ) | const |
File where this repo was read from.
Definition at line 134 of file RepoInfoBase.cc.
void zypp::repo::RepoInfoBase::setAlias | ( | const std::string & | alias | ) |
set the repository alias
alias |
Definition at line 94 of file RepoInfoBase.cc.
void zypp::repo::RepoInfoBase::setName | ( | const std::string & | name | ) |
void zypp::repo::RepoInfoBase::setEnabled | ( | bool | enabled | ) |
enable or disable the repository
enabled |
Definition at line 88 of file RepoInfoBase.cc.
void zypp::repo::RepoInfoBase::setAutorefresh | ( | bool | autorefresh | ) |
enable or disable autorefresh
enabled |
Definition at line 91 of file RepoInfoBase.cc.
void zypp::repo::RepoInfoBase::setFilepath | ( | const Pathname & | filename | ) |
set the path to the .repo file
The path to the .repo file where this repository was defined, or empty if nowhere.
path | File path |
Definition at line 100 of file RepoInfoBase.cc.
|
virtual |
Write a human-readable representation of this RepoInfoBase object into the str stream.
Useful for logging.
Reimplemented in zypp::RepoInfo.
Definition at line 138 of file RepoInfoBase.cc.
|
virtual |
Write this RepoInfoBase object into str in a .repo (ini) file format.
Raw values, no variable replacement.
Reimplemented in zypp::RepoInfo, and zypp::ServiceInfo.
Definition at line 150 of file RepoInfoBase.cc.
|
virtual |
Write an XML representation of this object with content (if available).
Repo variables replaced.
Reimplemented in zypp::RepoInfo, and zypp::ServiceInfo.
Definition at line 162 of file RepoInfoBase.cc.
|
related |
Definition at line 182 of file RepoInfoBase.h.
|
related |
Definition at line 184 of file RepoInfoBase.h.
|
friend |
Definition at line 167 of file RepoInfoBase.cc.
|
related |
Definition at line 168 of file RepoInfoBase.h.
|
related |
Definition at line 172 of file RepoInfoBase.h.
|
related |
Stream output.
Definition at line 167 of file RepoInfoBase.cc.
|
private |
Pointer to implementation.
Definition at line 163 of file RepoInfoBase.h.