summaryrefslogtreecommitdiff
path: root/src/ActivePeerConnectionCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
commit07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch)
tree2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/ActivePeerConnectionCommand.h
parent126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff)
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/ActivePeerConnectionCommand.h')
-rw-r--r--src/ActivePeerConnectionCommand.h20
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