libzypp 9.41.1

zypp::ServiceInfo Class Reference

#include <ServiceInfo.h>

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

List of all members.

Classes

struct  Impl
struct  RepoState

Public Member Functions

 ServiceInfo ()
 Default ctor creates noService.
 ServiceInfo (const std::string &alias)
 Creates ServiceInfo with specified alias.
 ServiceInfo (const std::string &alias, const Url &url)
 ServiceInfo with alias and its URL.
virtual ~ServiceInfo ()
Url url () const
 Gets url to service.
void setUrl (const Url &url)
 Sets url for this service.
repo::ServiceType type () const
void setType (const repo::ServiceType &type)
 Set service type.
void setProbedType (const repo::ServiceType &t) const
virtual std::ostream & dumpAsIniOn (std::ostream &str) const
 Writes ServiceInfo to stream in ".service" format.
virtual std::ostream & dumpAsXMLOn (std::ostream &str) const
 Write an XML representation of this ServiceInfo object.
virtual std::ostream & dumpAsXMLOn (std::ostream &str, const std::string &content) const
 Write an XML representation of this ServiceInfo object.

Static Public Attributes

static const ServiceInfo noService
 Represents an empty service.

Private Attributes

RWCOW_pointer< Impl_pimpl
 Pointer to implementation.

Related Functions

(Note that these are not member functions.)
typedef shared_ptr< ServiceInfoServiceInfo_Ptr
typedef shared_ptr< const
ServiceInfo
ServiceInfo_constPtr
typedef std::list< ServiceInfoServiceInfoList
std::ostream & operator<< (std::ostream &str, const ServiceInfo &obj)

Set of repos (repository aliases) to enable on next refresh.

Per default new repositories are created in disabled state.But repositories mentioned here will be created in enabled state on the next refresh. Afterwards they get removed from the list.
typedef std::set< std::string > ReposToEnable
 Container of repos.
bool reposToEnableEmpty () const
ReposToEnable::size_type reposToEnableSize () const
ReposToEnable::const_iterator reposToEnableBegin () const
ReposToEnable::const_iterator reposToEnableEnd () const
bool repoToEnableFind (const std::string &alias_r) const
 Wheter alias_r is mentioned in ReposToEnable.
void addRepoToEnable (const std::string &alias_r)
 Add alias_r to the set of ReposToEnable.
void delRepoToEnable (const std::string &alias_r)
 Remove alias_r from the set of ReposToEnable.
void clearReposToEnable ()
 Clear the set of ReposToEnable.

Set of repos (repository aliases) to disable on next refresh.

Repositories mentioned here will be disabled on the next refresh, in case they still exist.Afterwards they get removed from the list.
typedef std::set< std::string > ReposToDisable
 Container of repos.
bool reposToDisableEmpty () const
ReposToDisable::size_type reposToDisableSize () const
ReposToDisable::const_iterator reposToDisableBegin () const
ReposToDisable::const_iterator reposToDisableEnd () const
bool repoToDisableFind (const std::string &alias_r) const
 Wheter alias_r is mentioned in ReposToDisable.
void addRepoToDisable (const std::string &alias_r)
 Add alias_r to the set of ReposToDisable.
void delRepoToDisable (const std::string &alias_r)
 Remove alias_r from the set of ReposToDisable.
void clearReposToDisable ()
 Clear the set of ReposToDisable.

The original repo state as defined by the repoindex.xml upon last refresh.

This state is remembered to detect any user modifications applied to the repos.It may not be available for all repos or in plugin services. In this case all changes requested by a service refresh are applied unconditionally.
typedef std::map< std::string,
RepoState
RepoStates
const RepoStatesrepoStates () const
 Access the remembered repository states.
void setRepoStates (RepoStates newStates_r)
 Remember a new set of repository states.

Detailed Description

Definition at line 33 of file ServiceInfo.h.


Member Typedef Documentation

typedef std::set<std::string> zypp::ServiceInfo::ReposToEnable

Container of repos.

Definition at line 99 of file ServiceInfo.h.

typedef std::set<std::string> zypp::ServiceInfo::ReposToDisable

Container of repos.

Definition at line 123 of file ServiceInfo.h.

typedef std::map<std::string,RepoState> zypp::ServiceInfo::RepoStates

Definition at line 165 of file ServiceInfo.h.


Constructor & Destructor Documentation

zypp::ServiceInfo::ServiceInfo ( )

Default ctor creates noService.

Definition at line 90 of file ServiceInfo.cc.

zypp::ServiceInfo::ServiceInfo ( const std::string &  alias)

Creates ServiceInfo with specified alias.

Parameters:
aliasunique short name of service
zypp::ServiceInfo::ServiceInfo ( const std::string &  alias,
const Url url 
)

ServiceInfo with alias and its URL.

Parameters:
aliasunique shortname of service
urlurl to service
zypp::ServiceInfo::~ServiceInfo ( ) [virtual]

Definition at line 100 of file ServiceInfo.cc.


Member Function Documentation

void zypp::ServiceInfo::setUrl ( const Url url)

Sets url for this service.

Parameters:
urlurl to this service

Definition at line 104 of file ServiceInfo.cc.

References _pimpl, and url().

Referenced by zypp::repo::PluginServices::Impl::loadServices(), and zypp::parser::ServiceFileReader::Impl::parseServices().

repo::ServiceType zypp::ServiceInfo::type ( ) const
void zypp::ServiceInfo::setType ( const repo::ServiceType type)

Set service type.

Parameters:
typethe new type

Definition at line 108 of file ServiceInfo.cc.

References _pimpl, and type().

Referenced by zypp::repo::PluginServices::Impl::loadServices(), and zypp::parser::ServiceFileReader::Impl::parseServices().

void zypp::ServiceInfo::setProbedType ( const repo::ServiceType t) const

Definition at line 111 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::RepoManager::refreshService().

bool zypp::ServiceInfo::reposToEnableEmpty ( ) const

Definition at line 114 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn().

ServiceInfo::ReposToEnable::size_type zypp::ServiceInfo::reposToEnableSize ( ) const

Definition at line 117 of file ServiceInfo.cc.

References _pimpl.

ServiceInfo::ReposToEnable::const_iterator zypp::ServiceInfo::reposToEnableBegin ( ) const

Definition at line 120 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn().

ServiceInfo::ReposToEnable::const_iterator zypp::ServiceInfo::reposToEnableEnd ( ) const

Definition at line 123 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn().

bool zypp::ServiceInfo::repoToEnableFind ( const std::string &  alias_r) const

Wheter alias_r is mentioned in ReposToEnable.

Definition at line 126 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::RepoManager::refreshService().

void zypp::ServiceInfo::addRepoToEnable ( const std::string &  alias_r)

Add alias_r to the set of ReposToEnable.

Definition at line 129 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::parser::ServiceFileReader::Impl::parseServices(), and zypp::RepoManager::refreshService().

void zypp::ServiceInfo::delRepoToEnable ( const std::string &  alias_r)

Remove alias_r from the set of ReposToEnable.

Definition at line 135 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::RepoManager::refreshService().

void zypp::ServiceInfo::clearReposToEnable ( )

Clear the set of ReposToEnable.

Definition at line 138 of file ServiceInfo.cc.

References _pimpl.

bool zypp::ServiceInfo::reposToDisableEmpty ( ) const

Definition at line 142 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn(), and zypp::RepoManager::refreshService().

ServiceInfo::ReposToDisable::size_type zypp::ServiceInfo::reposToDisableSize ( ) const

Definition at line 145 of file ServiceInfo.cc.

References _pimpl.

ServiceInfo::ReposToDisable::const_iterator zypp::ServiceInfo::reposToDisableBegin ( ) const

Definition at line 148 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn().

ServiceInfo::ReposToDisable::const_iterator zypp::ServiceInfo::reposToDisableEnd ( ) const

Definition at line 151 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn().

bool zypp::ServiceInfo::repoToDisableFind ( const std::string &  alias_r) const

Wheter alias_r is mentioned in ReposToDisable.

Definition at line 154 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::RepoManager::refreshService().

void zypp::ServiceInfo::addRepoToDisable ( const std::string &  alias_r)

Add alias_r to the set of ReposToDisable.

Definition at line 157 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::parser::ServiceFileReader::Impl::parseServices().

void zypp::ServiceInfo::delRepoToDisable ( const std::string &  alias_r)

Remove alias_r from the set of ReposToDisable.

Definition at line 163 of file ServiceInfo.cc.

References _pimpl.

void zypp::ServiceInfo::clearReposToDisable ( )

Clear the set of ReposToDisable.

Definition at line 166 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::RepoManager::refreshService().

const ServiceInfo::RepoStates & zypp::ServiceInfo::repoStates ( ) const

Access the remembered repository states.

Definition at line 169 of file ServiceInfo.cc.

References _pimpl.

Referenced by dumpAsIniOn(), zypp::RepoManager::modifyService(), and zypp::RepoManager::refreshService().

void zypp::ServiceInfo::setRepoStates ( RepoStates  newStates_r)

Remember a new set of repository states.

Definition at line 172 of file ServiceInfo.cc.

References _pimpl.

Referenced by zypp::parser::ServiceFileReader::Impl::parseServices(), and zypp::RepoManager::refreshService().

std::ostream & zypp::ServiceInfo::dumpAsXMLOn ( std::ostream &  str) const [virtual]

Write an XML representation of this ServiceInfo object.

Reimplemented from zypp::repo::RepoInfoBase.

Definition at line 216 of file ServiceInfo.cc.

virtual std::ostream& zypp::ServiceInfo::dumpAsXMLOn ( std::ostream &  str,
const std::string &  content 
) const [virtual]

Write an XML representation of this ServiceInfo object.

Parameters:
str
contentif not empty, produces <service ...>content</service> otherwise <service .../>

Reimplemented from zypp::repo::RepoInfoBase.


Friends And Related Function Documentation

typedef shared_ptr<ServiceInfo> ServiceInfo_Ptr [related]

Definition at line 205 of file ServiceInfo.h.

typedef shared_ptr<const ServiceInfo> ServiceInfo_constPtr [related]

Definition at line 207 of file ServiceInfo.h.

typedef std::list<ServiceInfo> ServiceInfoList [related]

Definition at line 209 of file ServiceInfo.h.

std::ostream & operator<< ( std::ostream &  str,
const ServiceInfo obj 
) [related]

Stream output

Definition at line 239 of file ServiceInfo.cc.


Member Data Documentation

Represents an empty service.

Definition at line 58 of file ServiceInfo.h.

Referenced by zypp::RepoManager::getService().


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