MeVisLabToolboxReference
macx::StartupItem Class Reference

Startup daemon support. More...

#include <macStartupItem.h>

List of all members.

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

Detailed Description

Startup daemon support.

Definition at line 17 of file macStartupItem.h.


Member Enumeration Documentation

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.

Enumerator:
ServiceTypeSystemDaemon 

System-wide daemon provided by the administrator.

ServiceTypeAllUsersAgent 

Per-user agent provided by the administrator for all users.

ServiceTypeCurrentUserAgent 

Per-user agent provided by the current user.

ServiceTypeNumberOfTypes 

Definition at line 28 of file macStartupItem.h.


Member Function Documentation

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.


Member Data Documentation

const std::string macx::StartupItem::CurrentUser [static]

Definition at line 36 of file macStartupItem.h.


The documentation for this class was generated from the following file: