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:
Ingo Weinhold 2009-06-20 16:49:31 +00:00
parent 8f24c71102
commit 8b5ee1118a
2 changed files with 9 additions and 0 deletions

View File

@ -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)
{

View File

@ -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);