13 #include <zypp/base/Logger.h> 15 #include <zypp-media/MediaException> 46 scr.
open(plugin_path);
51 url::ParamMap::const_iterator param_it;
52 for( param_it = params.begin();
53 param_it != params.end();
55 f.
setHeader(param_it->first, param_it->second);
60 if (r.command() ==
"RESOLVEDURL") {
65 for (it = r.headerBegin();
68 std::pair<std::string, std::string> values(*it);
70 if (values.second.empty()) {
71 values.second =
"\r\nX-libcurl-Empty-Header-Workaround: *";
73 headers.insert(values);
76 else if (r.command() ==
"ERROR") {
86 return str <<
"UrlResolverPlugin::Impl";
std::string getScheme() const
Returns the scheme name of the URL.
std::map< std::string, std::string > ParamMap
A parameter map container.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
static ZConfig & instance()
Singleton ctor.
Command frame for communication with PluginScript.
String related utilities and Regular expression matching.
zypp::url::ParamMap getQueryStringMap(EEncoding eflag=zypp::url::E_DECODED) const
Returns a string map with query parameter and their values.
PluginFrame receive() const
Receive a PluginFrame.
bool isExist() const
Return whether valid stat info exists.
void send(const PluginFrame &frame_r) const
Send a PluginFrame.
void open()
Setup connection and execute script.
HeaderList::const_iterator HeaderListIterator
Header list iterator.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
Wrapper class for ::stat/::lstat.
void setHeader(const std::string &key_r, const std::string &value_r=std::string())
Set header for key_r removing all other occurrences of key_r.
Interface to plugin scripts using a Stomp inspired communication protocol.
Easy-to use interface to the ZYPP dependency resolver.
Pathname pluginsPath() const
Defaults to /usr/lib/zypp/plugins.