Added Worker::GetJob() to get a known job by key.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31141 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8f24c71102
commit
8b5ee1118a
@ -247,6 +247,14 @@ Worker::AbortJob(const JobKey& key)
|
||||
}
|
||||
|
||||
|
||||
Job*
|
||||
Worker::GetJob(const JobKey& key)
|
||||
{
|
||||
AutoLocker<Worker> locker(this);
|
||||
return fJobs.Lookup(key);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Worker::AddListener(const JobKey& key, JobListener* listener)
|
||||
{
|
||||
|
@ -146,6 +146,7 @@ public:
|
||||
JobListener* listener = NULL);
|
||||
// always takes over ownership
|
||||
void AbortJob(const JobKey& key);
|
||||
Job* GetJob(const JobKey& key);
|
||||
|
||||
status_t AddListener(const JobKey& key,
|
||||
JobListener* listener);
|
||||
|
Loading…
Reference in New Issue
Block a user