hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CommandExecutor.hpp
Go to the documentation of this file.
1 
14 #ifndef COMMAND_EXECUTOR_HPP
15 #define COMMAND_EXECUTOR_HPP
16 
17 #include <stdlib.h>
18 #include <sys/types.h>
19 #include <stdio.h>
20 #include <string.h>
21 #include <unistd.h>
22 #include <utility>
23 
24 #include <Poco/SharedPtr.h>
25 
26 #include "Command.hpp"
27 #include "CommandResultData.hpp"
28 #include "Process.hpp"
29 #include "StarterExecutor.hpp"
30 
31 namespace HCE
32 {
33 //-----------------------------------------------------------------------------
35 {
36 public:
37  CommandExecutor(void) : statusExecution(StarterExecutor::StatusExecution::seUnknown) {}
39 
40  Poco::SharedPtr<CommandResultData> execute(const Command& command, Process::CallbackFunction fn, unsigned int allowedTime=0);
41 
42  StarterExecutor::StatusExecution getStatusExecution(void) const {return statusExecution;}
43 private:
44  StarterExecutor::StatusExecution statusExecution;
45 };
46 //-----------------------------------------------------------------------------
47 //-----------------------------------------------------------------------------
48 } // end namespace HCE
49 
50 #endif // COMMAND_EXECUTOR_HPP