#include <CArchDaemonWindows.h>
Inherits IArchDaemon.
Inheritance diagram for CArchDaemonWindows:
Public Types | |
typedef int(* | RunFunc )(void) |
Public Member Functions | |
virtual void | installDaemon (const char *name, const char *description, const char *pathname, const char *commandLine, const char *dependencies, bool allUsers) |
Install daemon. | |
virtual void | uninstallDaemon (const char *name, bool allUsers) |
Uninstall daemon. | |
virtual int | daemonize (const char *name, DaemonFunc func) |
Daemonize the process. | |
virtual bool | canInstallDaemon (const char *name, bool allUsers) |
Check if user has permission to install the daemon. | |
virtual bool | isDaemonInstalled (const char *name, bool allUsers) |
Check if the daemon is installed. | |
Static Public Member Functions | |
int | runDaemon (RunFunc runFunc) |
Run the daemon. | |
void | daemonRunning (bool running) |
Indicate daemon is in main loop. | |
void | daemonFailed (int result) |
Indicate failure of running daemon. | |
UINT | getDaemonQuitMessage () |
Get daemon quit message. |
Definition at line 29 of file CArchDaemonWindows.h.
|
Check if user has permission to install the daemon. Returns true iff the caller has permission to install or uninstall the daemon. Note that even if this method returns true it's possible that installing/uninstalling the service may still fail. This method ignores whether or not the service is already installed. Implements IArchDaemon. Definition at line 329 of file CArchDaemonWindows.cpp. References CArchMiscWindows::closeKey(), and CArchMiscWindows::isWindows95Family(). |
|
Indicate failure of running daemon.
The Definition at line 69 of file CArchDaemonWindows.cpp. Referenced by CArchMiscWindows::daemonFailed(). |
|
Daemonize the process.
Daemonize. Throw XArchDaemonFailed on error. Exactly what happens when daemonizing depends on the platform.
Implements IArchDaemon. Definition at line 265 of file CArchDaemonWindows.cpp. References CArchMiscWindows::isWindows95Family(). |
|
Indicate daemon is in main loop.
The Definition at line 46 of file CArchDaemonWindows.cpp. References doDaemonRunning(). Referenced by CArchMiscWindows::daemonRunning(). |
|
Get daemon quit message. The windows NT daemon tells daemon thread to exit by posting this message to it. The thread must, of course, have a message queue for this to work. Definition at line 58 of file CArchDaemonWindows.cpp. References doGetDaemonQuitMessage(). Referenced by CArchMiscWindows::getDaemonQuitMessage(). |
|
Install daemon.
Install a daemon. Implements IArchDaemon. Definition at line 81 of file CArchDaemonWindows.cpp. References CArchMiscWindows::addKey(), CArchMiscWindows::closeKey(), CArchMiscWindows::isWindows95Family(), CArchMiscWindows::setValue(), and uninstallDaemon(). |
|
Check if the daemon is installed. Returns true iff the daemon is installed. Implements IArchDaemon. Definition at line 361 of file CArchDaemonWindows.cpp. References CArchMiscWindows::closeKey(), CArchMiscWindows::isWindows95Family(), CArchMiscWindows::openKey(), and CArchMiscWindows::readValueString(). Referenced by uninstallDaemon(). |
|
Run the daemon.
When the client calls Definition at line 38 of file CArchDaemonWindows.cpp. References doRunDaemon(). Referenced by CArchMiscWindows::runDaemon(). |
|
Uninstall daemon.
Uninstall a daemon. Throws an Implements IArchDaemon. Definition at line 190 of file CArchDaemonWindows.cpp. References CArchMiscWindows::closeKey(), CArchMiscWindows::deleteKey(), CArchMiscWindows::deleteValue(), isDaemonInstalled(), CArchMiscWindows::isWindows95Family(), and CArchMiscWindows::openKey(). Referenced by installDaemon(). |