aboutsummaryrefslogtreecommitdiff
path: root/src/daemonizer/windows_service.h
blob: 11f5fdcdccbd672744082272c1859e7dff9aee5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#ifdef WIN32

#undef UNICODE
#undef _UNICODE

#include <string>
#include <windows.h>

namespace windows
{
  bool check_admin(bool & result);

  bool ensure_admin(
      std::string const & arguments
    );

  bool install_service(
      std::string const & service_name
    , std::string const & arguments
    );

  bool uninstall_service(
      std::string const & service_name
    );

  bool start_service(
      std::string const & service_name
    );

  bool stop_service(
      std::string const & service_name
    );
}
#endif