libzypp  13.10.6
zypp::repo::RepoInfoBase Class Reference

Base class implementing common features of RepoInfo and ServiceInfo. More...

#include <RepoInfoBase.h>

Inheritance diagram for zypp::repo::RepoInfoBase:
zypp::RepoInfo zypp::ServiceInfo

Classes

struct  Impl
 

Public Member Functions

 RepoInfoBase ()
 
 RepoInfoBase (const std::string &alias)
 
virtual ~RepoInfoBase ()
 
std::string alias () const
 unique identifier for this source. More...
 
std::string escaped_alias () const
 Same as alias(), just escaped in a way to be a valid file name. More...
 
std::string name () const
 Repository short label. More...
 
std::string label () const
 Label for use in messages for the user interface. More...
 
bool enabled () const
 If enabled is false, then this repository must be ignored as if does not exists, except when checking for duplicate alias. More...
 
bool autorefresh () const
 If true, the repostory must be refreshed before creating resolvables from it. More...
 
Pathname filepath () const
 File where this repo was read from. More...
 
void setAlias (const std::string &alias)
 set the repository alias More...
 
void setName (const std::string &name)
 set the repository name More...
 
void setEnabled (bool enabled)
 enable or disable the repository More...
 
void setAutorefresh (bool autorefresh)
 enable or disable autorefresh More...
 
void setFilepath (const Pathname &filename)
 set the path to the .repo file More...
 
virtual std::ostream & dumpOn (std::ostream &str) const
 Write a human-readable representation of this RepoInfoBase object into the str stream. More...
 
virtual std::ostream & dumpAsIniOn (std::ostream &str) const
 Write this RepoInfoBase object into str in a .repo (ini) file format. More...
 
virtual std::ostream & dumpAsXMLOn (std::ostream &str) const
 Write an XML representation of this object. More...
 
virtual std::ostream & dumpAsXMLOn (std::ostream &str, const std::string &content) const
 Write an XML representation of this object with content (if available). More...
 

Private Attributes

RWCOW_pointer< Impl_pimpl
 Pointer to implementation. More...
 

Friends

std::ostream & operator<< (std::ostream &str, const RepoInfoBase &obj)
 

Related Functions

(Note that these are not member functions.)

typedef shared_ptr< RepoInfoBaseRepoInfoBase_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)
 

Detailed Description

Base class implementing common features of RepoInfo and ServiceInfo.

Definition at line 36 of file RepoInfoBase.h.

Constructor & Destructor Documentation

zypp::repo::RepoInfoBase::RepoInfoBase ( )

Definition at line 68 of file RepoInfoBase.cc.

zypp::repo::RepoInfoBase::RepoInfoBase ( const std::string &  alias)
zypp::repo::RepoInfoBase::~RepoInfoBase ( )
virtual

Definition at line 86 of file RepoInfoBase.cc.

Member Function Documentation

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 122 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 125 of file RepoInfoBase.cc.

std::string zypp::repo::RepoInfoBase::name ( ) const

Repository short label.

Short label or description of the repository. ie: "SUSE Linux 10.2 updates"

Definition at line 128 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 139 of file RepoInfoBase.cc.

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 115 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 119 of file RepoInfoBase.cc.

Pathname zypp::repo::RepoInfoBase::filepath ( ) const

File where this repo was read from.

Note
could be an empty pathname for repo infos created in memory.

Definition at line 146 of file RepoInfoBase.cc.

void zypp::repo::RepoInfoBase::setAlias ( const std::string &  alias)

set the repository alias

See Also
alias
Parameters
alias

Definition at line 99 of file RepoInfoBase.cc.

void zypp::repo::RepoInfoBase::setName ( const std::string &  name)

set the repository name

See Also
name
Parameters
name

Definition at line 104 of file RepoInfoBase.cc.

void zypp::repo::RepoInfoBase::setEnabled ( bool  enabled)

enable or disable the repository

See Also
enabled
Parameters
enabled

Definition at line 89 of file RepoInfoBase.cc.

void zypp::repo::RepoInfoBase::setAutorefresh ( bool  autorefresh)

enable or disable autorefresh

See Also
autorefresh
Parameters
enabled

Definition at line 94 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.

Parameters
pathFile path

Definition at line 109 of file RepoInfoBase.cc.

std::ostream & zypp::repo::RepoInfoBase::dumpOn ( std::ostream &  str) const
virtual

Write a human-readable representation of this RepoInfoBase object into the str stream.

Useful for logging.

Reimplemented in zypp::RepoInfo.

Definition at line 150 of file RepoInfoBase.cc.

std::ostream & zypp::repo::RepoInfoBase::dumpAsIniOn ( std::ostream &  str) const
virtual

Write this RepoInfoBase object into str in a .repo (ini) file format.

Reimplemented in zypp::RepoInfo, and zypp::ServiceInfo.

Definition at line 161 of file RepoInfoBase.cc.

std::ostream & zypp::repo::RepoInfoBase::dumpAsXMLOn ( std::ostream &  str) const
virtual

Write an XML representation of this object.

Implement in derived classes.

Reimplemented in zypp::RepoInfo, and zypp::ServiceInfo.

Definition at line 172 of file RepoInfoBase.cc.

std::ostream & zypp::repo::RepoInfoBase::dumpAsXMLOn ( std::ostream &  str,
const std::string &  content 
) const
virtual

Write an XML representation of this object with content (if available).

Reimplemented in zypp::RepoInfo, and zypp::ServiceInfo.

Definition at line 175 of file RepoInfoBase.cc.

Friends And Related Function Documentation

Definition at line 177 of file RepoInfoBase.h.

Definition at line 179 of file RepoInfoBase.h.

std::ostream& operator<< ( std::ostream &  str,
const RepoInfoBase obj 
)
friend

Definition at line 180 of file RepoInfoBase.cc.

bool operator== ( const RepoInfoBase lhs,
const RepoInfoBase rhs 
)
related

Definition at line 163 of file RepoInfoBase.h.

bool operator!= ( const RepoInfoBase lhs,
const RepoInfoBase rhs 
)
related

Definition at line 167 of file RepoInfoBase.h.

std::ostream & operator<< ( std::ostream &  str,
const RepoInfoBase obj 
)
related

Stream output

Definition at line 180 of file RepoInfoBase.cc.

Member Data Documentation

RWCOW_pointer<Impl> zypp::repo::RepoInfoBase::_pimpl
private

Pointer to implementation.

Definition at line 155 of file RepoInfoBase.h.


The documentation for this class was generated from the following files: