12 #ifndef ZYPP_PLUGINSCRIPT_H
13 #define ZYPP_PLUGINSCRIPT_H
109 const Pathname &
script()
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.
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.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
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.
Wrapper for const correct access via Smart pointer types.
Interface to pluigin scripts using a Stomp inspired communication protocol.
void send(const PluginFrame &frame_r) const
Send a PluginFrame.