launch_daemon: Improved target support.

* You can now put jobs/services into a target.
* Instead of having Login started as part of the normal boot process,
  it's now in the "login" target.
* The app_server now launches the login target when a login becomes
  available (ie. during startup, but that could be improved later on).
This commit is contained in:
Axel Dörfler
2015-07-22 20:41:51 +02:00
parent a44d3faf2e
commit c086a1834b
7 changed files with 353 additions and 62 deletions
+3 -2
View File
@@ -19,14 +19,15 @@
namespace BPrivate {
#define kLaunchDaemonSignature "application/x-vnd.Haiku-launch_daemon"
#define B_LAUNCH_DAEMON_PORT_NAME "system:launch_daemon"
#define B_LAUNCH_DAEMON_PORT_NAME "system:launch_daemon"
// message constants
enum {
B_GET_LAUNCH_DATA = 'lnda',
B_LAUNCH_TARGET = 'lntg',
B_LAUNCH_SESSION = 'lnse',
B_REGISTER_LAUNCH_SESSION = 'lnrs',
B_REGISTER_SESSION_DAEMON = 'lnrs',
};
+3
View File
@@ -22,6 +22,9 @@ public:
port_id GetPort(const char* signature,
const char* name);
status_t Target(const char* name, BMessage& data,
const char* baseName = NULL);
status_t StartSession(const char* login,
const char* password);
+1 -1
View File
@@ -14,7 +14,7 @@ public:
Private(BLaunchRoster* roster);
Private(BLaunchRoster& roster);
status_t RegisterSession(const BMessenger& target);
status_t RegisterSessionDaemon(const BMessenger& daemon);
private:
BLaunchRoster* fRoster;