2007-05-20 13:57:56 +00:00
|
|
|
/* <!-- copyright */
|
|
|
|
/*
|
|
|
|
* aria2 - The high speed download utility
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Tatsuhiro Tsujikawa
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2010-01-05 16:01:46 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2007-05-20 13:57:56 +00:00
|
|
|
*
|
|
|
|
* In addition, as a special exception, the copyright holders give
|
|
|
|
* permission to link the code of portions of this program with the
|
|
|
|
* OpenSSL library under certain conditions as described in each
|
|
|
|
* individual source file, and distribute linked combinations
|
|
|
|
* including the two.
|
|
|
|
* You must obey the GNU General Public License in all respects
|
|
|
|
* for all of the code used other than OpenSSL. If you modify
|
|
|
|
* file(s) with this exception, you may extend this exception to your
|
|
|
|
* version of the file(s), but you are not obligated to do so. If you
|
|
|
|
* do not wish to do so, delete this exception statement from your
|
|
|
|
* version. If you delete this exception statement from all source
|
|
|
|
* files in the program, then also delete it here.
|
|
|
|
*/
|
|
|
|
/* copyright --> */
|
2010-10-31 07:23:53 +00:00
|
|
|
#ifndef D_REQUEST_GROUP_MAN_H
|
|
|
|
#define D_REQUEST_GROUP_MAN_H
|
2007-05-20 13:57:56 +00:00
|
|
|
|
|
|
|
#include "common.h"
|
2009-01-12 12:27:34 +00:00
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
#include <string>
|
|
|
|
#include <deque>
|
2010-02-28 12:30:11 +00:00
|
|
|
#include <vector>
|
2012-07-31 14:55:51 +00:00
|
|
|
#include <map>
|
2013-06-21 16:10:38 +00:00
|
|
|
#include <memory>
|
2008-02-08 15:53:45 +00:00
|
|
|
|
2009-01-12 12:27:34 +00:00
|
|
|
#include "DownloadResult.h"
|
|
|
|
#include "TransferStat.h"
|
2010-03-20 15:01:56 +00:00
|
|
|
#include "RequestGroup.h"
|
2012-10-25 14:33:45 +00:00
|
|
|
#include "NetStat.h"
|
2012-12-19 14:03:48 +00:00
|
|
|
#include "IndexedList.h"
|
2009-01-12 12:27:34 +00:00
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
namespace aria2 {
|
2007-05-20 13:57:56 +00:00
|
|
|
|
|
|
|
class DownloadEngine;
|
2007-10-11 16:58:24 +00:00
|
|
|
class Command;
|
2010-06-13 02:21:40 +00:00
|
|
|
struct DownloadResult;
|
2008-08-04 17:06:47 +00:00
|
|
|
class ServerStatMan;
|
|
|
|
class ServerStat;
|
|
|
|
class Option;
|
2011-08-09 14:33:55 +00:00
|
|
|
class OutputFile;
|
2012-02-05 09:57:16 +00:00
|
|
|
class UriListParser;
|
2012-11-27 13:04:59 +00:00
|
|
|
class WrDiskCache;
|
2007-05-20 13:57:56 +00:00
|
|
|
|
2012-12-19 14:03:48 +00:00
|
|
|
typedef IndexedList<a2_gid_t,
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<RequestGroup> > RequestGroupList;
|
2012-12-19 14:03:48 +00:00
|
|
|
typedef IndexedList<a2_gid_t,
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<DownloadResult> > DownloadResultList;
|
2012-12-19 14:03:48 +00:00
|
|
|
|
2007-05-20 13:57:56 +00:00
|
|
|
class RequestGroupMan {
|
|
|
|
private:
|
2012-12-19 14:03:48 +00:00
|
|
|
RequestGroupList requestGroups_;
|
|
|
|
RequestGroupList reservedGroups_;
|
|
|
|
DownloadResultList downloadResults_;
|
2012-12-16 09:50:45 +00:00
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
int maxSimultaneousDownloads_;
|
2007-10-11 16:58:24 +00:00
|
|
|
|
2010-06-21 13:51:56 +00:00
|
|
|
const Option* option_;
|
2008-08-04 17:06:47 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<ServerStatMan> serverStatMan_;
|
2008-08-04 17:06:47 +00:00
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
int maxOverallDownloadSpeedLimit_;
|
2009-02-28 11:48:26 +00:00
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
int maxOverallUploadSpeedLimit_;
|
2009-02-28 11:48:26 +00:00
|
|
|
|
2012-10-25 14:33:45 +00:00
|
|
|
NetStat netStat_;
|
|
|
|
|
2013-05-01 12:28:04 +00:00
|
|
|
// true if download engine should keep running even if there is no
|
|
|
|
// download to perform.
|
|
|
|
bool keepRunning_;
|
2009-06-20 03:19:23 +00:00
|
|
|
|
2010-06-21 13:51:56 +00:00
|
|
|
bool queueCheck_;
|
2010-03-05 14:02:23 +00:00
|
|
|
|
2010-09-10 14:13:50 +00:00
|
|
|
// The number of error DownloadResult removed because of upper limit
|
|
|
|
// of the queue
|
2011-12-08 14:26:51 +00:00
|
|
|
int removedErrorResult_;
|
2010-09-10 14:13:50 +00:00
|
|
|
|
|
|
|
// The last error of removed DownloadResult
|
2010-11-28 07:52:02 +00:00
|
|
|
error_code::Value removedLastErrorResult_;
|
2010-09-10 14:13:50 +00:00
|
|
|
|
2012-12-19 14:03:48 +00:00
|
|
|
size_t maxDownloadResult_;
|
2010-09-10 14:13:50 +00:00
|
|
|
|
2012-02-05 09:57:16 +00:00
|
|
|
// UriListParser for deferred input.
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<UriListParser> uriListParser_;
|
2012-02-05 09:57:16 +00:00
|
|
|
|
2012-11-27 13:04:59 +00:00
|
|
|
WrDiskCache* wrDiskCache_;
|
|
|
|
|
2011-08-22 14:05:06 +00:00
|
|
|
void formatDownloadResultFull
|
|
|
|
(OutputFile& out,
|
2012-09-24 14:20:43 +00:00
|
|
|
const char* status,
|
2013-06-21 16:10:38 +00:00
|
|
|
const std::shared_ptr<DownloadResult>& downloadResult) const;
|
2011-08-22 14:05:06 +00:00
|
|
|
|
2011-08-09 14:33:55 +00:00
|
|
|
std::string formatDownloadResult
|
2012-09-24 14:20:43 +00:00
|
|
|
(const char* status,
|
2013-06-21 16:10:38 +00:00
|
|
|
const std::shared_ptr<DownloadResult>& downloadResult) const;
|
2007-10-11 16:58:24 +00:00
|
|
|
|
2008-08-04 17:06:47 +00:00
|
|
|
void configureRequestGroup
|
2013-06-21 16:10:38 +00:00
|
|
|
(const std::shared_ptr<RequestGroup>& requestGroup) const;
|
2012-07-31 14:55:51 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
void addRequestGroupIndex(const std::shared_ptr<RequestGroup>& group);
|
2012-07-31 14:55:51 +00:00
|
|
|
void addRequestGroupIndex
|
2013-06-21 16:10:38 +00:00
|
|
|
(const std::vector<std::shared_ptr<RequestGroup> >& groups);
|
2007-05-20 13:57:56 +00:00
|
|
|
public:
|
2013-06-23 07:35:14 +00:00
|
|
|
RequestGroupMan(std::vector<std::shared_ptr<RequestGroup> > requestGroups,
|
2011-12-08 12:38:00 +00:00
|
|
|
int maxSimultaneousDownloads,
|
2010-01-05 16:01:46 +00:00
|
|
|
const Option* option);
|
2007-10-11 16:58:24 +00:00
|
|
|
|
2010-11-14 07:17:55 +00:00
|
|
|
~RequestGroupMan();
|
|
|
|
|
2007-10-11 16:58:24 +00:00
|
|
|
bool downloadFinished();
|
|
|
|
|
|
|
|
void save();
|
|
|
|
|
|
|
|
void closeFile();
|
2012-07-31 12:26:59 +00:00
|
|
|
|
2007-10-11 16:58:24 +00:00
|
|
|
void halt();
|
2007-05-20 13:57:56 +00:00
|
|
|
|
2007-12-07 13:33:59 +00:00
|
|
|
void forceHalt();
|
|
|
|
|
2008-11-03 06:49:02 +00:00
|
|
|
void removeStoppedGroup(DownloadEngine* e);
|
2007-05-20 13:57:56 +00:00
|
|
|
|
|
|
|
void fillRequestGroupFromReserver(DownloadEngine* e);
|
|
|
|
|
2012-07-31 14:55:51 +00:00
|
|
|
// Note that this method does not call addRequestGroupIndex(). This
|
|
|
|
// method should be considered as private, but exposed for unit
|
|
|
|
// testing purpose.
|
2013-06-21 16:10:38 +00:00
|
|
|
void addRequestGroup(const std::shared_ptr<RequestGroup>& group);
|
2007-10-11 16:58:24 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
void addReservedGroup(const std::vector<std::shared_ptr<RequestGroup> >& groups);
|
2007-10-11 16:58:24 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
void addReservedGroup(const std::shared_ptr<RequestGroup>& group);
|
2007-10-11 16:58:24 +00:00
|
|
|
|
2009-05-30 13:55:14 +00:00
|
|
|
void insertReservedGroup
|
2013-06-21 16:10:38 +00:00
|
|
|
(size_t pos, const std::vector<std::shared_ptr<RequestGroup> >& groups);
|
2009-05-30 13:55:14 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
void insertReservedGroup(size_t pos, const std::shared_ptr<RequestGroup>& group);
|
2009-05-30 13:55:14 +00:00
|
|
|
|
2008-03-09 12:24:01 +00:00
|
|
|
size_t countRequestGroup() const;
|
2012-07-31 12:26:59 +00:00
|
|
|
|
2012-12-19 14:03:48 +00:00
|
|
|
const RequestGroupList& getRequestGroups() const
|
2009-05-29 12:12:22 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return requestGroups_;
|
2009-05-29 12:12:22 +00:00
|
|
|
}
|
2008-05-15 14:37:02 +00:00
|
|
|
|
2012-12-19 14:03:48 +00:00
|
|
|
const RequestGroupList& getReservedGroups() const
|
2009-05-29 12:12:22 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return reservedGroups_;
|
2009-05-29 12:12:22 +00:00
|
|
|
}
|
2009-05-08 07:58:50 +00:00
|
|
|
|
2012-07-31 14:55:51 +00:00
|
|
|
// Returns RequestGroup object whose gid is gid. This method returns
|
|
|
|
// RequestGroup either in requestGroups_ or reservedGroups_.
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<RequestGroup> findGroup(a2_gid_t gid) const;
|
2012-07-31 14:55:51 +00:00
|
|
|
|
2009-12-21 15:17:34 +00:00
|
|
|
// Changes the position of download denoted by gid. If how is
|
|
|
|
// POS_SET, it moves the download to a position relative to the
|
|
|
|
// beginning of the queue. If how is POS_CUR, it moves the download
|
|
|
|
// to a position relative to the current position. If how is
|
|
|
|
// POS_END, it moves the download to a position relative to the end
|
|
|
|
// of the queue. If the destination position is less than 0 or
|
|
|
|
// beyond the end of the queue, it moves the download to the
|
|
|
|
// beginning or the end of the queue respectively. Returns the
|
|
|
|
// destination position.
|
2012-12-19 14:03:48 +00:00
|
|
|
size_t changeReservedGroupPosition(a2_gid_t gid, int pos,
|
2013-05-14 15:50:55 +00:00
|
|
|
OffsetMode how);
|
2009-12-21 15:17:34 +00:00
|
|
|
|
2011-03-17 03:17:46 +00:00
|
|
|
bool removeReservedGroup(a2_gid_t gid);
|
2009-05-09 12:41:37 +00:00
|
|
|
|
2011-08-22 14:05:06 +00:00
|
|
|
void showDownloadResults(OutputFile& o, bool full) const;
|
2007-05-20 13:57:56 +00:00
|
|
|
|
2007-06-03 14:24:37 +00:00
|
|
|
bool isSameFileBeingDownloaded(RequestGroup* requestGroup) const;
|
2007-10-11 16:58:24 +00:00
|
|
|
|
|
|
|
TransferStat calculateStat();
|
2008-02-20 16:46:56 +00:00
|
|
|
|
|
|
|
class DownloadStat {
|
|
|
|
private:
|
2011-12-08 14:26:51 +00:00
|
|
|
int error_;
|
|
|
|
int inProgress_;
|
|
|
|
int waiting_;
|
2010-11-28 07:52:02 +00:00
|
|
|
error_code::Value lastErrorResult_;
|
2008-02-20 16:46:56 +00:00
|
|
|
public:
|
2013-03-01 12:17:52 +00:00
|
|
|
DownloadStat(int error,
|
2011-12-08 14:26:51 +00:00
|
|
|
int inProgress,
|
|
|
|
int waiting,
|
2010-11-28 07:52:02 +00:00
|
|
|
error_code::Value lastErrorResult =
|
|
|
|
error_code::FINISHED):
|
2010-06-21 13:51:56 +00:00
|
|
|
error_(error),
|
|
|
|
inProgress_(inProgress),
|
|
|
|
waiting_(waiting),
|
|
|
|
lastErrorResult_(lastErrorResult) {}
|
2009-01-12 12:27:34 +00:00
|
|
|
|
2010-11-28 07:52:02 +00:00
|
|
|
error_code::Value getLastErrorResult() const
|
2009-01-12 12:27:34 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return lastErrorResult_;
|
2009-01-12 12:27:34 +00:00
|
|
|
}
|
2008-02-20 16:46:56 +00:00
|
|
|
|
|
|
|
bool allCompleted() const
|
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return error_ == 0 && inProgress_ == 0 && waiting_ == 0;
|
2008-02-20 16:46:56 +00:00
|
|
|
}
|
2009-01-12 12:27:34 +00:00
|
|
|
|
2011-12-08 14:26:51 +00:00
|
|
|
int getInProgress() const
|
2009-01-12 12:27:34 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return inProgress_;
|
2009-01-12 12:27:34 +00:00
|
|
|
}
|
2008-02-20 16:46:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
DownloadStat getDownloadStat() const;
|
2008-04-23 10:28:56 +00:00
|
|
|
|
2012-12-19 14:03:48 +00:00
|
|
|
const DownloadResultList& getDownloadResults() const
|
2009-05-29 12:12:22 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return downloadResults_;
|
2009-05-29 12:12:22 +00:00
|
|
|
}
|
2008-04-23 10:28:56 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<DownloadResult> findDownloadResult(a2_gid_t gid) const;
|
2009-05-09 12:41:37 +00:00
|
|
|
|
2009-05-14 13:48:26 +00:00
|
|
|
// Removes all download results.
|
|
|
|
void purgeDownloadResult();
|
|
|
|
|
2011-01-19 15:56:34 +00:00
|
|
|
// Removes download result of given gid. Returns true if download
|
|
|
|
// result was removed. Otherwise returns false.
|
2011-03-17 03:17:46 +00:00
|
|
|
bool removeDownloadResult(a2_gid_t gid);
|
2011-01-19 15:56:34 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
void addDownloadResult(const std::shared_ptr<DownloadResult>& downloadResult);
|
2010-09-10 14:13:50 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<ServerStat> findServerStat(const std::string& hostname,
|
2010-01-05 16:01:46 +00:00
|
|
|
const std::string& protocol) const;
|
2008-08-04 17:06:47 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
std::shared_ptr<ServerStat> getOrCreateServerStat(const std::string& hostname,
|
2010-01-05 16:01:46 +00:00
|
|
|
const std::string& protocol);
|
2008-08-04 17:06:47 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
bool addServerStat(const std::shared_ptr<ServerStat>& serverStat);
|
2008-08-04 17:06:47 +00:00
|
|
|
|
2008-08-10 15:22:55 +00:00
|
|
|
bool loadServerStat(const std::string& filename);
|
|
|
|
|
|
|
|
bool saveServerStat(const std::string& filename) const;
|
|
|
|
|
|
|
|
void removeStaleServerStat(time_t timeout);
|
2009-02-28 11:48:26 +00:00
|
|
|
|
|
|
|
// Returns true if current download speed exceeds
|
2010-06-21 13:51:56 +00:00
|
|
|
// maxOverallDownloadSpeedLimit_. Always returns false if
|
|
|
|
// maxOverallDownloadSpeedLimit_ == 0. Otherwise returns false.
|
2009-02-28 11:48:26 +00:00
|
|
|
bool doesOverallDownloadSpeedExceed();
|
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
void setMaxOverallDownloadSpeedLimit(int speed)
|
2009-05-14 15:44:59 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
maxOverallDownloadSpeedLimit_ = speed;
|
2009-05-14 15:44:59 +00:00
|
|
|
}
|
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
int getMaxOverallDownloadSpeedLimit() const
|
2009-05-14 15:44:59 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return maxOverallDownloadSpeedLimit_;
|
2009-05-14 15:44:59 +00:00
|
|
|
}
|
|
|
|
|
2009-02-28 11:48:26 +00:00
|
|
|
// Returns true if current upload speed exceeds
|
2010-06-21 13:51:56 +00:00
|
|
|
// maxOverallUploadSpeedLimit_. Always returns false if
|
|
|
|
// maxOverallUploadSpeedLimit_ == 0. Otherwise returns false.
|
2009-02-28 11:48:26 +00:00
|
|
|
bool doesOverallUploadSpeedExceed();
|
2009-05-14 15:44:59 +00:00
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
void setMaxOverallUploadSpeedLimit(int speed)
|
2009-05-14 15:44:59 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
maxOverallUploadSpeedLimit_ = speed;
|
2009-05-14 15:44:59 +00:00
|
|
|
}
|
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
int getMaxOverallUploadSpeedLimit() const
|
2009-05-14 15:44:59 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return maxOverallUploadSpeedLimit_;
|
2009-05-14 15:44:59 +00:00
|
|
|
}
|
2009-05-30 14:28:18 +00:00
|
|
|
|
2011-12-08 12:38:00 +00:00
|
|
|
void setMaxSimultaneousDownloads(int max)
|
2009-05-30 14:28:18 +00:00
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
maxSimultaneousDownloads_ = max;
|
2009-05-30 14:28:18 +00:00
|
|
|
}
|
2010-03-05 14:02:23 +00:00
|
|
|
|
2010-06-21 13:51:56 +00:00
|
|
|
// Call this function if requestGroups_ queue should be maintained.
|
2010-03-05 14:02:23 +00:00
|
|
|
// This function is added to reduce the call of maintenance, but at
|
|
|
|
// the same time, it provides fast maintenance reaction.
|
|
|
|
void requestQueueCheck()
|
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
queueCheck_ = true;
|
2010-03-05 14:02:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void clearQueueCheck()
|
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
queueCheck_ = false;
|
2010-03-05 14:02:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool queueCheckRequested() const
|
|
|
|
{
|
2010-06-21 13:51:56 +00:00
|
|
|
return queueCheck_;
|
2010-03-05 14:02:23 +00:00
|
|
|
}
|
2010-07-14 14:10:33 +00:00
|
|
|
|
2010-07-15 13:49:02 +00:00
|
|
|
// Returns currently used hosts and its use count.
|
|
|
|
void getUsedHosts(std::vector<std::pair<size_t, std::string> >& usedHosts);
|
2011-06-27 15:18:53 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
const std::shared_ptr<ServerStatMan>& getServerStatMan() const
|
2011-06-27 15:18:53 +00:00
|
|
|
{
|
|
|
|
return serverStatMan_;
|
|
|
|
}
|
2011-10-22 13:43:07 +00:00
|
|
|
|
2012-12-19 14:03:48 +00:00
|
|
|
void setMaxDownloadResult(size_t v)
|
2011-10-22 13:43:07 +00:00
|
|
|
{
|
|
|
|
maxDownloadResult_ = v;
|
|
|
|
}
|
2012-02-05 09:57:16 +00:00
|
|
|
|
2013-06-21 16:10:38 +00:00
|
|
|
void setUriListParser(const std::shared_ptr<UriListParser>& uriListParser);
|
2012-10-25 14:33:45 +00:00
|
|
|
|
|
|
|
NetStat& getNetStat()
|
|
|
|
{
|
|
|
|
return netStat_;
|
|
|
|
}
|
2012-11-27 13:04:59 +00:00
|
|
|
|
|
|
|
WrDiskCache* getWrDiskCache() const
|
|
|
|
{
|
|
|
|
return wrDiskCache_;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Initializes WrDiskCache according to PREF_DISK_CACHE option. If
|
|
|
|
// its value is 0, cache storage will not be initialized.
|
|
|
|
void initWrDiskCache();
|
2013-05-01 12:28:04 +00:00
|
|
|
|
|
|
|
void setKeepRunning(bool flag)
|
|
|
|
{
|
|
|
|
keepRunning_ = flag;
|
|
|
|
}
|
2013-05-02 03:44:55 +00:00
|
|
|
|
|
|
|
bool getKeepRunning() const
|
|
|
|
{
|
|
|
|
return keepRunning_;
|
|
|
|
}
|
2007-05-20 13:57:56 +00:00
|
|
|
};
|
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
} // namespace aria2
|
|
|
|
|
2010-10-31 07:23:53 +00:00
|
|
|
#endif // D_REQUEST_GROUP_MAN_H
|