1#ifndef YAZE_APP_EDITOR_SYSTEM_BACKGROUND_COMMAND_TASK_H_
2#define YAZE_APP_EDITOR_SYSTEM_BACKGROUND_COMMAND_TASK_H_
10#include "absl/status/status.h"
27 absl::Status
status = absl::UnknownError(
"Task not started");
39 const std::string& command,
const std::string& directory,
40 const std::map<std::string, std::string>& environment = {});
46 void WorkerMain(std::string command, std::string directory,
47 std::vector<std::string> environment);
49 void WorkerMainWindows(std::string command, std::string directory,
50 std::vector<std::string> environment);
53 void Finalize(absl::Status status,
int exit_code);
70 absl::Status
status_ = absl::UnknownError(
"Task not started");
void Finalize(absl::Status status, int exit_code)
BackgroundCommandTask()=default
Snapshot GetSnapshot() const
BackgroundCommandTask & operator=(const BackgroundCommandTask &)=delete
BackgroundCommandTask(const BackgroundCommandTask &)=delete
absl::Status Start(const std::string &command, const std::string &directory, const std::map< std::string, std::string > &environment={})
void WorkerMain(std::string command, std::string directory, std::vector< std::string > environment)
static std::string ComputeOutputTail(const std::string &output)
void AppendOutput(const char *data, size_t size)
Editors are the view controllers for the application.