Commit 340c07db authored by Peter Hutterer's avatar Peter Hutterer Committed by Chase Douglas
Browse files

xserver: add getters and setters for config and log file



A GetOption() call would be more generic here, but for log and config file
it's more intuitive to have actual methods instead of having to pass
"-config" to a generic GetOption() call.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarChase Douglas <chase.douglas@canonical.com>
Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
parent f81f4632
......@@ -142,6 +142,22 @@ class XServer : public xorg::testing::Process {
*/
const std::string& GetVersion();
/**
* Get the server's log file path. If this path is empty, the server
* will use it's built-in log file path.
*
* @return The log file path this server will use, is using or has used.
*/
const std::string& GetLogFilePath();
/**
* Get the server's config file path. If this path is empty, the server
* will use it's built-in config file path.
*
* @return The config file path this server will use, is using or has used.
*/
const std::string& GetConfigPath();
/**
* Set startup options for the server.
*
......
......@@ -362,3 +362,11 @@ bool xorg::testing::XServer::Kill(unsigned int timeout) {
void xorg::testing::XServer::SetOption(const std::string &key, const std::string &value) {
d_->options[key] = value;
}
const std::string& xorg::testing::XServer::GetLogFilePath() {
return d_->options["-logfile"];
}
const std::string& xorg::testing::XServer::GetConfigPath() {
return d_->options["-config"];
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment