#include <svcproc.h>
Inheritance diagram for PServiceProcess:
Miscellaneous functions | |
void | SetLogLevel (PSystemLog::Level level) |
PSystemLog::Level | GetLogLevel () const |
static PServiceProcess & | Current () |
Public Member Functions | |
virtual int | _main (void *arg=NULL) |
~PServiceProcess () | |
virtual void | Terminate () |
Construction | |
PServiceProcess (const char *manuf, const char *name, WORD majorVersion, WORD minorVersion, CodeStatus status, WORD buildNumber) | |
Callback functions | |
virtual BOOL | OnStart ()=0 |
virtual void | OnStop () |
virtual BOOL | OnPause () |
virtual void | OnContinue () |
virtual void | OnControl ()=0 |
Protected Member Functions | |
int | InitialiseService () |
void | _PXShowSystemWarning (PINDEX num, const PString &str) |
void | PXOnSignal (int) |
void | PXOnAsyncSignal (int) |
Protected Attributes | |
BOOL | debugMode |
Flag to indicate service is run in simulation mode. | |
PSystemLog::Level | currentLogLevel |
Current log level for PSYSTEMLOG# calls. | |
PString | systemLogFileName |
PString | pidFileToRemove |
BOOL | isTerminating |
Friends | |
void | PSystemLog::Output (PSystemLog::Level, const char *) |
|
Create a new service process.
|
|
|
|
Reimplemented from PProcess. |
|
Reimplemented from PProcess. |
|
Get the current service process object.
Reimplemented from PProcess. Reimplemented in PHTTPServiceProcess. |
|
Get the current level for logging.
|
|
|
|
Resume after the service was paused. Reimplemented in PHTTPServiceProcess. |
|
The Control menu option was used in the SysTray menu. |
|
Called by the system when the service is to be paused. This will suspend any actions that the service may be executing. Usually this is less expensive in resource allocation etc than stopping and starting the service.
Reimplemented in PHTTPServiceProcess. |
|
Called when the service is started. This typically initialises the service and returns TRUE if the service is ready to run. The Main()# function is then executed.
Implemented in PHTTPServiceProcess. |
|
Called by the system when the service is stopped. One return from this function there is no guarentee that any more user code will be executed. Any cleaning up or closing of resource must be done in here. Reimplemented in PHTTPServiceProcess. |
|
Reimplemented from PProcess. |
|
Reimplemented from PProcess. |
|
Set the level at which errors are logged. Only messages higher than or equal to the specified level will be logged. The default is #LogError# allowing fatal errors and ordinary\ errors to be logged and warning and information to be ignored. If in debug mode then the default is #LogInfo# allowing all messages to be displayed.
|
|
Terminate the process. Usually only used in abnormal abort situation. Reimplemented from PProcess. |
|
|
|
Current log level for PSYSTEMLOG# calls.
|
|
Flag to indicate service is run in simulation mode.
|
|
|
|
|
|
|