xentara-utils v2.1
The Xentara Utility Library
Loading...
Searching...
No Matches
xentara::utils::windows::service::ServiceOptions Struct Referencefinal

Options for a Windows service. More...

#include <xentara/utils/windows/service/ServiceDefinition.hpp>

Public Attributes

bool supportsSuspendResume
 Whether the service main function supports the [Suspend](application::TerminateHandler::State::Suspend) state of application::TerminateHandler.
 
tparam::Duration< long long, std::ratio< 1, 10 '000 '000 > > shutdownTimeout
 The amount of time the service is allowed to take to shut down.
 

Detailed Description

Options for a Windows service.

Member Data Documentation

◆ shutdownTimeout

tparam::Duration<long long, std::ratio<1, 10'000'000> > xentara::utils::windows::service::ServiceOptions::shutdownTimeout

The amount of time the service is allowed to take to shut down.

This is the amount of time the service main function is allowed to take to return after application::TerminateHandler::terminate() has been called. The default shutdown timeout is 10 seconds.

◆ supportsSuspendResume

bool xentara::utils::windows::service::ServiceOptions::supportsSuspendResume

Whether the service main function supports the [Suspend](application::TerminateHandler::State::Suspend) state of application::TerminateHandler.

If this option is set to true, then the service can be suspended and resumed by the user using the Windows service control manager using the “Pause” and “Continue” options. The framework will call application::TerminateHandler::suspend() and application::TerminateHandler::resume() when the service should be suspended and resumed. The service main function should react appropriately to these states, suspending and resuming its operation as instructed.