output/Internal: add various trivial getter methods

This commit is contained in:
Max Kellermann
2016-12-29 23:23:28 +01:00
parent 61a151c803
commit 4484411a77
6 changed files with 38 additions and 13 deletions

View File

@@ -288,14 +288,38 @@ public:
void BeginDestroy();
void FinishDestroy();
const char *GetName() const {
return name;
}
/**
* Caller must lock the mutex.
*/
bool IsEnabled() const {
return enabled;
}
/**
* Caller must lock the mutex.
*/
bool IsOpen() const {
return open;
}
/**
* Caller must lock the mutex.
*/
bool IsCommandFinished() const {
return command == Command::NONE;
}
/**
* Caller must lock the mutex.
*/
const std::exception_ptr &GetLastError() const {
return last_error;
}
/**
* Waits for command completion.
*