6 #include <zypp-media/MediaException> 12 using std::stringstream;
41 Url serviceUrl( service.
url() );
47 mediamanager.
attach( mid );
54 mediamanager.
close( mid );
82 args.push_back(
"/bin/sh" );
83 args.push_back(
"-c" );
88 if ( prog.
close() != 0 )
92 std::string errbuffer;
94 ERR <<
"Capture plugin error:[" << endl << errbuffer << endl <<
']' << endl;
std::string asString(const Patch::Category &obj)
void setProbedTtl(Date::Duration ttl_r) const
Lazy init sugested TTL.
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.
function< bool(const RepoInfo &)> ProcessRepo
Return false from the callback to get a AbortRequestException to be thrown and the processing to be c...
Impl & operator=(const Impl &)=delete
ExternalProgram extended to offer reading programs stderr.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
PluginServiceRepos(const Pathname &root_r, const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
ServiceRepos(const Pathname &root_r, const ServiceInfo &service, const ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
bsc#1080693: Explicitly pass the RemoManagers rootDir until it can be queried from the ServiceInfo...
Interface of repoindex.xml file reader.
void remember(const Exception &old_r)
Store an other Exception as history.
Service type enumeration.
int close() override
Wait for the progamm to complete.
Read repository data from a .repo file.
std::vector< std::string > Arguments
Url url() const
The service url.
bool stderrGetUpTo(std::string &retval_r, const char delim_r, bool returnDelim_r=false)
Read data up to delim_r from stderr (nonblocking).
RIMServiceRepos(const Pathname &, const ServiceInfo &service, const ServiceRepos::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
Base class for Exception.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
Date::Duration ttl() const
Metadata TTL (repoindex.xml:xpath:/repoindex or 0).
Easy-to use interface to the ZYPP dependency resolver.
static Pathname stripprefix(const Pathname &root_r, const Pathname &path_r)
Return path_r with any root_r dir prefix striped.
const std::string & msg() const
Return the message string provided to the ctor.