ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Go to the documentation of this file.
10 #ifndef DAQ_DPM_MOCK_MOCKASYNCPROCESS_HPP
11 #define DAQ_DPM_MOCK_MOCKASYNCPROCESS_HPP
13 #include <gmock/gmock.h>
22 virtual boost::future<int>
Initiate()
override {
33 boost::signals2::connection
ConnectStdout(SigOutStream::slot_type
const& slot)
override {
34 return stdout.connect(slot);
36 boost::signals2::connection
ConnectStderr(SigOutStream::slot_type
const& slot)
override {
37 return stderr.connect(slot);
47 boost::signals2::connection
ConnectProgress(SigProgress::slot_type
const& slot)
override {
53 #endif // #ifndef DAQ_DPM_MOCK_MOCKASYNCPROCESS_HPP
MOCK_METHOD(std::error_code, Signal,(int),(override, noexcept))
boost::signals2::connection ConnectProgress(SigProgress::slot_type const &slot) override
Connect to progress signal.
virtual std::vector< std::string > const & GetArguments() const noexcept=0
MOCK_METHOD(std::optional< pid_t >, GetPid,(),(const, noexcept, override))
boost::signals2::connection ConnectStderr(SigOutStream::slot_type const &slot) override
Connect slot to line-buffered stderr signal.
virtual boost::future< int > Initiate() override
Initiates async operation by executing the specified process.
boost::promise< int > promise
virtual std::error_code Signal(int sig) noexcept=0
Send signal to process.
virtual std::error_code Abort() noexcept=0
Aborts the operation by terminating process which completes the operation.
MOCK_METHOD(std::error_code, Abort,(),(noexcept, override))
boost::signals2::signal< void(pid_t, RsyncProgress const &)> SigProgress
Progress update signal.
boost::signals2::connection ConnectStdout(SigOutStream::slot_type const &slot) override
Connect slot to line-buffered stdout signal.
virtual bool IsRunning() const noexcept=0
daq::RsyncAsyncProcess and related class declarations.
boost::signals2::signal< void(pid_t, std::string const &)> SigOutStream
Signal type for stdout/stderr signals.
MOCK_METHOD(std::vector< std::string > const &, GetArguments,(),(const, override, noexcept))
boost::signals2::signal< void(pid_t, RsyncProgress const &)> SigProgress
Progress update signal.
virtual std::optional< pid_t > GetPid() const noexcept=0
Get PID.
More specialized version for rsync which also monitors transfer progress.
Interface to asynchronous process.
MOCK_METHOD(bool, IsRunning,(),(const, noexcept, override))