23 using std::stringstream;
43 std::list<Pathname> entries;
44 if (PathInfo(path).isExist())
53 for_(it, entries.begin(), entries.end() )
56 service_info.
setAlias((*it).basename());
63 DBG <<
"Plugin Service: " << service_info << endl;
64 callback(service_info);
static void loadServices(const Pathname &path, const PluginServices::ProcessService &callback)
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
void setAutorefresh(bool autorefresh)
enable or disable autorefresh
PluginServices(const Pathname &path, const ProcessService &callback)
void setAlias(const std::string &alias)
set the repository alias
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
void setType(const repo::ServiceType &type)
Set service type.
void setPathName(const std::string &path, EEncoding eflag=zypp::url::E_DECODED)
Set the path name.
void setScheme(const std::string &scheme)
Set the scheme name in the URL.
#define _(MSG)
Return translated text.
static const ServiceType PLUGIN
Plugin services are scripts installed on your system that provide the package manager with repositori...
void setUrl(const Url &url)
Sets url for this service.
std::string form(const char *format,...)
Printf style construction of std::string.
int readdir(std::list< std::string > &retlist_r, const Pathname &path_r, bool dots_r)
Return content of directory via retlist.
Base class for Exception.
function< bool(const ServiceInfo &)> ProcessService
Callback definition.
friend std::ostream & operator<<(std::ostream &str, const PluginServices &obj)