44 if (PathInfo(plugin_path).isExist()) {
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 =
"\nX-libcurl-Empty-Header-Workaround: *";
73 headers.insert(values);
76 else if (r.command() ==
"ERROR") {
86 return str <<
"UrlResolverPlugin::Impl";
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.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
Pathname pluginsPath() const
Defaults to /usr/lib/zypp/plugins.
zypp::url::ParamMap getQueryStringMap(EEncoding eflag=zypp::url::E_DECODED) const
Returns a string map with query parameter and their values.
void open()
Setup connection and execute script.
PluginFrame receive() const
Receive a PluginFrame.
HeaderList::const_iterator HeaderListIterator
Header list iterator.
void setHeader(const std::string &key_r, const std::string &value_r=std::string())
Set header for key_r removing all other occurences of key_r.
std::string getScheme() const
Returns the scheme name of the URL.
Interface to pluigin scripts using a Stomp inspired communication protocol.
void send(const PluginFrame &frame_r) const
Send a PluginFrame.