12 #ifndef ZYPP_PLUGINSCRIPT_H 13 #define ZYPP_PLUGINSCRIPT_H 105 PluginScript(
const Pathname & script_r,
const Arguments & args_r );
109 const Pathname &
script()
const;
112 const Arguments &
args()
const;
157 void open(
const Pathname & script_r );
160 void open(
const Pathname & script_r,
const Arguments & args_r );
197 #endif // ZYPP_PLUGINSCRIPT_H static void defaultTimeout(long newval_r)
Set global default timeout (sec.) (both: send and receive).
friend std::ostream & operator<<(std::ostream &str, const PluginScript &obj)
const Arguments & args() const
Return the script arguments if set.
void timeout(long newval_r)
Set local default timeout (sec.) (both: send and receive).
Command frame for communication with PluginScript.
std::vector< std::string > Arguments
Commandline arguments passed to a script on open.
long sendTimeout() const
Local default timeout (sec.) when sending data.
pid_t getPid() const
Return a connected scripts pid or NotConnected.
PluginScript implementation.
String related utilities and Regular expression matching.
PluginScript()
Default ctor.
static const pid_t NotConnected
pid_t(-1) constant indicating no connection.
int lastReturn() const
Remembers a scripts return value after close until next open.
RW_pointer< Impl > _pimpl
Pointer to implementation.
const Pathname & script() const
Return the script path if set.
static long defaultSendTimeout()
Global default timeout (sec.) when sending data.
long receiveTimeout() const
Local default timeout (sec.) when receiving data.
static long defaultReceiveTimeout()
Global default timeout (sec.) when receiving data.
void open()
Setup connection and execute script.
PluginFrame receive() const
Receive a PluginFrame.
bool isOpen() const
Whether we are connected to a script.
const std::string & lastExecError() const
Remembers a scripts execError string after close until next open.
int close()
Close any open connection.
Interface to plugin scripts using a Stomp inspired communication protocol.
Easy-to use interface to the ZYPP dependency resolver.
void send(const PluginFrame &frame_r) const
Send a PluginFrame.