launch_daemon: Added basic ability to stop/start jobs via API.
* Stopping a job is very simplistic right now, and will have to be extended considerably, probably with its own job.
This commit is contained in:
@@ -26,6 +26,8 @@ namespace BPrivate {
|
||||
enum {
|
||||
B_GET_LAUNCH_DATA = 'lnda',
|
||||
B_LAUNCH_TARGET = 'lntg',
|
||||
B_LAUNCH_JOB = 'lnjo',
|
||||
B_STOP_LAUNCH_JOB = 'lnsj',
|
||||
B_LAUNCH_SESSION = 'lnse',
|
||||
B_REGISTER_SESSION_DAEMON = 'lnrs',
|
||||
B_REGISTER_LAUNCH_EVENT = 'lnre',
|
||||
|
||||
@@ -34,6 +34,9 @@ public:
|
||||
const BMessage* data = NULL,
|
||||
const char* baseName = NULL);
|
||||
|
||||
status_t Start(const char* name);
|
||||
status_t Stop(const char* name, bool force = false);
|
||||
|
||||
status_t StartSession(const char* login);
|
||||
|
||||
status_t RegisterEvent(const BMessenger& source,
|
||||
@@ -56,6 +59,9 @@ private:
|
||||
friend class Private;
|
||||
|
||||
void _InitMessenger();
|
||||
status_t _SendRequest(BMessage& request);
|
||||
status_t _SendRequest(BMessage& request,
|
||||
BMessage& reply);
|
||||
status_t _UpdateEvent(uint32 what,
|
||||
const BMessenger& source, const char* name,
|
||||
uint32 flags = 0);
|
||||
|
||||
Reference in New Issue
Block a user