2 #include "includes/subprocess_result.h"
4 // shorter than using namespace ...
5 using namespace linuxdeploy::subprocess;
7 subprocess_result::subprocess_result(int exit_code, subprocess_result_buffer_t stdout_contents,
8 subprocess_result_buffer_t stderr_contents)
9 : exit_code_(exit_code), stdout_contents_(std::move(stdout_contents)), stderr_contents_(std::move(stderr_contents)) {}
12 int subprocess_result::exit_code() const {
16 const subprocess_result_buffer_t& subprocess_result::stdout_contents() const {
17 return stdout_contents_;
20 const subprocess_result_buffer_t& subprocess_result::stderr_contents() const {
21 return stderr_contents_;
24 std::string subprocess_result::stdout_string() const {
25 return stdout_contents().data();
28 std::string subprocess_result::stderr_string() const {
29 return stderr_contents().data();