#include <daemon_windows.h>
Public Member Functions | |
Service () | |
~Service () | |
void | start (int &argc, char **&argv) |
void | tracefile (const char *val) |
Set _tracefile. | |
void | pidfile (const char *val) |
Set _pidfile. | |
void | foreground (bool val) |
Set _foreground. | |
void | daemonize () |
Redirects output streams to tracefile. | |
void | runningOk () |
Called to signal that all startup operations have completed OK. | |
void | shutdown () |
Exit handler set with on_exit() - shuts down the service. | |
Static Public Member Functions | |
static void | log (const char *message) |
Callback, used as a parameter to omniORB::setLogFunction(). | |
static void | ctrlHandler (DWORD controlCode) |
Handles control codes from the Service Control Manager. | |
Private Member Functions | |
void | Service::setArgcArgv (int &argc, char **&argv) |
void | install (int argc, char **argv) const |
void | uninstall () const |
void | readParameters () |
Populates _parameters from the Registry. | |
void | writeParameters (int argc, char **argv) const |
Writes args 2+ to the Registry. | |
bool | Service::setServiceStatus (DWORD currentState, DWORD win32ExitCode, DWORD serviceSpecificExitCode, DWORD checkPoint, DWORD waitHint) |
Private Attributes | |
char * | _tracefile |
The tracefile name (if any). | |
const char * | _regSubKey |
bool | _serviceRunning |
int | _callCount |
char * | _parameters |
Stores parameters read from the registry. | |
char ** | _argv |
Replacement argv array, read from registry. | |
std::ostream * | _logstream |
SERVICE_STATUS_HANDLE | _serviceStatusHandle |
Windows thing. |
Definition at line 40 of file daemon_windows.h.
|
Definition at line 180 of file daemon_windows.cc. |
|
Definition at line 192 of file daemon_windows.cc. References _argv, _logstream, _parameters, and _tracefile. |
|
Handles control codes from the Service Control Manager.
Definition at line 340 of file daemon_windows.cc. References OmniEvents_Orb_bumpTraceLevel(), OmniEvents_Orb_shutdown(), and OmniEvents::service. Referenced by start(). |
|
Redirects output streams to tracefile.
Definition at line 292 of file daemon_windows.cc. References _logstream, _tracefile, log(), omniORB::setLogFunction(), and OmniEvents::shutdown0(). |
|
Set _foreground.
Definition at line 216 of file daemon_windows.cc. References log(). |
|
Definition at line 383 of file daemon_windows.cc. References _regSubKey, HERE, PACKAGE_NAME, OmniEvents::Win::perror(), OmniEvents::service, OmniEvents::RegistryKey::setValueStr(), and writeParameters(). Referenced by start(). |
|
Callback, used as a parameter to omniORB::setLogFunction().
Definition at line 334 of file daemon_windows.cc. References _logstream, and OmniEvents::service. Referenced by daemonize(), foreground(), OmniEvents::Win::perror(), and pidfile(). |
|
Set _pidfile.
Definition at line 209 of file daemon_windows.cc. References log(). |
|
Populates _parameters from the Registry.
Definition at line 485 of file daemon_windows.cc. References _regSubKey, HERE, OmniEvents::Win::perror(), and OmniEvents::RegistryKey::queryValueStr(). Referenced by start(). |
|
Called to signal that all startup operations have completed OK.
Definition at line 309 of file daemon_windows.cc. References _serviceRunning. |
|
|
|
|
|
Exit handler set with on_exit() - shuts down the service.
Definition at line 319 of file daemon_windows.cc. References _logstream, and _serviceRunning. |
|
Definition at line 223 of file daemon_windows.cc. References _callCount, _parameters, _serviceRunning, _serviceStatusHandle, ctrlHandler(), HERE, install(), main(), PACKAGE_NAME, OmniEvents::Win::perror(), readParameters(), uninstall(), and writeParameters(). |
|
Set _tracefile.
Definition at line 202 of file daemon_windows.cc. References _tracefile. |
|
Definition at line 448 of file daemon_windows.cc. References HERE, PACKAGE_NAME, OmniEvents::Win::perror(), and OmniEvents::service. Referenced by start(). |
|
Writes args 2+ to the Registry.
Definition at line 502 of file daemon_windows.cc. References _regSubKey, HERE, OmniEvents::Win::perror(), and OmniEvents::RegistryKey::setValueStr(). |
|
Replacement argv array, read from registry.
Definition at line 75 of file daemon_windows.h. Referenced by ~Service(). |
|
Definition at line 73 of file daemon_windows.h. Referenced by start(). |
|
Definition at line 76 of file daemon_windows.h. Referenced by daemonize(), log(), shutdown(), and ~Service(). |
|
Stores parameters read from the registry.
Definition at line 74 of file daemon_windows.h. Referenced by start(), and ~Service(). |
|
Definition at line 71 of file daemon_windows.h. Referenced by install(), readParameters(), and writeParameters(). |
|
Definition at line 72 of file daemon_windows.h. Referenced by runningOk(), shutdown(), and start(). |
|
Windows thing.
Definition at line 77 of file daemon_windows.h. Referenced by start(). |
|
The tracefile name (if any).
Definition at line 70 of file daemon_windows.h. Referenced by daemonize(), tracefile(), and ~Service(). |