launch_daemon: Implemented sticky events, and registration.
* Sticky events are events that keep their signal raised, ie. even if a job is initialized afterwards, it will still be triggered. * Consolidated naming for external events. * Events are now registered once they are actually being used. This allows them to allocate the resources they need to do their thing.
This commit is contained in:
@@ -9,6 +9,12 @@
|
||||
#include <Messenger.h>
|
||||
|
||||
|
||||
// Flags for RegisterEvent()
|
||||
enum {
|
||||
B_STICKY_EVENT = 0x01
|
||||
};
|
||||
|
||||
|
||||
class BLaunchRoster {
|
||||
public:
|
||||
BLaunchRoster();
|
||||
@@ -31,7 +37,7 @@ public:
|
||||
status_t StartSession(const char* login);
|
||||
|
||||
status_t RegisterEvent(const BMessenger& source,
|
||||
const char* name);
|
||||
const char* name, uint32 flags);
|
||||
status_t UnregisterEvent(const BMessenger& source,
|
||||
const char* name);
|
||||
status_t NotifyEvent(const BMessenger& source,
|
||||
@@ -44,7 +50,8 @@ private:
|
||||
|
||||
void _InitMessenger();
|
||||
status_t _UpdateEvent(uint32 what,
|
||||
const BMessenger& source, const char* name);
|
||||
const BMessenger& source, const char* name,
|
||||
uint32 flags = 0);
|
||||
|
||||
private:
|
||||
BMessenger fMessenger;
|
||||
|
||||
Reference in New Issue
Block a user