Scopira
20080306
|
#include <monitorservice.h>
Public Member Functions | |
monitor_service (scopira::agent::task_context &ctx) | |
constructor | |
void | add_watch (scopira::tool::uuid whotowatch, scopira::tool::uuid receipient, bool killonwatch=false) |
void | remove_watch (scopira::tool::uuid whotowatch, scopira::tool::uuid receipient) |
This is a service pack for accessing the monitor service. The monitor service lets you register your process for notification of other tasks deaths, aswell as have your own task be killed when another process dies.
You may create this object as needed, it is lightweight.
A "service pack" is a C++ API object that easies access to a service task. It handles all the protocol communication with that service.
void scopira::agent::monitor_service::add_watch | ( | scopira::tool::uuid | whotowatch, |
scopira::tool::uuid | receipient, | ||
bool | killonwatch = false |
||
) |
Add a watch to be monitored. If the whotowatch task dies while this watch is active, then receipient will be: killonwatch = true? receipient will be sent the kill signal/be killed killonwatch = false? receipient will be send the msg int(1100) uuid(whotowatch)