diff options
Diffstat (limited to 'src/zenutil/include')
| -rw-r--r-- | src/zenutil/include/zenutil/service.h | 38 |
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 |