MeVisLab Toolbox Reference
macStartupItem.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef MAC_STARTUP_ITEM_H
14 #define MAC_STARTUP_ITEM_H
15 
17 
18 #if defined(__APPLE__)
19 
21 #include <string>
22 #include <list>
23 
24 namespace macos {
25 
28  {
29  public:
30 
32 
38  enum ServiceType {
39  ServiceTypeSystemDaemon = 0,
41  ServiceTypeCurrentUserAgent
42  };
43 
44  static const std::string CurrentUser;
45 
47 
50  static bool create(ServiceType type, const std::string &serviceId, const std::list<std::string> &arguments, const std::string &userName = std::string());
51 
53  static bool remove(ServiceType type, const std::string &serviceId);
54 
56 
58  static bool load(ServiceType type, const std::string &serviceId);
59 
61 
63  static bool unload(ServiceType type, const std::string &serviceId);
64  };
65 
66 }
67 
68 #endif // __APPLE__
69 #endif // __macStartupItem_H
Startup daemon support.
static bool unload(ServiceType type, const std::string &serviceId)
Unload startup daemon/agent config.
ServiceType
Type of startup service.
@ ServiceTypeAllUsersAgent
Per-user agent provided by the administrator for all users.
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 const std::string CurrentUser
#define OSXSUPPORT_PUBLIC_API
Symbol visibility macros.
AppleScript support.