aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-27 17:09:55 +0200
committerDan Engelbrecht <[email protected]>2025-01-08 10:01:23 +0100
commit1747a513dc9dccd5a60e76daebd59cfba4a536d9 (patch)
treef46af5db5c13cbca9c072030ff04e54ba0e1bede /src/zenutil/include
parent5.5.17-pre1 (diff)
downloadzen-1747a513dc9dccd5a60e76daebd59cfba4a536d9.tar.xz
zen-1747a513dc9dccd5a60e76daebd59cfba4a536d9.zip
zen `service` command
Diffstat (limited to 'src/zenutil/include')
-rw-r--r--src/zenutil/include/zenutil/service.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/zenutil/include/zenutil/service.h b/src/zenutil/include/zenutil/service.h
new file mode 100644
index 000000000..79be16052
--- /dev/null
+++ b/src/zenutil/include/zenutil/service.h
@@ -0,0 +1,38 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+#include <filesystem>
+
+namespace zen {
+enum class ServiceStatus
+{
+ NotInstalled,
+ Starting,
+ Running,
+ Stopping,
+ Stopped,
+ Pausing,
+ Paused,
+ Resuming
+};
+
+std::string_view ToString(ServiceStatus Status);
+
+std::error_code InstallService(const std::filesystem::path& ExecutablePath,
+ std::string_view CommandLineOptions,
+ std::string_view ServiceName,
+ std::string_view ServiceDisplayName,
+ std::string_view ServiceDescription);
+std::error_code UninstallService(std::string_view ServiceName);
+struct ServiceInfo
+{
+ ServiceStatus Status;
+ std::filesystem::path ExecutablePath;
+ std::string DisplayName;
+ std::string Description;
+};
+std::error_code QueryInstalledService(std::string_view ServiceName, ServiceInfo& OutStatus);
+std::error_code StartService(std::string_view ServiceName);
+std::error_code StopService(std::string_view ServiceName);
+} // namespace zen