12 using std::stringstream;
33 Url serviceUrl( service.
url() );
39 mediamanager.
attach( mid );
40 mediamanager.
provideFile( mid,
"repo/repoindex.xml" );
41 Pathname path = mediamanager.
localPath(mid,
"repo/repoindex.xml" );
45 mediamanager.
close( mid );
57 Url serviceUrl( service.
url() );
62 args.push_back(
"/bin/sh" );
63 args.push_back(
"-c" );
64 args.push_back( serviceUrl.getPathName() );
68 if ( prog.
close() != 0 )
72 std::string errbuffer;
74 ERR <<
"Capture plugin error:[" << endl << errbuffer << endl <<
']' << endl;
function< bool(const RepoInfo &)> ProcessRepo
Return false from the callback to get a AbortRequestException to be thrown and the processing to be c...
Date::Duration ttl() const
Metadata TTL (repoindex.xml:xpath:/repoindex or 0).
Retrieval of repository list for a service.
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
Reads through a repoindex.xml file and collects repositories.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
ExternalProgram extended to offer reading programs stderr.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
std::vector< std::string > Arguments
Interface of repoindex.xml file reader.
ServiceRepos(const ServiceInfo &service, const ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
RIMServiceRepos(const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Service type enumeration.
Read repository data from a .repo file.
bool stderrGetUpTo(std::string &retval_r, const char delim_r, bool returnDelim_r=false)
Read data up to delim_r from stderr (nonblocking).
int close()
Wait for the progamm to complete.
PluginServiceRepos(const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
void setProbedTtl(Date::Duration ttl_r) const
Lazy init sugested TTL.
Url url() const
The service url.