-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainCommon.h
More file actions
30 lines (24 loc) · 1.04 KB
/
MainCommon.h
File metadata and controls
30 lines (24 loc) · 1.04 KB
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
#ifndef MAINCOMMON_H
#define MAINCOMMON_H
namespace rustLaunchSite
{
class Logger;
// TODO: use standard codes instead?
// see https://en.cppreference.com/w/cpp/error/errc
// [[maybe_unused]] is because vscode clangd seems too stupid to detect usage
[[maybe_unused]] constexpr int RLS_EXIT_SUCCESS = 0; ///< successful exit
[[maybe_unused]] constexpr int RLS_EXIT_ARG = 1; ///< invalid argument
[[maybe_unused]] constexpr int RLS_EXIT_HANDLER = 2; ///< signal handler fail
[[maybe_unused]] constexpr int RLS_EXIT_START = 3; ///< child process error
[[maybe_unused]] constexpr int RLS_EXIT_UPDATE = 4; ///< child process error
[[maybe_unused]] constexpr int RLS_EXIT_RESTART = 5; ///< child process error
[[maybe_unused]] constexpr int RLS_EXIT_EXCEPTION = 6; ///< interrupted
[[maybe_unused]] constexpr int RLS_EXIT_THREAD = 7; ///< thread create failed
/// Common RLS application entrypoint
int Start(Logger& logger, int argc, char* argv[]);
/// Request an orderly shutdown
///
/// This method is thread-safe
void Stop();
}
#endif