diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-22 01:10:38 +0900 |
| commit | 07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch) | |
| tree | 2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/ActivePeerConnectionCommand.h | |
| parent | 126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff) | |
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/ActivePeerConnectionCommand.h')
| -rw-r--r-- | src/ActivePeerConnectionCommand.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/ActivePeerConnectionCommand.h b/src/ActivePeerConnectionCommand.h index 872eec58..29730907 100644 --- a/src/ActivePeerConnectionCommand.h +++ b/src/ActivePeerConnectionCommand.h @@ -36,7 +36,9 @@ #define D_ACTIVE_PEER_CONNECTION_COMMAND_H #include "Command.h" -#include "SharedHandle.h" + +#include <memory> + #include "TimerA2.h" namespace aria2 { @@ -52,10 +54,10 @@ class BtAnnounce; class ActivePeerConnectionCommand : public Command { private: RequestGroup* requestGroup_; - SharedHandle<BtRuntime> btRuntime_; - SharedHandle<PieceStorage> pieceStorage_; - SharedHandle<PeerStorage> peerStorage_; - SharedHandle<BtAnnounce> btAnnounce_; + std::shared_ptr<BtRuntime> btRuntime_; + std::shared_ptr<PieceStorage> pieceStorage_; + std::shared_ptr<PeerStorage> peerStorage_; + std::shared_ptr<BtAnnounce> btAnnounce_; time_t interval_; // UNIT: sec DownloadEngine* e_; @@ -78,13 +80,13 @@ public: numNewConnection_ = numNewConnection; } - void setBtRuntime(const SharedHandle<BtRuntime>& btRuntime); + void setBtRuntime(const std::shared_ptr<BtRuntime>& btRuntime); - void setPieceStorage(const SharedHandle<PieceStorage>& pieceStorage); + void setPieceStorage(const std::shared_ptr<PieceStorage>& pieceStorage); - void setPeerStorage(const SharedHandle<PeerStorage>& peerStorage); + void setPeerStorage(const std::shared_ptr<PeerStorage>& peerStorage); - void setBtAnnounce(const SharedHandle<BtAnnounce>& btAnnounce); + void setBtAnnounce(const std::shared_ptr<BtAnnounce>& btAnnounce); }; } // namespace aria2 |
