summaryrefslogtreecommitdiff
path: root/src/BtInterestedMessage.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-06-11 11:48:22 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-06-11 11:48:22 +0000
commit812563bb6d5d449de0a606e8c70206b5ccaec99f (patch)
treef5ad72d8e31af793ef36872eabc0815ccce4266d /src/BtInterestedMessage.cc
parenta68b29a31abdf69c34b36a9c31d834a8bb71852e (diff)
2010-06-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variable private. Added accessor funcs. * src/AbstractBtMessage.cc * src/AbstractBtMessage.h * src/BtAllowedFastMessage.cc * src/BtAllowedFastMessage.h * src/BtBitfieldMessage.cc * src/BtBitfieldMessage.h * src/BtCancelMessage.cc * src/BtCancelMessage.h * src/BtChokeMessage.cc * src/BtChokeMessage.h * src/BtExtendedMessage.cc * src/BtHaveAllMessage.cc * src/BtHaveAllMessage.h * src/BtHaveMessage.cc * src/BtHaveMessage.h * src/BtHaveNoneMessage.cc * src/BtHaveNoneMessage.h * src/BtInterestedMessage.cc * src/BtInterestedMessage.h * src/BtNotInterestedMessage.cc * src/BtNotInterestedMessage.h * src/BtPieceMessage.cc * src/BtPieceMessage.h * src/BtPortMessage.cc * src/BtPortMessage.h * src/BtRejectMessage.cc * src/BtRejectMessage.h * src/BtRequestMessage.cc * src/BtRequestMessage.h * src/BtUnchokeMessage.cc * src/BtUnchokeMessage.h * src/SimpleBtMessage.cc * src/SimpleBtMessage.h
Diffstat (limited to 'src/BtInterestedMessage.cc')
-rw-r--r--src/BtInterestedMessage.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/BtInterestedMessage.cc b/src/BtInterestedMessage.cc
index 3ef69cf1..f3308669 100644
--- a/src/BtInterestedMessage.cc
+++ b/src/BtInterestedMessage.cc
@@ -40,6 +40,8 @@ namespace aria2 {
const std::string BtInterestedMessage::NAME("interested");
+BtInterestedMessage::BtInterestedMessage():ZeroBtMessage(ID, NAME) {}
+
SharedHandle<BtInterestedMessage> BtInterestedMessage::create
(const unsigned char* data, size_t dataLength)
{
@@ -48,22 +50,22 @@ SharedHandle<BtInterestedMessage> BtInterestedMessage::create
void BtInterestedMessage::doReceivedAction()
{
- if(_metadataGetMode) {
+ if(isMetadataGetMode()) {
return;
}
- peer->peerInterested(true);
- if(!peer->amChoking()) {
+ getPeer()->peerInterested(true);
+ if(!getPeer()->amChoking()) {
_peerStorage->executeChoke();
}
}
bool BtInterestedMessage::sendPredicate() const
{
- return !peer->amInterested();
+ return !getPeer()->amInterested();
}
void BtInterestedMessage::onSendComplete() {
- peer->amInterested(true);
+ getPeer()->amInterested(true);
}
void BtInterestedMessage::setPeerStorage