12 using std::stringstream;
43 Url serviceUrl( service.
url() );
49 mediamanager.
attach( mid );
50 mediamanager.
provideFile( mid,
"repo/repoindex.xml" );
51 Pathname path = mediamanager.
localPath(mid,
"repo/repoindex.xml" );
54 mediamanager.
close( mid );
73 Url serviceUrl( service.
url() );
78 args.push_back(
"/bin/sh" );
79 args.push_back(
"-c" );
80 args.push_back( serviceUrl.getPathName() );
84 if ( prog.
close() != 0 )
88 std::string errbuffer;
90 ERR <<
"Capture plugin error:[" << endl << errbuffer << endl <<
']' << endl;
PluginServiceRepos(const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
function< bool(const RepoInfo &)> ProcessRepo
Callback definition.
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.
ServiceRepos::ProcessRepo _callback
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.
ServiceRepos::ProcessRepo _callback
Url url() const
Gets url to service.