24 #ifndef OMNIEVENTS__DAEMON_WINDOWS_H
25 #define OMNIEVENTS__DAEMON_WINDOWS_H
28 # error("This file is only intended for Windows.")
46 void start(
int& argc,
char**& argv);
64 static void log(
const char* message);
80 void install(
int argc,
char** argv)
const;
91 DWORD serviceSpecificExitCode,
Singleton class that contains various methods for running a Windows service.
void tracefile(const char *val)
Set _tracefile.
void Service::setArgcArgv(int &argc, char **&argv)
void install(int argc, char **argv) const
std::ostream * _logstream
void pidfile(const char *val)
Set _pidfile.
void foreground(bool val)
Set _foreground.
bool Service::setServiceStatus(DWORD currentState, DWORD win32ExitCode, DWORD serviceSpecificExitCode, DWORD checkPoint, DWORD waitHint)
char * _tracefile
The tracefile name (if any).
void start(int &argc, char **&argv)
void shutdown()
Exit handler set with ::on_exit() - shuts down the service.
void writeParameters(int argc, char **argv) const
Writes args 2+ to the Registry.
SERVICE_STATUS_HANDLE _serviceStatusHandle
Windows thing.
char * _parameters
Stores parameters read from the registry.
static void log(const char *message)
Callback, used as a parameter to omniORB::setLogFunction().
void runningOk()
Called to signal that all startup operations have completed OK.
void readParameters()
Populates _parameters from the Registry.
void daemonize()
Redirects output streams to tracefile.
static void ctrlHandler(DWORD controlCode)
Handles control codes from the Service Control Manager.
char ** _argv
Replacement argv array, read from registry.