Jelajahi Sumber

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

	Use cuid_t type for cuid.
Tatsuhiro Tsujikawa 15 tahun lalu
induk
melakukan
bf5f559c5c
100 mengubah file dengan 146 tambahan dan 125 penghapusan
  1. 4 0
      ChangeLog
  2. 4 3
      src/AbstractBtMessage.h
  3. 1 1
      src/AbstractCommand.cc
  4. 1 1
      src/AbstractCommand.h
  5. 1 1
      src/AbstractProxyRequestCommand.cc
  6. 1 1
      src/AbstractProxyRequestCommand.h
  7. 1 1
      src/AbstractProxyResponseCommand.cc
  8. 1 1
      src/AbstractProxyResponseCommand.h
  9. 1 1
      src/ActivePeerConnectionCommand.cc
  10. 1 1
      src/ActivePeerConnectionCommand.h
  11. 1 1
      src/AutoSaveCommand.cc
  12. 1 1
      src/AutoSaveCommand.h
  13. 1 1
      src/BtStopDownloadCommand.cc
  14. 1 1
      src/BtStopDownloadCommand.h
  15. 1 1
      src/CheckIntegrityCommand.cc
  16. 1 1
      src/CheckIntegrityCommand.h
  17. 2 2
      src/CheckIntegrityDispatcherCommand.cc
  18. 1 1
      src/CheckIntegrityDispatcherCommand.h
  19. 1 1
      src/Command.h
  20. 1 1
      src/CreateRequestCommand.cc
  21. 1 1
      src/CreateRequestCommand.h
  22. 1 1
      src/DHTAutoSaveCommand.cc
  23. 1 1
      src/DHTAutoSaveCommand.h
  24. 2 1
      src/DHTBucketRefreshCommand.cc
  25. 1 1
      src/DHTBucketRefreshCommand.h
  26. 1 1
      src/DHTEntryPointNameResolveCommand.cc
  27. 1 1
      src/DHTEntryPointNameResolveCommand.h
  28. 1 1
      src/DHTGetPeersCommand.cc
  29. 1 1
      src/DHTGetPeersCommand.h
  30. 1 1
      src/DHTInteractionCommand.cc
  31. 1 1
      src/DHTInteractionCommand.h
  32. 2 1
      src/DHTPeerAnnounceCommand.cc
  33. 1 1
      src/DHTPeerAnnounceCommand.h
  34. 1 1
      src/DHTTokenUpdateCommand.cc
  35. 1 1
      src/DHTTokenUpdateCommand.h
  36. 4 2
      src/DefaultBtInteractive.h
  37. 6 6
      src/DefaultBtMessageDispatcher.cc
  38. 4 2
      src/DefaultBtMessageDispatcher.h
  39. 4 2
      src/DefaultBtMessageFactory.h
  40. 6 3
      src/DefaultBtMessageReceiver.h
  41. 4 2
      src/DefaultBtRequestFactory.h
  42. 2 2
      src/DefaultPieceStorage.cc
  43. 5 5
      src/DefaultPieceStorage.h
  44. 1 1
      src/DownloadCommand.cc
  45. 1 1
      src/DownloadCommand.h
  46. 1 1
      src/FileAllocationCommand.cc
  47. 1 1
      src/FileAllocationCommand.h
  48. 2 2
      src/FileAllocationDispatcherCommand.cc
  49. 1 1
      src/FileAllocationDispatcherCommand.h
  50. 1 1
      src/FillRequestGroupCommand.cc
  51. 1 1
      src/FillRequestGroupCommand.h
  52. 1 1
      src/FtpConnection.cc
  53. 3 2
      src/FtpConnection.h
  54. 1 1
      src/FtpDownloadCommand.cc
  55. 1 1
      src/FtpDownloadCommand.h
  56. 1 1
      src/FtpFinishDownloadCommand.cc
  57. 1 1
      src/FtpFinishDownloadCommand.h
  58. 1 1
      src/FtpInitiateConnectionCommand.cc
  59. 1 1
      src/FtpInitiateConnectionCommand.h
  60. 1 1
      src/FtpNegotiationCommand.cc
  61. 1 1
      src/FtpNegotiationCommand.h
  62. 1 1
      src/FtpTunnelRequestCommand.cc
  63. 1 1
      src/FtpTunnelRequestCommand.h
  64. 1 1
      src/FtpTunnelResponseCommand.cc
  65. 1 1
      src/FtpTunnelResponseCommand.h
  66. 1 1
      src/HaveEraseCommand.cc
  67. 1 1
      src/HaveEraseCommand.h
  68. 1 1
      src/HttpConnection.cc
  69. 3 2
      src/HttpConnection.h
  70. 1 1
      src/HttpDownloadCommand.cc
  71. 1 1
      src/HttpDownloadCommand.h
  72. 1 1
      src/HttpInitiateConnectionCommand.cc
  73. 1 1
      src/HttpInitiateConnectionCommand.h
  74. 1 1
      src/HttpListenCommand.cc
  75. 1 1
      src/HttpListenCommand.h
  76. 1 1
      src/HttpProxyRequestCommand.cc
  77. 1 1
      src/HttpProxyRequestCommand.h
  78. 1 1
      src/HttpProxyResponseCommand.cc
  79. 1 1
      src/HttpProxyResponseCommand.h
  80. 1 1
      src/HttpRequestCommand.cc
  81. 1 1
      src/HttpRequestCommand.h
  82. 3 2
      src/HttpResponse.h
  83. 1 1
      src/HttpResponseCommand.cc
  84. 1 1
      src/HttpResponseCommand.h
  85. 1 1
      src/HttpServerBodyCommand.cc
  86. 1 1
      src/HttpServerBodyCommand.h
  87. 2 2
      src/HttpServerCommand.cc
  88. 2 2
      src/HttpServerCommand.h
  89. 1 1
      src/HttpServerResponseCommand.cc
  90. 1 1
      src/HttpServerResponseCommand.h
  91. 1 1
      src/HttpSkipResponseCommand.cc
  92. 1 1
      src/HttpSkipResponseCommand.h
  93. 1 1
      src/InitiateConnectionCommand.cc
  94. 1 1
      src/InitiateConnectionCommand.h
  95. 1 1
      src/InitiateConnectionCommandFactory.cc
  96. 2 2
      src/InitiateConnectionCommandFactory.h
  97. 1 1
      src/InitiatorMSEHandshakeCommand.cc
  98. 1 1
      src/InitiatorMSEHandshakeCommand.h
  99. 1 1
      src/LpdDispatchMessageCommand.cc
  100. 1 1
      src/LpdDispatchMessageCommand.h

+ 4 - 0
ChangeLog

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

+ 4 - 3
src/AbstractBtMessage.h

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

+ 1 - 1
src/AbstractCommand.cc

@@ -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,

+ 1 - 1
src/AbstractCommand.h

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

+ 1 - 1
src/AbstractProxyRequestCommand.cc

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

+ 1 - 1
src/AbstractProxyRequestCommand.h

@@ -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,

+ 1 - 1
src/AbstractProxyResponseCommand.cc

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

+ 1 - 1
src/AbstractProxyResponseCommand.h

@@ -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,

+ 1 - 1
src/ActivePeerConnectionCommand.cc

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

+ 1 - 1
src/ActivePeerConnectionCommand.h

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

+ 1 - 1
src/AutoSaveCommand.cc

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

+ 1 - 1
src/AutoSaveCommand.h

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

+ 1 - 1
src/BtStopDownloadCommand.cc

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

+ 1 - 1
src/BtStopDownloadCommand.h

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

+ 1 - 1
src/CheckIntegrityCommand.cc

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

+ 1 - 1
src/CheckIntegrityCommand.h

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

+ 2 - 2
src/CheckIntegrityDispatcherCommand.cc

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

+ 1 - 1
src/CheckIntegrityDispatcherCommand.h

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

+ 1 - 1
src/Command.h

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

+ 1 - 1
src/CreateRequestCommand.cc

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

+ 1 - 1
src/CreateRequestCommand.h

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

+ 1 - 1
src/DHTAutoSaveCommand.cc

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

+ 1 - 1
src/DHTAutoSaveCommand.h

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

+ 2 - 1
src/DHTBucketRefreshCommand.cc

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

+ 1 - 1
src/DHTBucketRefreshCommand.h

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

+ 1 - 1
src/DHTEntryPointNameResolveCommand.cc

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

+ 1 - 1
src/DHTEntryPointNameResolveCommand.h

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

+ 1 - 1
src/DHTGetPeersCommand.cc

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

+ 1 - 1
src/DHTGetPeersCommand.h

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

+ 1 - 1
src/DHTInteractionCommand.cc

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

+ 1 - 1
src/DHTInteractionCommand.h

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

+ 2 - 1
src/DHTPeerAnnounceCommand.cc

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

+ 1 - 1
src/DHTPeerAnnounceCommand.h

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

+ 1 - 1
src/DHTTokenUpdateCommand.cc

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

+ 1 - 1
src/DHTTokenUpdateCommand.h

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

+ 4 - 2
src/DefaultBtInteractive.h

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

+ 6 - 6
src/DefaultBtMessageDispatcher.cc

@@ -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,

+ 4 - 2
src/DefaultBtMessageDispatcher.h

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

+ 4 - 2
src/DefaultBtMessageFactory.h

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

+ 6 - 3
src/DefaultBtMessageReceiver.h

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

+ 4 - 2
src/DefaultBtRequestFactory.h

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

+ 2 - 2
src/DefaultPieceStorage.cc

@@ -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(),

+ 5 - 5
src/DefaultPieceStorage.h

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

+ 1 - 1
src/DownloadCommand.cc

@@ -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,

+ 1 - 1
src/DownloadCommand.h

@@ -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,

+ 1 - 1
src/FileAllocationCommand.cc

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

+ 1 - 1
src/FileAllocationCommand.h

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

+ 2 - 2
src/FileAllocationDispatcherCommand.cc

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

+ 1 - 1
src/FileAllocationDispatcherCommand.h

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

+ 1 - 1
src/FillRequestGroupCommand.cc

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

+ 1 - 1
src/FillRequestGroupCommand.h

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

+ 1 - 1
src/FtpConnection.cc

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

+ 3 - 2
src/FtpConnection.h

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

+ 1 - 1
src/FtpDownloadCommand.cc

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

+ 1 - 1
src/FtpDownloadCommand.h

@@ -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,

+ 1 - 1
src/FtpFinishDownloadCommand.cc

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

+ 1 - 1
src/FtpFinishDownloadCommand.h

@@ -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,

+ 1 - 1
src/FtpInitiateConnectionCommand.cc

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

+ 1 - 1
src/FtpInitiateConnectionCommand.h

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

+ 1 - 1
src/FtpNegotiationCommand.cc

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

+ 1 - 1
src/FtpNegotiationCommand.h

@@ -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,

+ 1 - 1
src/FtpTunnelRequestCommand.cc

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

+ 1 - 1
src/FtpTunnelRequestCommand.h

@@ -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,

+ 1 - 1
src/FtpTunnelResponseCommand.cc

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

+ 1 - 1
src/FtpTunnelResponseCommand.h

@@ -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,

+ 1 - 1
src/HaveEraseCommand.cc

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

+ 1 - 1
src/HaveEraseCommand.h

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

+ 1 - 1
src/HttpConnection.cc

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

+ 3 - 2
src/HttpConnection.h

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

+ 1 - 1
src/HttpDownloadCommand.cc

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

+ 1 - 1
src/HttpDownloadCommand.h

@@ -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,

+ 1 - 1
src/HttpInitiateConnectionCommand.cc

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

+ 1 - 1
src/HttpInitiateConnectionCommand.h

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

+ 1 - 1
src/HttpListenCommand.cc

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

+ 1 - 1
src/HttpListenCommand.h

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

+ 1 - 1
src/HttpProxyRequestCommand.cc

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

+ 1 - 1
src/HttpProxyRequestCommand.h

@@ -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,

+ 1 - 1
src/HttpProxyResponseCommand.cc

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

+ 1 - 1
src/HttpProxyResponseCommand.h

@@ -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,

+ 1 - 1
src/HttpRequestCommand.cc

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

+ 1 - 1
src/HttpRequestCommand.h

@@ -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,

+ 3 - 2
src/HttpResponse.h

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

+ 1 - 1
src/HttpResponseCommand.cc

@@ -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,

+ 1 - 1
src/HttpResponseCommand.h

@@ -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,

+ 1 - 1
src/HttpServerBodyCommand.cc

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

+ 1 - 1
src/HttpServerBodyCommand.h

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

+ 2 - 2
src/HttpServerCommand.cc

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

+ 2 - 2
src/HttpServerCommand.h

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

+ 1 - 1
src/HttpServerResponseCommand.cc

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

+ 1 - 1
src/HttpServerResponseCommand.h

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

+ 1 - 1
src/HttpSkipResponseCommand.cc

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

+ 1 - 1
src/HttpSkipResponseCommand.h

@@ -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,

+ 1 - 1
src/InitiateConnectionCommand.cc

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

+ 1 - 1
src/InitiateConnectionCommand.h

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

+ 1 - 1
src/InitiateConnectionCommandFactory.cc

@@ -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,

+ 2 - 2
src/InitiateConnectionCommandFactory.h

@@ -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,

+ 1 - 1
src/InitiatorMSEHandshakeCommand.cc

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

+ 1 - 1
src/InitiatorMSEHandshakeCommand.h

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

+ 1 - 1
src/LpdDispatchMessageCommand.cc

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

+ 1 - 1
src/LpdDispatchMessageCommand.h

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

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini