2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use cuid_t type for cuid.
pull/1/head
Tatsuhiro Tsujikawa 2010-03-20 14:30:36 +00:00
parent 10edc156ea
commit bf5f559c5c
138 changed files with 196 additions and 171 deletions

View File

@ -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>
Added v key in DHT message. aria2's DHT version is independent of

View File

@ -36,6 +36,7 @@
#define _D_ABSTRACT_BT_MESSAGE_H_
#include "BtMessage.h"
#include "Command.h"
namespace aria2 {
@ -53,7 +54,7 @@ protected:
bool sendingInProgress;
bool invalidate;
bool uploading;
int32_t cuid;
cuid_t cuid;
std::string _name;
@ -103,11 +104,11 @@ public:
this->uploading = uploading;
}
int32_t getCuid() const {
cuid_t getCuid() const {
return cuid;
}
void setCuid(int32_t cuid) {
void setCuid(cuid_t cuid) {
this->cuid = cuid;
}

View File

@ -68,7 +68,7 @@
namespace aria2 {
AbstractCommand::AbstractCommand(int32_t cuid,
AbstractCommand::AbstractCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -152,7 +152,7 @@ private:
#endif // ENABLE_ASYNC_DNS
public:
AbstractCommand(int32_t cuid, const SharedHandle<Request>& req,
AbstractCommand(cuid_t cuid, const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup, DownloadEngine* e,
const SharedHandle<SocketCore>& s = SharedHandle<SocketCore>());

View File

@ -50,7 +50,7 @@
namespace aria2 {
AbstractProxyRequestCommand::AbstractProxyRequestCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -54,7 +54,7 @@ protected:
virtual bool executeInternal();
public:
AbstractProxyRequestCommand(int cuid,
AbstractProxyRequestCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -50,7 +50,7 @@
namespace aria2 {
AbstractProxyResponseCommand::AbstractProxyResponseCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -49,7 +49,7 @@ protected:
virtual bool executeInternal();
public:
AbstractProxyResponseCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -54,7 +54,7 @@
namespace aria2 {
ActivePeerConnectionCommand::ActivePeerConnectionCommand
(int cuid,
(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e,
time_t interval)

View File

@ -62,7 +62,7 @@ private:
Time checkPoint;
unsigned int _numNewConnection; // the number of the connection to establish.
public:
ActivePeerConnectionCommand(int cuid,
ActivePeerConnectionCommand(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e,
time_t interval);

View File

@ -39,7 +39,7 @@
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) {}
AutoSaveCommand::~AutoSaveCommand() {}

View File

@ -42,7 +42,7 @@ namespace aria2 {
class AutoSaveCommand : public TimeBasedCommand
{
public:
AutoSaveCommand(int32_t cuid, DownloadEngine* e, time_t interval);
AutoSaveCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~AutoSaveCommand();

View File

@ -44,7 +44,7 @@
namespace aria2 {
BtStopDownloadCommand::BtStopDownloadCommand
(int32_t cuid,
(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e,
time_t timeout):

View File

@ -59,7 +59,7 @@ private:
SharedHandle<PieceStorage> _pieceStorage;
public:
BtStopDownloadCommand
(int32_t cuid,
(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e,
time_t timeout);

View File

@ -46,7 +46,7 @@
namespace aria2 {
CheckIntegrityCommand::CheckIntegrityCommand
(int32_t cuid, RequestGroup* requestGroup, DownloadEngine* e,
(cuid_t cuid, RequestGroup* requestGroup, DownloadEngine* e,
const SharedHandle<CheckIntegrityEntry>& entry):
RealtimeCommand(cuid, requestGroup, e),
_entry(entry)

View File

@ -48,7 +48,7 @@ private:
SharedHandle<CheckIntegrityEntry> _entry;
Time _timer;
public:
CheckIntegrityCommand(int32_t cuid,
CheckIntegrityCommand(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e,
const SharedHandle<CheckIntegrityEntry>& entry);

View File

@ -42,7 +42,7 @@
namespace aria2 {
CheckIntegrityDispatcherCommand::CheckIntegrityDispatcherCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<CheckIntegrityMan>& fileAllocMan,
DownloadEngine* e):SequentialDispatcherCommand<CheckIntegrityEntry>
(cuid, fileAllocMan, e)
@ -53,7 +53,7 @@ CheckIntegrityDispatcherCommand::CheckIntegrityDispatcherCommand
Command* CheckIntegrityDispatcherCommand::createCommand
(const SharedHandle<CheckIntegrityEntry>& entry)
{
int32_t newCUID = _e->newCUID();
cuid_t newCUID = _e->newCUID();
logger->info("CUID#%d - Dispatching CheckIntegrityCommand CUID#%d.",
cuid, newCUID);
return new CheckIntegrityCommand

View File

@ -46,7 +46,7 @@ class CheckIntegrityDispatcherCommand :
public SequentialDispatcherCommand<CheckIntegrityEntry> {
public:
CheckIntegrityDispatcherCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<CheckIntegrityMan>& checkMan,
DownloadEngine* e);
protected:

View File

@ -60,7 +60,7 @@ private:
static int32_t uuidGen;
STATUS status;
protected:
int32_t cuid;
cuid_t cuid;
Logger* logger;
bool _readEvent;

View File

@ -49,7 +49,7 @@
namespace aria2 {
CreateRequestCommand::CreateRequestCommand(int32_t cuid,
CreateRequestCommand::CreateRequestCommand(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e):
AbstractCommand

View File

@ -41,7 +41,7 @@ namespace aria2 {
class CreateRequestCommand:public AbstractCommand {
public:
CreateRequestCommand(int32_t cuid,
CreateRequestCommand(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e);
protected:

View File

@ -58,7 +58,7 @@
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) {}
DHTAutoSaveCommand::~DHTAutoSaveCommand() {}

View File

@ -52,7 +52,7 @@ private:
void save();
public:
DHTAutoSaveCommand(int32_t cuid, DownloadEngine* e, time_t interval);
DHTAutoSaveCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~DHTAutoSaveCommand();

View File

@ -43,7 +43,8 @@
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) {}
DHTBucketRefreshCommand::~DHTBucketRefreshCommand() {}

View File

@ -52,7 +52,7 @@ private:
SharedHandle<DHTTaskFactory> _taskFactory;
public:
DHTBucketRefreshCommand(int32_t cuid, DownloadEngine* e, time_t interval);
DHTBucketRefreshCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~DHTBucketRefreshCommand();

View File

@ -56,7 +56,7 @@
namespace aria2 {
DHTEntryPointNameResolveCommand::DHTEntryPointNameResolveCommand
(int32_t cuid, DownloadEngine* e,
(cuid_t cuid, DownloadEngine* e,
const std::vector<std::pair<std::string, uint16_t> >& entryPoints):
Command(cuid),
_e(e),

View File

@ -89,7 +89,7 @@ private:
public:
DHTEntryPointNameResolveCommand
(int32_t cuid, DownloadEngine* e,
(cuid_t cuid, DownloadEngine* e,
const std::vector<std::pair<std:: string, uint16_t> >& entryPoints);
virtual ~DHTEntryPointNameResolveCommand();

View File

@ -50,7 +50,7 @@
namespace aria2 {
DHTGetPeersCommand::DHTGetPeersCommand(int32_t cuid,
DHTGetPeersCommand::DHTGetPeersCommand(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e):
Command(cuid),

View File

@ -74,7 +74,7 @@ private:
Time _lastGetPeerTime;
public:
DHTGetPeersCommand(int32_t cuid, RequestGroup* requestGroup,
DHTGetPeersCommand(cuid_t cuid, RequestGroup* requestGroup,
DownloadEngine* e);
virtual ~DHTGetPeersCommand();

View File

@ -49,7 +49,7 @@
namespace aria2 {
DHTInteractionCommand::DHTInteractionCommand(int32_t cuid, DownloadEngine* e):
DHTInteractionCommand::DHTInteractionCommand(cuid_t cuid, DownloadEngine* e):
Command(cuid),
_e(e) {}

View File

@ -56,7 +56,7 @@ private:
SharedHandle<SocketCore> _readCheckSocket;
public:
DHTInteractionCommand(int32_t cuid, DownloadEngine* e);
DHTInteractionCommand(cuid_t cuid, DownloadEngine* e);
virtual ~DHTInteractionCommand();

View File

@ -43,7 +43,8 @@
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) {}
DHTPeerAnnounceCommand::~DHTPeerAnnounceCommand() {}

View File

@ -46,7 +46,7 @@ class DHTPeerAnnounceCommand:public TimeBasedCommand {
private:
SharedHandle<DHTPeerAnnounceStorage> _peerAnnounceStorage;
public:
DHTPeerAnnounceCommand(int32_t cuid, DownloadEngine* e, time_t interval);
DHTPeerAnnounceCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~DHTPeerAnnounceCommand();

View File

@ -43,7 +43,7 @@
namespace aria2 {
DHTTokenUpdateCommand::DHTTokenUpdateCommand(int32_t cuid,
DHTTokenUpdateCommand::DHTTokenUpdateCommand(cuid_t cuid,
DownloadEngine* e,
time_t interval):
TimeBasedCommand(cuid, e, interval) {}

View File

@ -46,7 +46,7 @@ class DHTTokenUpdateCommand:public TimeBasedCommand {
private:
SharedHandle<DHTTokenTracker> _tokenTracker;
public:
DHTTokenUpdateCommand(int32_t cuid, DownloadEngine* e, time_t interval);
DHTTokenUpdateCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~DHTTokenUpdateCommand();

View File

@ -40,6 +40,7 @@
#include <limits.h>
#include "TimeA2.h"
#include "Command.h"
namespace aria2 {
@ -97,7 +98,7 @@ public:
class DefaultBtInteractive : public BtInteractive {
private:
int32_t cuid;
cuid_t cuid;
SharedHandle<DownloadContext> _downloadContext;
@ -188,7 +189,8 @@ public:
virtual size_t countOutstandingRequest();
void setCuid(int32_t cuid) {
void setCuid(cuid_t cuid)
{
this->cuid = cuid;
}

View File

@ -140,10 +140,10 @@ void DefaultBtMessageDispatcher::doCancelSendingPieceAction
class AbortOutstandingRequest {
private:
SharedHandle<Piece> _piece;
int32_t _cuid;
cuid_t _cuid;
Logger* _logger;
public:
AbortOutstandingRequest(const SharedHandle<Piece>& piece, int32_t cuid):
AbortOutstandingRequest(const SharedHandle<Piece>& piece, cuid_t cuid):
_piece(piece),
_cuid(cuid),
_logger(LogFactory::getInstance()) {}
@ -185,12 +185,12 @@ void DefaultBtMessageDispatcher::doAbortOutstandingRequestAction
class ProcessChokedRequestSlot {
private:
int32_t _cuid;
cuid_t _cuid;
SharedHandle<Peer> _peer;
SharedHandle<PieceStorage> _pieceStorage;
Logger* _logger;
public:
ProcessChokedRequestSlot(int32_t cuid,
ProcessChokedRequestSlot(cuid_t cuid,
const SharedHandle<Peer>& peer,
const SharedHandle<PieceStorage>& pieceStorage):
_cuid(cuid),
@ -252,7 +252,7 @@ void DefaultBtMessageDispatcher::doChokingAction()
class ProcessStaleRequestSlot {
private:
int32_t _cuid;
cuid_t _cuid;
SharedHandle<Peer> _peer;
SharedHandle<PieceStorage> _pieceStorage;
BtMessageDispatcher* _messageDispatcher;
@ -260,7 +260,7 @@ private:
time_t _requestTimeout;
Logger* _logger;
public:
ProcessStaleRequestSlot(int32_t cuid, const SharedHandle<Peer>& peer,
ProcessStaleRequestSlot(cuid_t cuid, const SharedHandle<Peer>& peer,
const SharedHandle<PieceStorage>& pieceStorage,
BtMessageDispatcher* dispatcher,
const WeakHandle<BtMessageFactory>& factory,

View File

@ -40,6 +40,7 @@
#include <deque>
#include "a2time.h"
#include "Command.h"
namespace aria2 {
@ -55,7 +56,7 @@ class RequestGroupMan;
class DefaultBtMessageDispatcher : public BtMessageDispatcher {
private:
int32_t cuid;
cuid_t cuid;
std::deque<SharedHandle<BtMessage> > messageQueue;
std::deque<RequestSlot> requestSlots;
SharedHandle<DownloadContext> _downloadContext;
@ -133,7 +134,8 @@ public:
void setRequestGroupMan(const WeakHandle<RequestGroupMan>& rgman);
void setCuid(int32_t cuid) {
void setCuid(cuid_t cuid)
{
this->cuid = cuid;
}

View File

@ -36,6 +36,7 @@
#define _D_DEFAULT_BT_MESSAGE_FACTORY_H_
#include "BtMessageFactory.h"
#include "Command.h"
namespace aria2 {
@ -55,7 +56,7 @@ class DHTTaskFactory;
class DefaultBtMessageFactory : public BtMessageFactory {
private:
int32_t cuid;
cuid_t cuid;
SharedHandle<DownloadContext> _downloadContext;
SharedHandle<PieceStorage> _pieceStorage;
SharedHandle<PeerStorage> _peerStorage;
@ -142,7 +143,8 @@ public:
void setPeerStorage(const SharedHandle<PeerStorage>& peerStorage);
void setCuid(int32_t cuid) {
void setCuid(cuid_t cuid)
{
this->cuid = cuid;
}

View File

@ -36,6 +36,7 @@
#define _D_DEFAULT_BT_MESSAGE_RECEIVER_H_
#include "BtMessageReceiver.h"
#include "Command.h"
namespace aria2 {
@ -48,7 +49,7 @@ class Logger;
class DefaultBtMessageReceiver : public BtMessageReceiver {
private:
int32_t cuid;
cuid_t cuid;
bool handshakeSent;
SharedHandle<DownloadContext> _downloadContext;
SharedHandle<Peer> peer;
@ -69,11 +70,13 @@ public:
virtual SharedHandle<BtMessage> receiveMessage();
void setCuid(int32_t cuid) {
void setCuid(cuid_t cuid)
{
this->cuid = cuid;
}
int32_t getCuid() const {
cuid_t getCuid() const
{
return cuid;
}

View File

@ -39,6 +39,8 @@
#include <deque>
#include "Command.h"
namespace aria2 {
class PieceStorage;
@ -50,7 +52,7 @@ class Logger;
class DefaultBtRequestFactory : public BtRequestFactory {
private:
int32_t cuid;
cuid_t cuid;
SharedHandle<PieceStorage> _pieceStorage;
SharedHandle<Peer> peer;
WeakHandle<BtMessageDispatcher> dispatcher;
@ -91,7 +93,7 @@ public:
return pieces;
}
void setCuid(int32_t cuid)
void setCuid(cuid_t cuid)
{
this->cuid = cuid;
}

View File

@ -535,7 +535,7 @@ size_t DefaultPieceStorage::getPieceLength(size_t 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);
haves.push_front(entry);
@ -543,7 +543,7 @@ void DefaultPieceStorage::advertisePiece(int32_t cuid, size_t index)
void
DefaultPieceStorage::getAdvertisedPieceIndexes(std::vector<size_t>& indexes,
int32_t myCuid,
cuid_t myCuid,
const Time& lastCheckTime)
{
for(std::deque<HaveEntry>::const_iterator itr = haves.begin(),

View File

@ -54,15 +54,15 @@ class PieceSelector;
class HaveEntry {
private:
int32_t cuid;
cuid_t cuid;
size_t index;
Time registeredTime;
public:
HaveEntry(int32_t cuid, size_t index):
HaveEntry(cuid_t cuid, size_t index):
cuid(cuid),
index(index) {}
int32_t getCuid() const { return cuid; }
cuid_t getCuid() const { return cuid; }
size_t getIndex() const { return index; }
@ -191,11 +191,11 @@ public:
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
getAdvertisedPieceIndexes(std::vector<size_t>& indexes,
int32_t myCuid, const Time& lastCheckTime);
cuid_t myCuid, const Time& lastCheckTime);
virtual void removeAdvertisedPiece(time_t elapsed);

View File

@ -67,7 +67,7 @@ namespace aria2 {
static const size_t BUFSIZE = 16*1024;
DownloadCommand::DownloadCommand(int cuid,
DownloadCommand::DownloadCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -76,7 +76,7 @@ protected:
virtual bool prepareForNextSegment();
public:
DownloadCommand(int cuid,
DownloadCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -49,7 +49,7 @@
namespace aria2 {
FileAllocationCommand::FileAllocationCommand
(int cuid, RequestGroup* requestGroup, DownloadEngine* e,
(cuid_t cuid, RequestGroup* requestGroup, DownloadEngine* e,
const SharedHandle<FileAllocationEntry>& fileAllocationEntry):
RealtimeCommand(cuid, requestGroup, e),
_fileAllocationEntry(fileAllocationEntry) {}

View File

@ -48,7 +48,7 @@ private:
SharedHandle<FileAllocationEntry> _fileAllocationEntry;
Time _timer;
public:
FileAllocationCommand(int cuid, RequestGroup* requestGroup,
FileAllocationCommand(cuid_t cuid, RequestGroup* requestGroup,
DownloadEngine* e,
const SharedHandle<FileAllocationEntry>& fileAllocationEntry);

View File

@ -42,7 +42,7 @@
namespace aria2 {
FileAllocationDispatcherCommand::FileAllocationDispatcherCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<FileAllocationMan>& fileAllocMan,
DownloadEngine* e):SequentialDispatcherCommand<FileAllocationEntry>
(cuid, fileAllocMan, e) {}
@ -50,7 +50,7 @@ FileAllocationDispatcherCommand::FileAllocationDispatcherCommand
Command* FileAllocationDispatcherCommand::createCommand
(const SharedHandle<FileAllocationEntry>& entry)
{
int32_t newCUID = _e->newCUID();
cuid_t newCUID = _e->newCUID();
logger->info(MSG_FILE_ALLOCATION_DISPATCH, newCUID);
FileAllocationCommand* command =
new FileAllocationCommand(newCUID, entry->getRequestGroup(), _e, entry);

View File

@ -46,7 +46,7 @@ class FileAllocationDispatcherCommand :
public SequentialDispatcherCommand<FileAllocationEntry> {
public:
FileAllocationDispatcherCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<FileAllocationMan>& fileAllocMan,
DownloadEngine* e);
protected:

View File

@ -44,7 +44,7 @@
namespace aria2 {
FillRequestGroupCommand::FillRequestGroupCommand(int32_t cuid,
FillRequestGroupCommand::FillRequestGroupCommand(cuid_t cuid,
DownloadEngine* e,
time_t interval):
Command(cuid),

View File

@ -50,7 +50,7 @@ private:
time_t _interval;
Time _checkPoint;
public:
FillRequestGroupCommand(int32_t cuid, DownloadEngine* e, time_t interval);
FillRequestGroupCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~FillRequestGroupCommand();

View File

@ -62,7 +62,7 @@ const std::string FtpConnection::A("A");
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<AuthConfig>& authConfig,
const Option* op):

View File

@ -43,6 +43,7 @@
#include "SharedHandle.h"
#include "TimeA2.h"
#include "SocketBuffer.h"
#include "Command.h"
namespace aria2 {
@ -55,7 +56,7 @@ class AuthConfig;
class FtpConnection {
private:
int32_t cuid;
cuid_t cuid;
SharedHandle<SocketCore> socket;
SharedHandle<Request> req;
@ -82,7 +83,7 @@ private:
//prepare for large banners
static const size_t MAX_RECV_BUFFER = 65536;
public:
FtpConnection(int32_t cuid, const SharedHandle<SocketCore>& socket,
FtpConnection(cuid_t cuid, const SharedHandle<SocketCore>& socket,
const SharedHandle<Request>& req,
const SharedHandle<AuthConfig>& authConfig,
const Option* op);

View File

@ -48,7 +48,7 @@
namespace aria2 {
FtpDownloadCommand::FtpDownloadCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -49,7 +49,7 @@ private:
protected:
virtual bool prepareForNextSegment();
public:
FtpDownloadCommand(int cuid,
FtpDownloadCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -52,7 +52,7 @@
namespace aria2 {
FtpFinishDownloadCommand::FtpFinishDownloadCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -49,7 +49,7 @@ protected:
virtual bool executeInternal();
public:
FtpFinishDownloadCommand(int cuid,
FtpFinishDownloadCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -55,7 +55,7 @@
namespace aria2 {
FtpInitiateConnectionCommand::FtpInitiateConnectionCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -46,7 +46,7 @@ protected:
const std::vector<std::string>& resolvedAddresses,
const SharedHandle<Request>& proxyRequest);
public:
FtpInitiateConnectionCommand(int cuid, const SharedHandle<Request>& req,
FtpInitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup, DownloadEngine* e);

View File

@ -69,7 +69,7 @@
namespace aria2 {
FtpNegotiationCommand::FtpNegotiationCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -126,7 +126,7 @@ private:
protected:
virtual bool executeInternal();
public:
FtpNegotiationCommand(int32_t cuid,
FtpNegotiationCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -41,7 +41,7 @@
namespace aria2 {
FtpTunnelRequestCommand::FtpTunnelRequestCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -43,7 +43,7 @@ class SocketCore;
class FtpTunnelRequestCommand : public AbstractProxyRequestCommand {
public:
FtpTunnelRequestCommand(int cuid,
FtpTunnelRequestCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -44,7 +44,7 @@
namespace aria2 {
FtpTunnelResponseCommand::FtpTunnelResponseCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -43,7 +43,7 @@ class SocketCore;
class FtpTunnelResponseCommand : public AbstractProxyResponseCommand {
public:
FtpTunnelResponseCommand(int cuid,
FtpTunnelResponseCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -41,7 +41,7 @@
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) {}
HaveEraseCommand::~HaveEraseCommand() {}

View File

@ -42,7 +42,7 @@ namespace aria2 {
class HaveEraseCommand : public TimeBasedCommand
{
public:
HaveEraseCommand(int32_t cuid, DownloadEngine* e, time_t interval);
HaveEraseCommand(cuid_t cuid, DownloadEngine* e, time_t interval);
virtual ~HaveEraseCommand();

View File

@ -65,7 +65,7 @@ HttpRequestEntry::HttpRequestEntry
HttpRequestEntry::~HttpRequestEntry() {}
HttpConnection::HttpConnection(int32_t cuid,
HttpConnection::HttpConnection(cuid_t cuid,
const SocketHandle& socket,
const Option* op):
cuid(cuid), socket(socket),

View File

@ -42,6 +42,7 @@
#include "SharedHandle.h"
#include "SocketBuffer.h"
#include "Command.h"
namespace aria2 {
@ -78,7 +79,7 @@ typedef std::deque<HttpRequestEntryHandle> HttpRequestEntries;
class HttpConnection {
private:
int32_t cuid;
cuid_t cuid;
SharedHandle<SocketCore> socket;
SocketBuffer _socketBuffer;
const Option* option;
@ -88,7 +89,7 @@ private:
std::string eraseConfidentialInfo(const std::string& request);
public:
HttpConnection(int32_t cuid,
HttpConnection(cuid_t cuid,
const SharedHandle<SocketCore>& socket,
const Option* op);

View File

@ -52,7 +52,7 @@
namespace aria2 {
HttpDownloadCommand::HttpDownloadCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -49,7 +49,7 @@ private:
protected:
virtual bool prepareForNextSegment();
public:
HttpDownloadCommand(int cuid,
HttpDownloadCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -52,7 +52,7 @@
namespace aria2 {
HttpInitiateConnectionCommand::HttpInitiateConnectionCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -46,7 +46,7 @@ protected:
const std::vector<std::string>& resolvedAddresses,
const SharedHandle<Request>& proxyRequest);
public:
HttpInitiateConnectionCommand(int cuid, const SharedHandle<Request>& req,
HttpInitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,
DownloadEngine* e);

View File

@ -47,7 +47,7 @@
namespace aria2 {
HttpListenCommand::HttpListenCommand(int32_t cuid, DownloadEngine* e):
HttpListenCommand::HttpListenCommand(cuid_t cuid, DownloadEngine* e):
Command(cuid),_e(e) {}
HttpListenCommand::~HttpListenCommand()

View File

@ -48,7 +48,7 @@ private:
DownloadEngine* _e;
SharedHandle<SocketCore> _serverSocket;
public:
HttpListenCommand(int32_t cuid, DownloadEngine* e);
HttpListenCommand(cuid_t cuid, DownloadEngine* e);
virtual ~HttpListenCommand();

View File

@ -41,7 +41,7 @@
namespace aria2 {
HttpProxyRequestCommand::HttpProxyRequestCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -43,7 +43,7 @@ class SocketCore;
class HttpProxyRequestCommand : public AbstractProxyRequestCommand {
public:
HttpProxyRequestCommand(int cuid,
HttpProxyRequestCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -44,7 +44,7 @@
namespace aria2 {
HttpProxyResponseCommand::HttpProxyResponseCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -43,7 +43,7 @@ class SocketCore;
class HttpProxyResponseCommand : public AbstractProxyResponseCommand {
public:
HttpProxyResponseCommand(int cuid,
HttpProxyResponseCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -57,7 +57,7 @@
namespace aria2 {
HttpRequestCommand::HttpRequestCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -54,7 +54,7 @@ private:
protected:
virtual bool executeInternal();
public:
HttpRequestCommand(int cuid,
HttpRequestCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -41,6 +41,7 @@
#include "SharedHandle.h"
#include "TimeA2.h"
#include "Command.h"
namespace aria2 {
@ -51,7 +52,7 @@ class Decoder;
class HttpResponse {
private:
int32_t cuid;
cuid_t cuid;
SharedHandle<HttpRequest> httpRequest;
SharedHandle<HttpHeader> httpHeader;
Logger* logger;
@ -116,7 +117,7 @@ public:
return httpRequest;
}
void setCuid(int32_t cuid)
void setCuid(cuid_t cuid)
{
this->cuid = cuid;
}

View File

@ -76,7 +76,7 @@ static SharedHandle<Decoder> getContentEncodingDecoder
(const SharedHandle<HttpResponse>& httpResponse);
HttpResponseCommand::HttpResponseCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -73,7 +73,7 @@ protected:
(const SharedHandle<HttpResponse>& httpResponse);
public:
HttpResponseCommand(int32_t cuid,
HttpResponseCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -55,7 +55,7 @@
namespace aria2 {
HttpServerBodyCommand::HttpServerBodyCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,
DownloadEngine* e,
const SharedHandle<SocketCore>& socket):

View File

@ -52,7 +52,7 @@ private:
SharedHandle<HttpServer> _httpServer;
Time _timeout;
public:
HttpServerBodyCommand(int32_t cuid,
HttpServerBodyCommand(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,
DownloadEngine* e,
const SharedHandle<SocketCore>& socket);

View File

@ -51,7 +51,7 @@
namespace aria2 {
HttpServerCommand::HttpServerCommand(int32_t cuid, DownloadEngine* e,
HttpServerCommand::HttpServerCommand(cuid_t cuid, DownloadEngine* e,
const SharedHandle<SocketCore>& socket):
Command(cuid),
_e(e),
@ -69,7 +69,7 @@ HttpServerCommand::HttpServerCommand(int32_t cuid, DownloadEngine* e,
#endif // !HAVE_LIBZ
}
HttpServerCommand::HttpServerCommand(int32_t cuid,
HttpServerCommand::HttpServerCommand(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,
DownloadEngine* e,
const SharedHandle<SocketCore>& socket):

View File

@ -52,10 +52,10 @@ private:
SharedHandle<HttpServer> _httpServer;
Time _timeout;
public:
HttpServerCommand(int32_t cuid, DownloadEngine* e,
HttpServerCommand(cuid_t cuid, DownloadEngine* e,
const SharedHandle<SocketCore>& socket);
HttpServerCommand(int32_t cuid,
HttpServerCommand(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,
DownloadEngine* e,
const SharedHandle<SocketCore>& socket);

View File

@ -46,7 +46,7 @@
namespace aria2 {
HttpServerResponseCommand::HttpServerResponseCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,
DownloadEngine* e,
const SharedHandle<SocketCore>& socket):

View File

@ -52,7 +52,7 @@ private:
SharedHandle<HttpServer> _httpServer;
Time _timeout;
public:
HttpServerResponseCommand(int32_t cuid,
HttpServerResponseCommand(cuid_t cuid,
const SharedHandle<HttpServer>& httpServer,
DownloadEngine* e,
const SharedHandle<SocketCore>& socket);

View File

@ -58,7 +58,7 @@
namespace aria2 {
HttpSkipResponseCommand::HttpSkipResponseCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -61,7 +61,7 @@ private:
protected:
virtual bool executeInternal();
public:
HttpSkipResponseCommand(int cuid,
HttpSkipResponseCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -52,7 +52,7 @@
namespace aria2 {
InitiateConnectionCommand::InitiateConnectionCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -60,7 +60,7 @@ protected:
const std::vector<std::string>& resolvedAddresses,
const SharedHandle<Request>& proxyRequest) = 0;
public:
InitiateConnectionCommand(int cuid, const SharedHandle<Request>& req,
InitiateConnectionCommand(cuid_t cuid, const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,
DownloadEngine* e);

View File

@ -49,7 +49,7 @@ namespace aria2 {
Command*
InitiateConnectionCommandFactory::createInitiateConnectionCommand
(int32_t cuid,
(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -37,19 +37,19 @@
#include "common.h"
#include "SharedHandle.h"
#include "Command.h"
namespace aria2 {
class Request;
class RequestGroup;
class DownloadEngine;
class Command;
class FileEntry;
class InitiateConnectionCommandFactory {
public:
static Command*
createInitiateConnectionCommand(int32_t cuid,
createInitiateConnectionCommand(cuid_t cuid,
const SharedHandle<Request>& req,
const SharedHandle<FileEntry>& fileEntry,
RequestGroup* requestGroup,

View File

@ -57,7 +57,7 @@
namespace aria2 {
InitiatorMSEHandshakeCommand::InitiatorMSEHandshakeCommand
(int32_t cuid,
(cuid_t cuid,
RequestGroup* requestGroup,
const SharedHandle<Peer>& p,
DownloadEngine* e,

View File

@ -77,7 +77,7 @@ protected:
virtual bool exitBeforeExecute();
public:
InitiatorMSEHandshakeCommand
(int32_t cuid,
(cuid_t cuid,
RequestGroup* requestGroup,
const SharedHandle<Peer>& peer,
DownloadEngine* e,

View File

@ -44,7 +44,7 @@
namespace aria2 {
LpdDispatchMessageCommand::LpdDispatchMessageCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<LpdMessageDispatcher>& dispatcher,
DownloadEngine* e):
Command(cuid),

View File

@ -52,7 +52,7 @@ private:
SharedHandle<BtRuntime> _btRuntime;
public:
LpdDispatchMessageCommand
(int cuid,
(cuid_t cuid,
const SharedHandle<LpdMessageDispatcher>& dispatcher,
DownloadEngine* e);

Some files were not shown because too many files have changed in this diff Show More