// ---------------------------------------------------------------------------
static void print_service_list(Zypper & zypper,
- const list<Service> & services)
+ const list<ServiceInfo> & services)
{
Table tbl;
bool all = zypper.cOpts().count("details");
int i = 1;
- for (list<Service>::const_iterator it = services.begin();
+ for (list<ServiceInfo>::const_iterator it = services.begin();
it != services.end(); ++it)
{
- Service service = *it;
+ ServiceInfo service = *it;
TableRow tr(all ? 8 : showprio || showuri ? 7 : 6);
// number
void list_services(Zypper & zypper)
{
RepoManager manager(zypper.globalOpts().rm_options);
- list<Service> services;
+ list<ServiceInfo> services;
try
{
// ---------------------------------------------------------------------------
-void add_service(Zypper & zypper, const Service & service)
+void add_service(Zypper & zypper, const ServiceInfo & service)
{
RepoManager manager(zypper.globalOpts().rm_options);
MIL << "going to add service by url (alias=" << alias << ", url=" << url
<< ")" << endl;
- Service service;
+ ServiceInfo service;
//! \todo what about service type? compare to rug. idea: do addrepo if type is specified and is not NU.
//if ( ! type.empty() )
// ---------------------------------------------------------------------------
-void remove_service(Zypper & zypper, const Service & service)
+void remove_service(Zypper & zypper, const ServiceInfo & service)
{
RepoManager manager(zypper.globalOpts().rm_options);
RepoManager manager(zypper.globalOpts().rm_options);
- list<Service> services;
+ list<ServiceInfo> services;
try
{
services.insert(services.end(), manager.serviceBegin(), manager.serviceEnd());
for_(sit, services.begin(), services.end())
{
- Service s = *sit;
+ ServiceInfo s = *sit;
try
{
// ---------------------------------------------------------------------------
-bool match_service(Zypper & zypper, string str, Service * service)
+bool match_service(Zypper & zypper, string str, ServiceInfo * service)
{
RepoManager manager(zypper.globalOpts().rm_options);
- list<Service> known;
+ list<ServiceInfo> known;
known.insert(known.end(), manager.serviceBegin(), manager.serviceEnd());
bool found = false;
unsigned int number = 1; // repo number
- for (list<Service>::const_iterator known_it = known.begin();
+ for (list<ServiceInfo>::const_iterator known_it = known.begin();
known_it != known.end(); ++known_it, ++number)
{
unsigned int tmp = 0;
#include "zypp/TriBool.h"
#include "zypp/Url.h"
#include "zypp/RepoInfo.h"
-#include "zypp/Service.h"
+#include "zypp/ServiceInfo.h"
#include "Zypper.h"
void list_services(Zypper & zypper);
-void add_service(Zypper & zypper, const zypp::Service & service);
+void add_service(Zypper & zypper, const zypp::ServiceInfo & service);
void add_service_by_url( Zypper & zypper,
const zypp::Url & url, const std::string & alias,
const std::string & type,
boost::tribool enabled = boost::indeterminate);
-void remove_service(Zypper & zypper, const zypp::Service & service);
+void remove_service(Zypper & zypper, const zypp::ServiceInfo & service);
void refresh_services(Zypper & zypper);
-bool match_service(Zypper & zypper, std::string str, zypp::Service * service);
+bool match_service(Zypper & zypper, std::string str, zypp::ServiceInfo * service);
/**
* Initialize rpm database on target, if not already initialized.
#include "zypp/Resolvable.h"
#include "zypp/Pathname.h"
#include "zypp/RepoInfo.h"
-#include "zypp/Service.h"
+#include "zypp/ServiceInfo.h"
#include "Zypper.h"
// comparator for Service set
class ServiceAliasComparator
{
- public: bool operator()(const zypp::Service & a, const zypp::Service & b)
+ public: bool operator()(const zypp::ServiceInfo & a, const zypp::ServiceInfo & b)
{
return a.alias() < b.alias();
}