mirror of https://github.com/aria2/aria2
2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use cuid_t type for cuid.pull/1/head
parent
10edc156ea
commit
bf5f559c5c
|
@ -1,3 +1,7 @@
|
||||||
|
2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Use cuid_t type for cuid.
|
||||||
|
|
||||||
2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Added v key in DHT message. aria2's DHT version is independent of
|
Added v key in DHT message. aria2's DHT version is independent of
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#define _D_ABSTRACT_BT_MESSAGE_H_
|
#define _D_ABSTRACT_BT_MESSAGE_H_
|
||||||
|
|
||||||
#include "BtMessage.h"
|
#include "BtMessage.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ protected:
|
||||||
bool sendingInProgress;
|
bool sendingInProgress;
|
||||||
bool invalidate;
|
bool invalidate;
|
||||||
bool uploading;
|
bool uploading;
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
|
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
|
||||||
|
@ -103,11 +104,11 @@ public:
|
||||||
this->uploading = uploading;
|
this->uploading = uploading;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t getCuid() const {
|
cuid_t getCuid() const {
|
||||||
return cuid;
|
return cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCuid(int32_t cuid) {
|
void setCuid(cuid_t cuid) {
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
AbstractCommand::AbstractCommand(int32_t cuid,
|
AbstractCommand::AbstractCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -152,7 +152,7 @@ private:
|
||||||
|
|
||||||
#endif // ENABLE_ASYNC_DNS
|
#endif // ENABLE_ASYNC_DNS
|
||||||
public:
|
public:
|
||||||
AbstractCommand(int32_t cuid, const SharedHandle<Request>& req,
|
AbstractCommand(cuid_t cuid, const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup, DownloadEngine* e,
|
RequestGroup* requestGroup, DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& s = SharedHandle<SocketCore>());
|
const SharedHandle<SocketCore>& s = SharedHandle<SocketCore>());
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
AbstractProxyRequestCommand::AbstractProxyRequestCommand
|
AbstractProxyRequestCommand::AbstractProxyRequestCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -54,7 +54,7 @@ protected:
|
||||||
|
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
AbstractProxyRequestCommand(int cuid,
|
AbstractProxyRequestCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
AbstractProxyResponseCommand::AbstractProxyResponseCommand
|
AbstractProxyResponseCommand::AbstractProxyResponseCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -49,7 +49,7 @@ protected:
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
AbstractProxyResponseCommand
|
AbstractProxyResponseCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
ActivePeerConnectionCommand::ActivePeerConnectionCommand
|
ActivePeerConnectionCommand::ActivePeerConnectionCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
time_t interval)
|
time_t interval)
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
Time checkPoint;
|
Time checkPoint;
|
||||||
unsigned int _numNewConnection; // the number of the connection to establish.
|
unsigned int _numNewConnection; // the number of the connection to establish.
|
||||||
public:
|
public:
|
||||||
ActivePeerConnectionCommand(int cuid,
|
ActivePeerConnectionCommand(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
time_t interval);
|
time_t interval);
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
AutoSaveCommand::AutoSaveCommand(int32_t cuid, DownloadEngine* e, time_t interval):
|
AutoSaveCommand::AutoSaveCommand(cuid_t cuid, DownloadEngine* e, time_t interval):
|
||||||
TimeBasedCommand(cuid, e, interval, true) {}
|
TimeBasedCommand(cuid, e, interval, true) {}
|
||||||
|
|
||||||
AutoSaveCommand::~AutoSaveCommand() {}
|
AutoSaveCommand::~AutoSaveCommand() {}
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace aria2 {
|
||||||
class AutoSaveCommand : public TimeBasedCommand
|
class AutoSaveCommand : public TimeBasedCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AutoSaveCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
AutoSaveCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~AutoSaveCommand();
|
virtual ~AutoSaveCommand();
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
BtStopDownloadCommand::BtStopDownloadCommand
|
BtStopDownloadCommand::BtStopDownloadCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
time_t timeout):
|
time_t timeout):
|
||||||
|
|
|
@ -59,7 +59,7 @@ private:
|
||||||
SharedHandle<PieceStorage> _pieceStorage;
|
SharedHandle<PieceStorage> _pieceStorage;
|
||||||
public:
|
public:
|
||||||
BtStopDownloadCommand
|
BtStopDownloadCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
time_t timeout);
|
time_t timeout);
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
CheckIntegrityCommand::CheckIntegrityCommand
|
CheckIntegrityCommand::CheckIntegrityCommand
|
||||||
(int32_t cuid, RequestGroup* requestGroup, DownloadEngine* e,
|
(cuid_t cuid, RequestGroup* requestGroup, DownloadEngine* e,
|
||||||
const SharedHandle<CheckIntegrityEntry>& entry):
|
const SharedHandle<CheckIntegrityEntry>& entry):
|
||||||
RealtimeCommand(cuid, requestGroup, e),
|
RealtimeCommand(cuid, requestGroup, e),
|
||||||
_entry(entry)
|
_entry(entry)
|
||||||
|
|
|
@ -48,7 +48,7 @@ private:
|
||||||
SharedHandle<CheckIntegrityEntry> _entry;
|
SharedHandle<CheckIntegrityEntry> _entry;
|
||||||
Time _timer;
|
Time _timer;
|
||||||
public:
|
public:
|
||||||
CheckIntegrityCommand(int32_t cuid,
|
CheckIntegrityCommand(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<CheckIntegrityEntry>& entry);
|
const SharedHandle<CheckIntegrityEntry>& entry);
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
CheckIntegrityDispatcherCommand::CheckIntegrityDispatcherCommand
|
CheckIntegrityDispatcherCommand::CheckIntegrityDispatcherCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<CheckIntegrityMan>& fileAllocMan,
|
const SharedHandle<CheckIntegrityMan>& fileAllocMan,
|
||||||
DownloadEngine* e):SequentialDispatcherCommand<CheckIntegrityEntry>
|
DownloadEngine* e):SequentialDispatcherCommand<CheckIntegrityEntry>
|
||||||
(cuid, fileAllocMan, e)
|
(cuid, fileAllocMan, e)
|
||||||
|
@ -53,7 +53,7 @@ CheckIntegrityDispatcherCommand::CheckIntegrityDispatcherCommand
|
||||||
Command* CheckIntegrityDispatcherCommand::createCommand
|
Command* CheckIntegrityDispatcherCommand::createCommand
|
||||||
(const SharedHandle<CheckIntegrityEntry>& entry)
|
(const SharedHandle<CheckIntegrityEntry>& entry)
|
||||||
{
|
{
|
||||||
int32_t newCUID = _e->newCUID();
|
cuid_t newCUID = _e->newCUID();
|
||||||
logger->info("CUID#%d - Dispatching CheckIntegrityCommand CUID#%d.",
|
logger->info("CUID#%d - Dispatching CheckIntegrityCommand CUID#%d.",
|
||||||
cuid, newCUID);
|
cuid, newCUID);
|
||||||
return new CheckIntegrityCommand
|
return new CheckIntegrityCommand
|
||||||
|
|
|
@ -46,7 +46,7 @@ class CheckIntegrityDispatcherCommand :
|
||||||
public SequentialDispatcherCommand<CheckIntegrityEntry> {
|
public SequentialDispatcherCommand<CheckIntegrityEntry> {
|
||||||
public:
|
public:
|
||||||
CheckIntegrityDispatcherCommand
|
CheckIntegrityDispatcherCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<CheckIntegrityMan>& checkMan,
|
const SharedHandle<CheckIntegrityMan>& checkMan,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -60,7 +60,7 @@ private:
|
||||||
static int32_t uuidGen;
|
static int32_t uuidGen;
|
||||||
STATUS status;
|
STATUS status;
|
||||||
protected:
|
protected:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
Logger* logger;
|
Logger* logger;
|
||||||
|
|
||||||
bool _readEvent;
|
bool _readEvent;
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
CreateRequestCommand::CreateRequestCommand(int32_t cuid,
|
CreateRequestCommand::CreateRequestCommand(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e):
|
DownloadEngine* e):
|
||||||
AbstractCommand
|
AbstractCommand
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace aria2 {
|
||||||
|
|
||||||
class CreateRequestCommand:public AbstractCommand {
|
class CreateRequestCommand:public AbstractCommand {
|
||||||
public:
|
public:
|
||||||
CreateRequestCommand(int32_t cuid,
|
CreateRequestCommand(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTAutoSaveCommand::DHTAutoSaveCommand(int32_t cuid, DownloadEngine* e, time_t interval):
|
DHTAutoSaveCommand::DHTAutoSaveCommand(cuid_t cuid, DownloadEngine* e, time_t interval):
|
||||||
TimeBasedCommand(cuid, e, interval) {}
|
TimeBasedCommand(cuid, e, interval) {}
|
||||||
|
|
||||||
DHTAutoSaveCommand::~DHTAutoSaveCommand() {}
|
DHTAutoSaveCommand::~DHTAutoSaveCommand() {}
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
|
|
||||||
void save();
|
void save();
|
||||||
public:
|
public:
|
||||||
DHTAutoSaveCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
DHTAutoSaveCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~DHTAutoSaveCommand();
|
virtual ~DHTAutoSaveCommand();
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTBucketRefreshCommand::DHTBucketRefreshCommand(int32_t cuid, DownloadEngine* e, time_t interval):
|
DHTBucketRefreshCommand::DHTBucketRefreshCommand
|
||||||
|
(cuid_t cuid, DownloadEngine* e, time_t interval):
|
||||||
TimeBasedCommand(cuid, e, interval) {}
|
TimeBasedCommand(cuid, e, interval) {}
|
||||||
|
|
||||||
DHTBucketRefreshCommand::~DHTBucketRefreshCommand() {}
|
DHTBucketRefreshCommand::~DHTBucketRefreshCommand() {}
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
|
|
||||||
SharedHandle<DHTTaskFactory> _taskFactory;
|
SharedHandle<DHTTaskFactory> _taskFactory;
|
||||||
public:
|
public:
|
||||||
DHTBucketRefreshCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
DHTBucketRefreshCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~DHTBucketRefreshCommand();
|
virtual ~DHTBucketRefreshCommand();
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTEntryPointNameResolveCommand::DHTEntryPointNameResolveCommand
|
DHTEntryPointNameResolveCommand::DHTEntryPointNameResolveCommand
|
||||||
(int32_t cuid, DownloadEngine* e,
|
(cuid_t cuid, DownloadEngine* e,
|
||||||
const std::vector<std::pair<std::string, uint16_t> >& entryPoints):
|
const std::vector<std::pair<std::string, uint16_t> >& entryPoints):
|
||||||
Command(cuid),
|
Command(cuid),
|
||||||
_e(e),
|
_e(e),
|
||||||
|
|
|
@ -89,7 +89,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DHTEntryPointNameResolveCommand
|
DHTEntryPointNameResolveCommand
|
||||||
(int32_t cuid, DownloadEngine* e,
|
(cuid_t cuid, DownloadEngine* e,
|
||||||
const std::vector<std::pair<std:: string, uint16_t> >& entryPoints);
|
const std::vector<std::pair<std:: string, uint16_t> >& entryPoints);
|
||||||
|
|
||||||
virtual ~DHTEntryPointNameResolveCommand();
|
virtual ~DHTEntryPointNameResolveCommand();
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTGetPeersCommand::DHTGetPeersCommand(int32_t cuid,
|
DHTGetPeersCommand::DHTGetPeersCommand(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e):
|
DownloadEngine* e):
|
||||||
Command(cuid),
|
Command(cuid),
|
||||||
|
|
|
@ -74,7 +74,7 @@ private:
|
||||||
|
|
||||||
Time _lastGetPeerTime;
|
Time _lastGetPeerTime;
|
||||||
public:
|
public:
|
||||||
DHTGetPeersCommand(int32_t cuid, RequestGroup* requestGroup,
|
DHTGetPeersCommand(cuid_t cuid, RequestGroup* requestGroup,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
|
|
||||||
virtual ~DHTGetPeersCommand();
|
virtual ~DHTGetPeersCommand();
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTInteractionCommand::DHTInteractionCommand(int32_t cuid, DownloadEngine* e):
|
DHTInteractionCommand::DHTInteractionCommand(cuid_t cuid, DownloadEngine* e):
|
||||||
Command(cuid),
|
Command(cuid),
|
||||||
_e(e) {}
|
_e(e) {}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ private:
|
||||||
SharedHandle<SocketCore> _readCheckSocket;
|
SharedHandle<SocketCore> _readCheckSocket;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DHTInteractionCommand(int32_t cuid, DownloadEngine* e);
|
DHTInteractionCommand(cuid_t cuid, DownloadEngine* e);
|
||||||
|
|
||||||
virtual ~DHTInteractionCommand();
|
virtual ~DHTInteractionCommand();
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTPeerAnnounceCommand::DHTPeerAnnounceCommand(int32_t cuid, DownloadEngine* e, time_t interval):
|
DHTPeerAnnounceCommand::DHTPeerAnnounceCommand
|
||||||
|
(cuid_t cuid, DownloadEngine* e, time_t interval):
|
||||||
TimeBasedCommand(cuid, e, interval) {}
|
TimeBasedCommand(cuid, e, interval) {}
|
||||||
|
|
||||||
DHTPeerAnnounceCommand::~DHTPeerAnnounceCommand() {}
|
DHTPeerAnnounceCommand::~DHTPeerAnnounceCommand() {}
|
||||||
|
|
|
@ -46,7 +46,7 @@ class DHTPeerAnnounceCommand:public TimeBasedCommand {
|
||||||
private:
|
private:
|
||||||
SharedHandle<DHTPeerAnnounceStorage> _peerAnnounceStorage;
|
SharedHandle<DHTPeerAnnounceStorage> _peerAnnounceStorage;
|
||||||
public:
|
public:
|
||||||
DHTPeerAnnounceCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
DHTPeerAnnounceCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~DHTPeerAnnounceCommand();
|
virtual ~DHTPeerAnnounceCommand();
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
DHTTokenUpdateCommand::DHTTokenUpdateCommand(int32_t cuid,
|
DHTTokenUpdateCommand::DHTTokenUpdateCommand(cuid_t cuid,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
time_t interval):
|
time_t interval):
|
||||||
TimeBasedCommand(cuid, e, interval) {}
|
TimeBasedCommand(cuid, e, interval) {}
|
||||||
|
|
|
@ -46,7 +46,7 @@ class DHTTokenUpdateCommand:public TimeBasedCommand {
|
||||||
private:
|
private:
|
||||||
SharedHandle<DHTTokenTracker> _tokenTracker;
|
SharedHandle<DHTTokenTracker> _tokenTracker;
|
||||||
public:
|
public:
|
||||||
DHTTokenUpdateCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
DHTTokenUpdateCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~DHTTokenUpdateCommand();
|
virtual ~DHTTokenUpdateCommand();
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "TimeA2.h"
|
#include "TimeA2.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -97,7 +98,7 @@ public:
|
||||||
|
|
||||||
class DefaultBtInteractive : public BtInteractive {
|
class DefaultBtInteractive : public BtInteractive {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
|
|
||||||
SharedHandle<DownloadContext> _downloadContext;
|
SharedHandle<DownloadContext> _downloadContext;
|
||||||
|
|
||||||
|
@ -188,7 +189,8 @@ public:
|
||||||
|
|
||||||
virtual size_t countOutstandingRequest();
|
virtual size_t countOutstandingRequest();
|
||||||
|
|
||||||
void setCuid(int32_t cuid) {
|
void setCuid(cuid_t cuid)
|
||||||
|
{
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,10 @@ void DefaultBtMessageDispatcher::doCancelSendingPieceAction
|
||||||
class AbortOutstandingRequest {
|
class AbortOutstandingRequest {
|
||||||
private:
|
private:
|
||||||
SharedHandle<Piece> _piece;
|
SharedHandle<Piece> _piece;
|
||||||
int32_t _cuid;
|
cuid_t _cuid;
|
||||||
Logger* _logger;
|
Logger* _logger;
|
||||||
public:
|
public:
|
||||||
AbortOutstandingRequest(const SharedHandle<Piece>& piece, int32_t cuid):
|
AbortOutstandingRequest(const SharedHandle<Piece>& piece, cuid_t cuid):
|
||||||
_piece(piece),
|
_piece(piece),
|
||||||
_cuid(cuid),
|
_cuid(cuid),
|
||||||
_logger(LogFactory::getInstance()) {}
|
_logger(LogFactory::getInstance()) {}
|
||||||
|
@ -185,12 +185,12 @@ void DefaultBtMessageDispatcher::doAbortOutstandingRequestAction
|
||||||
|
|
||||||
class ProcessChokedRequestSlot {
|
class ProcessChokedRequestSlot {
|
||||||
private:
|
private:
|
||||||
int32_t _cuid;
|
cuid_t _cuid;
|
||||||
SharedHandle<Peer> _peer;
|
SharedHandle<Peer> _peer;
|
||||||
SharedHandle<PieceStorage> _pieceStorage;
|
SharedHandle<PieceStorage> _pieceStorage;
|
||||||
Logger* _logger;
|
Logger* _logger;
|
||||||
public:
|
public:
|
||||||
ProcessChokedRequestSlot(int32_t cuid,
|
ProcessChokedRequestSlot(cuid_t cuid,
|
||||||
const SharedHandle<Peer>& peer,
|
const SharedHandle<Peer>& peer,
|
||||||
const SharedHandle<PieceStorage>& pieceStorage):
|
const SharedHandle<PieceStorage>& pieceStorage):
|
||||||
_cuid(cuid),
|
_cuid(cuid),
|
||||||
|
@ -252,7 +252,7 @@ void DefaultBtMessageDispatcher::doChokingAction()
|
||||||
|
|
||||||
class ProcessStaleRequestSlot {
|
class ProcessStaleRequestSlot {
|
||||||
private:
|
private:
|
||||||
int32_t _cuid;
|
cuid_t _cuid;
|
||||||
SharedHandle<Peer> _peer;
|
SharedHandle<Peer> _peer;
|
||||||
SharedHandle<PieceStorage> _pieceStorage;
|
SharedHandle<PieceStorage> _pieceStorage;
|
||||||
BtMessageDispatcher* _messageDispatcher;
|
BtMessageDispatcher* _messageDispatcher;
|
||||||
|
@ -260,7 +260,7 @@ private:
|
||||||
time_t _requestTimeout;
|
time_t _requestTimeout;
|
||||||
Logger* _logger;
|
Logger* _logger;
|
||||||
public:
|
public:
|
||||||
ProcessStaleRequestSlot(int32_t cuid, const SharedHandle<Peer>& peer,
|
ProcessStaleRequestSlot(cuid_t cuid, const SharedHandle<Peer>& peer,
|
||||||
const SharedHandle<PieceStorage>& pieceStorage,
|
const SharedHandle<PieceStorage>& pieceStorage,
|
||||||
BtMessageDispatcher* dispatcher,
|
BtMessageDispatcher* dispatcher,
|
||||||
const WeakHandle<BtMessageFactory>& factory,
|
const WeakHandle<BtMessageFactory>& factory,
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include "a2time.h"
|
#include "a2time.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ class RequestGroupMan;
|
||||||
|
|
||||||
class DefaultBtMessageDispatcher : public BtMessageDispatcher {
|
class DefaultBtMessageDispatcher : public BtMessageDispatcher {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
std::deque<SharedHandle<BtMessage> > messageQueue;
|
std::deque<SharedHandle<BtMessage> > messageQueue;
|
||||||
std::deque<RequestSlot> requestSlots;
|
std::deque<RequestSlot> requestSlots;
|
||||||
SharedHandle<DownloadContext> _downloadContext;
|
SharedHandle<DownloadContext> _downloadContext;
|
||||||
|
@ -133,7 +134,8 @@ public:
|
||||||
|
|
||||||
void setRequestGroupMan(const WeakHandle<RequestGroupMan>& rgman);
|
void setRequestGroupMan(const WeakHandle<RequestGroupMan>& rgman);
|
||||||
|
|
||||||
void setCuid(int32_t cuid) {
|
void setCuid(cuid_t cuid)
|
||||||
|
{
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#define _D_DEFAULT_BT_MESSAGE_FACTORY_H_
|
#define _D_DEFAULT_BT_MESSAGE_FACTORY_H_
|
||||||
|
|
||||||
#include "BtMessageFactory.h"
|
#include "BtMessageFactory.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ class DHTTaskFactory;
|
||||||
|
|
||||||
class DefaultBtMessageFactory : public BtMessageFactory {
|
class DefaultBtMessageFactory : public BtMessageFactory {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
SharedHandle<DownloadContext> _downloadContext;
|
SharedHandle<DownloadContext> _downloadContext;
|
||||||
SharedHandle<PieceStorage> _pieceStorage;
|
SharedHandle<PieceStorage> _pieceStorage;
|
||||||
SharedHandle<PeerStorage> _peerStorage;
|
SharedHandle<PeerStorage> _peerStorage;
|
||||||
|
@ -142,7 +143,8 @@ public:
|
||||||
|
|
||||||
void setPeerStorage(const SharedHandle<PeerStorage>& peerStorage);
|
void setPeerStorage(const SharedHandle<PeerStorage>& peerStorage);
|
||||||
|
|
||||||
void setCuid(int32_t cuid) {
|
void setCuid(cuid_t cuid)
|
||||||
|
{
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#define _D_DEFAULT_BT_MESSAGE_RECEIVER_H_
|
#define _D_DEFAULT_BT_MESSAGE_RECEIVER_H_
|
||||||
|
|
||||||
#include "BtMessageReceiver.h"
|
#include "BtMessageReceiver.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ class Logger;
|
||||||
|
|
||||||
class DefaultBtMessageReceiver : public BtMessageReceiver {
|
class DefaultBtMessageReceiver : public BtMessageReceiver {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
bool handshakeSent;
|
bool handshakeSent;
|
||||||
SharedHandle<DownloadContext> _downloadContext;
|
SharedHandle<DownloadContext> _downloadContext;
|
||||||
SharedHandle<Peer> peer;
|
SharedHandle<Peer> peer;
|
||||||
|
@ -69,11 +70,13 @@ public:
|
||||||
|
|
||||||
virtual SharedHandle<BtMessage> receiveMessage();
|
virtual SharedHandle<BtMessage> receiveMessage();
|
||||||
|
|
||||||
void setCuid(int32_t cuid) {
|
void setCuid(cuid_t cuid)
|
||||||
|
{
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t getCuid() const {
|
cuid_t getCuid() const
|
||||||
|
{
|
||||||
return cuid;
|
return cuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
class PieceStorage;
|
class PieceStorage;
|
||||||
|
@ -50,7 +52,7 @@ class Logger;
|
||||||
|
|
||||||
class DefaultBtRequestFactory : public BtRequestFactory {
|
class DefaultBtRequestFactory : public BtRequestFactory {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
SharedHandle<PieceStorage> _pieceStorage;
|
SharedHandle<PieceStorage> _pieceStorage;
|
||||||
SharedHandle<Peer> peer;
|
SharedHandle<Peer> peer;
|
||||||
WeakHandle<BtMessageDispatcher> dispatcher;
|
WeakHandle<BtMessageDispatcher> dispatcher;
|
||||||
|
@ -91,7 +93,7 @@ public:
|
||||||
return pieces;
|
return pieces;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCuid(int32_t cuid)
|
void setCuid(cuid_t cuid)
|
||||||
{
|
{
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,7 +535,7 @@ size_t DefaultPieceStorage::getPieceLength(size_t index)
|
||||||
return bitfieldMan->getBlockLength(index);
|
return bitfieldMan->getBlockLength(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultPieceStorage::advertisePiece(int32_t cuid, size_t index)
|
void DefaultPieceStorage::advertisePiece(cuid_t cuid, size_t index)
|
||||||
{
|
{
|
||||||
HaveEntry entry(cuid, index);
|
HaveEntry entry(cuid, index);
|
||||||
haves.push_front(entry);
|
haves.push_front(entry);
|
||||||
|
@ -543,7 +543,7 @@ void DefaultPieceStorage::advertisePiece(int32_t cuid, size_t index)
|
||||||
|
|
||||||
void
|
void
|
||||||
DefaultPieceStorage::getAdvertisedPieceIndexes(std::vector<size_t>& indexes,
|
DefaultPieceStorage::getAdvertisedPieceIndexes(std::vector<size_t>& indexes,
|
||||||
int32_t myCuid,
|
cuid_t myCuid,
|
||||||
const Time& lastCheckTime)
|
const Time& lastCheckTime)
|
||||||
{
|
{
|
||||||
for(std::deque<HaveEntry>::const_iterator itr = haves.begin(),
|
for(std::deque<HaveEntry>::const_iterator itr = haves.begin(),
|
||||||
|
|
|
@ -54,15 +54,15 @@ class PieceSelector;
|
||||||
|
|
||||||
class HaveEntry {
|
class HaveEntry {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
size_t index;
|
size_t index;
|
||||||
Time registeredTime;
|
Time registeredTime;
|
||||||
public:
|
public:
|
||||||
HaveEntry(int32_t cuid, size_t index):
|
HaveEntry(cuid_t cuid, size_t index):
|
||||||
cuid(cuid),
|
cuid(cuid),
|
||||||
index(index) {}
|
index(index) {}
|
||||||
|
|
||||||
int32_t getCuid() const { return cuid; }
|
cuid_t getCuid() const { return cuid; }
|
||||||
|
|
||||||
size_t getIndex() const { return index; }
|
size_t getIndex() const { return index; }
|
||||||
|
|
||||||
|
@ -191,11 +191,11 @@ public:
|
||||||
|
|
||||||
virtual size_t getPieceLength(size_t index);
|
virtual size_t getPieceLength(size_t index);
|
||||||
|
|
||||||
virtual void advertisePiece(int32_t cuid, size_t index);
|
virtual void advertisePiece(cuid_t cuid, size_t index);
|
||||||
|
|
||||||
virtual void
|
virtual void
|
||||||
getAdvertisedPieceIndexes(std::vector<size_t>& indexes,
|
getAdvertisedPieceIndexes(std::vector<size_t>& indexes,
|
||||||
int32_t myCuid, const Time& lastCheckTime);
|
cuid_t myCuid, const Time& lastCheckTime);
|
||||||
|
|
||||||
virtual void removeAdvertisedPiece(time_t elapsed);
|
virtual void removeAdvertisedPiece(time_t elapsed);
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ namespace aria2 {
|
||||||
|
|
||||||
static const size_t BUFSIZE = 16*1024;
|
static const size_t BUFSIZE = 16*1024;
|
||||||
|
|
||||||
DownloadCommand::DownloadCommand(int cuid,
|
DownloadCommand::DownloadCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -76,7 +76,7 @@ protected:
|
||||||
virtual bool prepareForNextSegment();
|
virtual bool prepareForNextSegment();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DownloadCommand(int cuid,
|
DownloadCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FileAllocationCommand::FileAllocationCommand
|
FileAllocationCommand::FileAllocationCommand
|
||||||
(int cuid, RequestGroup* requestGroup, DownloadEngine* e,
|
(cuid_t cuid, RequestGroup* requestGroup, DownloadEngine* e,
|
||||||
const SharedHandle<FileAllocationEntry>& fileAllocationEntry):
|
const SharedHandle<FileAllocationEntry>& fileAllocationEntry):
|
||||||
RealtimeCommand(cuid, requestGroup, e),
|
RealtimeCommand(cuid, requestGroup, e),
|
||||||
_fileAllocationEntry(fileAllocationEntry) {}
|
_fileAllocationEntry(fileAllocationEntry) {}
|
||||||
|
|
|
@ -48,7 +48,7 @@ private:
|
||||||
SharedHandle<FileAllocationEntry> _fileAllocationEntry;
|
SharedHandle<FileAllocationEntry> _fileAllocationEntry;
|
||||||
Time _timer;
|
Time _timer;
|
||||||
public:
|
public:
|
||||||
FileAllocationCommand(int cuid, RequestGroup* requestGroup,
|
FileAllocationCommand(cuid_t cuid, RequestGroup* requestGroup,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<FileAllocationEntry>& fileAllocationEntry);
|
const SharedHandle<FileAllocationEntry>& fileAllocationEntry);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FileAllocationDispatcherCommand::FileAllocationDispatcherCommand
|
FileAllocationDispatcherCommand::FileAllocationDispatcherCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<FileAllocationMan>& fileAllocMan,
|
const SharedHandle<FileAllocationMan>& fileAllocMan,
|
||||||
DownloadEngine* e):SequentialDispatcherCommand<FileAllocationEntry>
|
DownloadEngine* e):SequentialDispatcherCommand<FileAllocationEntry>
|
||||||
(cuid, fileAllocMan, e) {}
|
(cuid, fileAllocMan, e) {}
|
||||||
|
@ -50,7 +50,7 @@ FileAllocationDispatcherCommand::FileAllocationDispatcherCommand
|
||||||
Command* FileAllocationDispatcherCommand::createCommand
|
Command* FileAllocationDispatcherCommand::createCommand
|
||||||
(const SharedHandle<FileAllocationEntry>& entry)
|
(const SharedHandle<FileAllocationEntry>& entry)
|
||||||
{
|
{
|
||||||
int32_t newCUID = _e->newCUID();
|
cuid_t newCUID = _e->newCUID();
|
||||||
logger->info(MSG_FILE_ALLOCATION_DISPATCH, newCUID);
|
logger->info(MSG_FILE_ALLOCATION_DISPATCH, newCUID);
|
||||||
FileAllocationCommand* command =
|
FileAllocationCommand* command =
|
||||||
new FileAllocationCommand(newCUID, entry->getRequestGroup(), _e, entry);
|
new FileAllocationCommand(newCUID, entry->getRequestGroup(), _e, entry);
|
||||||
|
|
|
@ -46,7 +46,7 @@ class FileAllocationDispatcherCommand :
|
||||||
public SequentialDispatcherCommand<FileAllocationEntry> {
|
public SequentialDispatcherCommand<FileAllocationEntry> {
|
||||||
public:
|
public:
|
||||||
FileAllocationDispatcherCommand
|
FileAllocationDispatcherCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<FileAllocationMan>& fileAllocMan,
|
const SharedHandle<FileAllocationMan>& fileAllocMan,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FillRequestGroupCommand::FillRequestGroupCommand(int32_t cuid,
|
FillRequestGroupCommand::FillRequestGroupCommand(cuid_t cuid,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
time_t interval):
|
time_t interval):
|
||||||
Command(cuid),
|
Command(cuid),
|
||||||
|
|
|
@ -50,7 +50,7 @@ private:
|
||||||
time_t _interval;
|
time_t _interval;
|
||||||
Time _checkPoint;
|
Time _checkPoint;
|
||||||
public:
|
public:
|
||||||
FillRequestGroupCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
FillRequestGroupCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~FillRequestGroupCommand();
|
virtual ~FillRequestGroupCommand();
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ const std::string FtpConnection::A("A");
|
||||||
|
|
||||||
const std::string FtpConnection::I("I");
|
const std::string FtpConnection::I("I");
|
||||||
|
|
||||||
FtpConnection::FtpConnection(int32_t cuid, const SocketHandle& socket,
|
FtpConnection::FtpConnection(cuid_t cuid, const SocketHandle& socket,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<AuthConfig>& authConfig,
|
const SharedHandle<AuthConfig>& authConfig,
|
||||||
const Option* op):
|
const Option* op):
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "SharedHandle.h"
|
#include "SharedHandle.h"
|
||||||
#include "TimeA2.h"
|
#include "TimeA2.h"
|
||||||
#include "SocketBuffer.h"
|
#include "SocketBuffer.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ class AuthConfig;
|
||||||
|
|
||||||
class FtpConnection {
|
class FtpConnection {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
SharedHandle<SocketCore> socket;
|
SharedHandle<SocketCore> socket;
|
||||||
SharedHandle<Request> req;
|
SharedHandle<Request> req;
|
||||||
|
|
||||||
|
@ -82,7 +83,7 @@ private:
|
||||||
//prepare for large banners
|
//prepare for large banners
|
||||||
static const size_t MAX_RECV_BUFFER = 65536;
|
static const size_t MAX_RECV_BUFFER = 65536;
|
||||||
public:
|
public:
|
||||||
FtpConnection(int32_t cuid, const SharedHandle<SocketCore>& socket,
|
FtpConnection(cuid_t cuid, const SharedHandle<SocketCore>& socket,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<AuthConfig>& authConfig,
|
const SharedHandle<AuthConfig>& authConfig,
|
||||||
const Option* op);
|
const Option* op);
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FtpDownloadCommand::FtpDownloadCommand
|
FtpDownloadCommand::FtpDownloadCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -49,7 +49,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual bool prepareForNextSegment();
|
virtual bool prepareForNextSegment();
|
||||||
public:
|
public:
|
||||||
FtpDownloadCommand(int cuid,
|
FtpDownloadCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FtpFinishDownloadCommand::FtpFinishDownloadCommand
|
FtpFinishDownloadCommand::FtpFinishDownloadCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -49,7 +49,7 @@ protected:
|
||||||
|
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
FtpFinishDownloadCommand(int cuid,
|
FtpFinishDownloadCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FtpInitiateConnectionCommand::FtpInitiateConnectionCommand
|
FtpInitiateConnectionCommand::FtpInitiateConnectionCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -46,7 +46,7 @@ protected:
|
||||||
const std::vector<std::string>& resolvedAddresses,
|
const std::vector<std::string>& resolvedAddresses,
|
||||||
const SharedHandle<Request>& proxyRequest);
|
const SharedHandle<Request>& proxyRequest);
|
||||||
public:
|
public:
|
||||||
FtpInitiateConnectionCommand(int cuid, const SharedHandle<Request>& req,
|
FtpInitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup, DownloadEngine* e);
|
RequestGroup* requestGroup, DownloadEngine* e);
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FtpNegotiationCommand::FtpNegotiationCommand
|
FtpNegotiationCommand::FtpNegotiationCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -126,7 +126,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
FtpNegotiationCommand(int32_t cuid,
|
FtpNegotiationCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FtpTunnelRequestCommand::FtpTunnelRequestCommand
|
FtpTunnelRequestCommand::FtpTunnelRequestCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SocketCore;
|
||||||
|
|
||||||
class FtpTunnelRequestCommand : public AbstractProxyRequestCommand {
|
class FtpTunnelRequestCommand : public AbstractProxyRequestCommand {
|
||||||
public:
|
public:
|
||||||
FtpTunnelRequestCommand(int cuid,
|
FtpTunnelRequestCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
FtpTunnelResponseCommand::FtpTunnelResponseCommand
|
FtpTunnelResponseCommand::FtpTunnelResponseCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SocketCore;
|
||||||
|
|
||||||
class FtpTunnelResponseCommand : public AbstractProxyResponseCommand {
|
class FtpTunnelResponseCommand : public AbstractProxyResponseCommand {
|
||||||
public:
|
public:
|
||||||
FtpTunnelResponseCommand(int cuid,
|
FtpTunnelResponseCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HaveEraseCommand::HaveEraseCommand(int32_t cuid, DownloadEngine* e, time_t interval)
|
HaveEraseCommand::HaveEraseCommand(cuid_t cuid, DownloadEngine* e, time_t interval)
|
||||||
:TimeBasedCommand(cuid, e, interval, true) {}
|
:TimeBasedCommand(cuid, e, interval, true) {}
|
||||||
|
|
||||||
HaveEraseCommand::~HaveEraseCommand() {}
|
HaveEraseCommand::~HaveEraseCommand() {}
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace aria2 {
|
||||||
class HaveEraseCommand : public TimeBasedCommand
|
class HaveEraseCommand : public TimeBasedCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HaveEraseCommand(int32_t cuid, DownloadEngine* e, time_t interval);
|
HaveEraseCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
|
||||||
|
|
||||||
virtual ~HaveEraseCommand();
|
virtual ~HaveEraseCommand();
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ HttpRequestEntry::HttpRequestEntry
|
||||||
|
|
||||||
HttpRequestEntry::~HttpRequestEntry() {}
|
HttpRequestEntry::~HttpRequestEntry() {}
|
||||||
|
|
||||||
HttpConnection::HttpConnection(int32_t cuid,
|
HttpConnection::HttpConnection(cuid_t cuid,
|
||||||
const SocketHandle& socket,
|
const SocketHandle& socket,
|
||||||
const Option* op):
|
const Option* op):
|
||||||
cuid(cuid), socket(socket),
|
cuid(cuid), socket(socket),
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
#include "SharedHandle.h"
|
#include "SharedHandle.h"
|
||||||
#include "SocketBuffer.h"
|
#include "SocketBuffer.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ typedef std::deque<HttpRequestEntryHandle> HttpRequestEntries;
|
||||||
|
|
||||||
class HttpConnection {
|
class HttpConnection {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
SharedHandle<SocketCore> socket;
|
SharedHandle<SocketCore> socket;
|
||||||
SocketBuffer _socketBuffer;
|
SocketBuffer _socketBuffer;
|
||||||
const Option* option;
|
const Option* option;
|
||||||
|
@ -88,7 +89,7 @@ private:
|
||||||
|
|
||||||
std::string eraseConfidentialInfo(const std::string& request);
|
std::string eraseConfidentialInfo(const std::string& request);
|
||||||
public:
|
public:
|
||||||
HttpConnection(int32_t cuid,
|
HttpConnection(cuid_t cuid,
|
||||||
const SharedHandle<SocketCore>& socket,
|
const SharedHandle<SocketCore>& socket,
|
||||||
const Option* op);
|
const Option* op);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpDownloadCommand::HttpDownloadCommand
|
HttpDownloadCommand::HttpDownloadCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -49,7 +49,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual bool prepareForNextSegment();
|
virtual bool prepareForNextSegment();
|
||||||
public:
|
public:
|
||||||
HttpDownloadCommand(int cuid,
|
HttpDownloadCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpInitiateConnectionCommand::HttpInitiateConnectionCommand
|
HttpInitiateConnectionCommand::HttpInitiateConnectionCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -46,7 +46,7 @@ protected:
|
||||||
const std::vector<std::string>& resolvedAddresses,
|
const std::vector<std::string>& resolvedAddresses,
|
||||||
const SharedHandle<Request>& proxyRequest);
|
const SharedHandle<Request>& proxyRequest);
|
||||||
public:
|
public:
|
||||||
HttpInitiateConnectionCommand(int cuid, const SharedHandle<Request>& req,
|
HttpInitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpListenCommand::HttpListenCommand(int32_t cuid, DownloadEngine* e):
|
HttpListenCommand::HttpListenCommand(cuid_t cuid, DownloadEngine* e):
|
||||||
Command(cuid),_e(e) {}
|
Command(cuid),_e(e) {}
|
||||||
|
|
||||||
HttpListenCommand::~HttpListenCommand()
|
HttpListenCommand::~HttpListenCommand()
|
||||||
|
|
|
@ -48,7 +48,7 @@ private:
|
||||||
DownloadEngine* _e;
|
DownloadEngine* _e;
|
||||||
SharedHandle<SocketCore> _serverSocket;
|
SharedHandle<SocketCore> _serverSocket;
|
||||||
public:
|
public:
|
||||||
HttpListenCommand(int32_t cuid, DownloadEngine* e);
|
HttpListenCommand(cuid_t cuid, DownloadEngine* e);
|
||||||
|
|
||||||
virtual ~HttpListenCommand();
|
virtual ~HttpListenCommand();
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpProxyRequestCommand::HttpProxyRequestCommand
|
HttpProxyRequestCommand::HttpProxyRequestCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SocketCore;
|
||||||
|
|
||||||
class HttpProxyRequestCommand : public AbstractProxyRequestCommand {
|
class HttpProxyRequestCommand : public AbstractProxyRequestCommand {
|
||||||
public:
|
public:
|
||||||
HttpProxyRequestCommand(int cuid,
|
HttpProxyRequestCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpProxyResponseCommand::HttpProxyResponseCommand
|
HttpProxyResponseCommand::HttpProxyResponseCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -43,7 +43,7 @@ class SocketCore;
|
||||||
|
|
||||||
class HttpProxyResponseCommand : public AbstractProxyResponseCommand {
|
class HttpProxyResponseCommand : public AbstractProxyResponseCommand {
|
||||||
public:
|
public:
|
||||||
HttpProxyResponseCommand(int cuid,
|
HttpProxyResponseCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpRequestCommand::HttpRequestCommand
|
HttpRequestCommand::HttpRequestCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -54,7 +54,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
HttpRequestCommand(int cuid,
|
HttpRequestCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
#include "SharedHandle.h"
|
#include "SharedHandle.h"
|
||||||
#include "TimeA2.h"
|
#include "TimeA2.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -51,7 +52,7 @@ class Decoder;
|
||||||
|
|
||||||
class HttpResponse {
|
class HttpResponse {
|
||||||
private:
|
private:
|
||||||
int32_t cuid;
|
cuid_t cuid;
|
||||||
SharedHandle<HttpRequest> httpRequest;
|
SharedHandle<HttpRequest> httpRequest;
|
||||||
SharedHandle<HttpHeader> httpHeader;
|
SharedHandle<HttpHeader> httpHeader;
|
||||||
Logger* logger;
|
Logger* logger;
|
||||||
|
@ -116,7 +117,7 @@ public:
|
||||||
return httpRequest;
|
return httpRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCuid(int32_t cuid)
|
void setCuid(cuid_t cuid)
|
||||||
{
|
{
|
||||||
this->cuid = cuid;
|
this->cuid = cuid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ static SharedHandle<Decoder> getContentEncodingDecoder
|
||||||
(const SharedHandle<HttpResponse>& httpResponse);
|
(const SharedHandle<HttpResponse>& httpResponse);
|
||||||
|
|
||||||
HttpResponseCommand::HttpResponseCommand
|
HttpResponseCommand::HttpResponseCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -73,7 +73,7 @@ protected:
|
||||||
(const SharedHandle<HttpResponse>& httpResponse);
|
(const SharedHandle<HttpResponse>& httpResponse);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HttpResponseCommand(int32_t cuid,
|
HttpResponseCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpServerBodyCommand::HttpServerBodyCommand
|
HttpServerBodyCommand::HttpServerBodyCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<HttpServer>& httpServer,
|
const SharedHandle<HttpServer>& httpServer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket):
|
const SharedHandle<SocketCore>& socket):
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
SharedHandle<HttpServer> _httpServer;
|
SharedHandle<HttpServer> _httpServer;
|
||||||
Time _timeout;
|
Time _timeout;
|
||||||
public:
|
public:
|
||||||
HttpServerBodyCommand(int32_t cuid,
|
HttpServerBodyCommand(cuid_t cuid,
|
||||||
const SharedHandle<HttpServer>& httpServer,
|
const SharedHandle<HttpServer>& httpServer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket);
|
const SharedHandle<SocketCore>& socket);
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpServerCommand::HttpServerCommand(int32_t cuid, DownloadEngine* e,
|
HttpServerCommand::HttpServerCommand(cuid_t cuid, DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket):
|
const SharedHandle<SocketCore>& socket):
|
||||||
Command(cuid),
|
Command(cuid),
|
||||||
_e(e),
|
_e(e),
|
||||||
|
@ -69,7 +69,7 @@ HttpServerCommand::HttpServerCommand(int32_t cuid, DownloadEngine* e,
|
||||||
#endif // !HAVE_LIBZ
|
#endif // !HAVE_LIBZ
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpServerCommand::HttpServerCommand(int32_t cuid,
|
HttpServerCommand::HttpServerCommand(cuid_t cuid,
|
||||||
const SharedHandle<HttpServer>& httpServer,
|
const SharedHandle<HttpServer>& httpServer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket):
|
const SharedHandle<SocketCore>& socket):
|
||||||
|
|
|
@ -52,10 +52,10 @@ private:
|
||||||
SharedHandle<HttpServer> _httpServer;
|
SharedHandle<HttpServer> _httpServer;
|
||||||
Time _timeout;
|
Time _timeout;
|
||||||
public:
|
public:
|
||||||
HttpServerCommand(int32_t cuid, DownloadEngine* e,
|
HttpServerCommand(cuid_t cuid, DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket);
|
const SharedHandle<SocketCore>& socket);
|
||||||
|
|
||||||
HttpServerCommand(int32_t cuid,
|
HttpServerCommand(cuid_t cuid,
|
||||||
const SharedHandle<HttpServer>& httpServer,
|
const SharedHandle<HttpServer>& httpServer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket);
|
const SharedHandle<SocketCore>& socket);
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpServerResponseCommand::HttpServerResponseCommand
|
HttpServerResponseCommand::HttpServerResponseCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<HttpServer>& httpServer,
|
const SharedHandle<HttpServer>& httpServer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket):
|
const SharedHandle<SocketCore>& socket):
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
SharedHandle<HttpServer> _httpServer;
|
SharedHandle<HttpServer> _httpServer;
|
||||||
Time _timeout;
|
Time _timeout;
|
||||||
public:
|
public:
|
||||||
HttpServerResponseCommand(int32_t cuid,
|
HttpServerResponseCommand(cuid_t cuid,
|
||||||
const SharedHandle<HttpServer>& httpServer,
|
const SharedHandle<HttpServer>& httpServer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& socket);
|
const SharedHandle<SocketCore>& socket);
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpSkipResponseCommand::HttpSkipResponseCommand
|
HttpSkipResponseCommand::HttpSkipResponseCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -61,7 +61,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
HttpSkipResponseCommand(int cuid,
|
HttpSkipResponseCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
InitiateConnectionCommand::InitiateConnectionCommand
|
InitiateConnectionCommand::InitiateConnectionCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -60,7 +60,7 @@ protected:
|
||||||
const std::vector<std::string>& resolvedAddresses,
|
const std::vector<std::string>& resolvedAddresses,
|
||||||
const SharedHandle<Request>& proxyRequest) = 0;
|
const SharedHandle<Request>& proxyRequest) = 0;
|
||||||
public:
|
public:
|
||||||
InitiateConnectionCommand(int cuid, const SharedHandle<Request>& req,
|
InitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace aria2 {
|
||||||
|
|
||||||
Command*
|
Command*
|
||||||
InitiateConnectionCommandFactory::createInitiateConnectionCommand
|
InitiateConnectionCommandFactory::createInitiateConnectionCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -37,19 +37,19 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "SharedHandle.h"
|
#include "SharedHandle.h"
|
||||||
|
#include "Command.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
class Request;
|
class Request;
|
||||||
class RequestGroup;
|
class RequestGroup;
|
||||||
class DownloadEngine;
|
class DownloadEngine;
|
||||||
class Command;
|
|
||||||
class FileEntry;
|
class FileEntry;
|
||||||
|
|
||||||
class InitiateConnectionCommandFactory {
|
class InitiateConnectionCommandFactory {
|
||||||
public:
|
public:
|
||||||
static Command*
|
static Command*
|
||||||
createInitiateConnectionCommand(int32_t cuid,
|
createInitiateConnectionCommand(cuid_t cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
const SharedHandle<FileEntry>& fileEntry,
|
const SharedHandle<FileEntry>& fileEntry,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
InitiatorMSEHandshakeCommand::InitiatorMSEHandshakeCommand
|
InitiatorMSEHandshakeCommand::InitiatorMSEHandshakeCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
const SharedHandle<Peer>& p,
|
const SharedHandle<Peer>& p,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
|
|
|
@ -77,7 +77,7 @@ protected:
|
||||||
virtual bool exitBeforeExecute();
|
virtual bool exitBeforeExecute();
|
||||||
public:
|
public:
|
||||||
InitiatorMSEHandshakeCommand
|
InitiatorMSEHandshakeCommand
|
||||||
(int32_t cuid,
|
(cuid_t cuid,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
const SharedHandle<Peer>& peer,
|
const SharedHandle<Peer>& peer,
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
LpdDispatchMessageCommand::LpdDispatchMessageCommand
|
LpdDispatchMessageCommand::LpdDispatchMessageCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<LpdMessageDispatcher>& dispatcher,
|
const SharedHandle<LpdMessageDispatcher>& dispatcher,
|
||||||
DownloadEngine* e):
|
DownloadEngine* e):
|
||||||
Command(cuid),
|
Command(cuid),
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
SharedHandle<BtRuntime> _btRuntime;
|
SharedHandle<BtRuntime> _btRuntime;
|
||||||
public:
|
public:
|
||||||
LpdDispatchMessageCommand
|
LpdDispatchMessageCommand
|
||||||
(int cuid,
|
(cuid_t cuid,
|
||||||
const SharedHandle<LpdMessageDispatcher>& dispatcher,
|
const SharedHandle<LpdMessageDispatcher>& dispatcher,
|
||||||
DownloadEngine* e);
|
DownloadEngine* e);
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue