/* * Copyright 2011, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: * Oliver Tappe */ #include #include #include #include namespace Haiku { namespace Package { Request::Request(const Context& context) : fContext(context) { } Request::~Request() { } const Context& Request::GetContext() const { return fContext; } status_t Request::QueueJob(Job* job, JobQueue& jobQueue) const { JobStateListener* defaultListener = fContext.DefaultJobStateListener(); if (defaultListener != NULL) job->AddStateListener(defaultListener); return jobQueue.AddJob(job); } } // namespace Package } // namespace Haiku