* find current contact information at www.suse.com.
*/
-#include <string>
-
-using namespace std;
+#include <string>
#include <boost/process.hpp>
-namespace bp = boost::process;
-
#include "zypp-plugin.h"
+using namespace std;
+namespace bp = boost::process;
+
/**
* A middleware that can wrap an actual plugin for enhanced validation.
{
if (argc != 2)
throw runtime_error("Usage: forwarding-zypp-plugin ANOTHER_ZYPP_PLUGIN");
+
ForwardingZyppPlugin plugin(argv[1]);
return plugin.main();
}
* find current contact information at www.suse.com.
*/
+
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#ifndef SNAPPER_ZYPP_COMMIT_PLUGIN_H
#define SNAPPER_ZYPP_COMMIT_PLUGIN_H
+
#include "zypp-commit-plugin.h"
#include "solvable-matcher.h"
* find current contact information at www.suse.com.
*/
+
#include "solvable-matcher.h"
#include <fnmatch.h>
ZyppPlugin::Message
ZyppCommitPlugin::dispatch(const Message& msg)
{
- if (msg.command == "PLUGINBEGIN") {
+ if (msg.command == "PLUGINBEGIN")
return plugin_begin(msg);
- }
- if (msg.command == "PLUGINEND") {
+ if (msg.command == "PLUGINEND")
return plugin_end(msg);
- }
- if (msg.command == "COMMITBEGIN") {
+ if (msg.command == "COMMITBEGIN")
return commit_begin(msg);
- }
- if (msg.command == "COMMITEND") {
+ if (msg.command == "COMMITEND")
return commit_end(msg);
- }
return ZyppPlugin::dispatch(msg);
}
#ifndef ZYPP_COMMIT_PLUGIN_H
#define ZYPP_COMMIT_PLUGIN_H
+
#include "zypp-plugin.h"
* find current contact information at www.suse.com.
*/
+
#include <iostream>
#include <boost/algorithm/string/trim.hpp>
#include <string>
Message msg = read_message(pin);
if (pin.eof())
break;
+
Message reply = dispatch(msg);
write_message(pout, reply);
}
+
return 0;
}
#ifndef ZYPP_PLUGIN_H
#define ZYPP_PLUGIN_H
+
#include <iostream>
#include <map>
#include <string>
+
class ZyppPlugin
{
public: