MeVisLabToolboxReference
|
Startup daemon support. More...
#include <macStartupItem.h>
Public Types | |
enum | ServiceType { ServiceTypeSystemDaemon = 0, ServiceTypeAllUsersAgent, ServiceTypeCurrentUserAgent, ServiceTypeNumberOfTypes } |
Type of startup service. More... | |
Static Public Member Functions | |
static bool | create (ServiceType type, const std::string &serviceId, const std::list< std::string > &arguments, const std::string &userName=std::string()) |
Create new startup daemon/agent config file. | |
static bool | remove (ServiceType type, const std::string &serviceId) |
Remove existing startup daemon/agent config file. | |
static bool | load (ServiceType type, const std::string &serviceId) |
Load startup daemon/agent config. | |
static bool | unload (ServiceType type, const std::string &serviceId) |
Unload startup daemon/agent config. | |
Static Public Attributes | |
static const std::string | CurrentUser |
Startup daemon support.
Definition at line 17 of file macStartupItem.h.
Type of startup service.
A "daemon" is, by definition, a system-wide service of which there is one instance for all clients. An "agent" is a service that runs on a per-user basis. Daemons should not attempt to display UI or interact directly with a user's login session. Any and all work that involves interacting with a user should be done through agents.
Definition at line 28 of file macStartupItem.h.
static bool macx::StartupItem::create | ( | ServiceType | type, |
const std::string & | serviceId, | ||
const std::list< std::string > & | arguments, | ||
const std::string & | userName = std::string() |
||
) | [static] |
Create new startup daemon/agent config file.
Use CurrentUser string for userName argument to write the current user's logon name into the config file
static bool macx::StartupItem::load | ( | ServiceType | type, |
const std::string & | serviceId | ||
) | [static] |
Load startup daemon/agent config.
Jobs that are not on-demand will be started as soon as possible.
static bool macx::StartupItem::remove | ( | ServiceType | type, |
const std::string & | serviceId | ||
) | [static] |
Remove existing startup daemon/agent config file.
static bool macx::StartupItem::unload | ( | ServiceType | type, |
const std::string & | serviceId | ||
) | [static] |
Unload startup daemon/agent config.
This will also stop the job if it is running.
const std::string macx::StartupItem::CurrentUser [static] |
Definition at line 36 of file macStartupItem.h.