diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-11 11:48:22 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-11 11:48:22 +0000 |
| commit | 812563bb6d5d449de0a606e8c70206b5ccaec99f (patch) | |
| tree | f5ad72d8e31af793ef36872eabc0815ccce4266d /src/BtNotInterestedMessage.cc | |
| parent | a68b29a31abdf69c34b36a9c31d834a8bb71852e (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/BtNotInterestedMessage.cc')
| -rw-r--r-- | src/BtNotInterestedMessage.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/BtNotInterestedMessage.cc b/src/BtNotInterestedMessage.cc index 37c6ab5b..c0adb3a3 100644 --- a/src/BtNotInterestedMessage.cc +++ b/src/BtNotInterestedMessage.cc @@ -40,6 +40,8 @@ namespace aria2 { const std::string BtNotInterestedMessage::NAME("not interested"); +BtNotInterestedMessage::BtNotInterestedMessage():ZeroBtMessage(ID, NAME) {} + SharedHandle<BtNotInterestedMessage> BtNotInterestedMessage::create (const unsigned char* data, size_t dataLength) { @@ -48,22 +50,22 @@ SharedHandle<BtNotInterestedMessage> BtNotInterestedMessage::create void BtNotInterestedMessage::doReceivedAction() { - if(_metadataGetMode) { + if(isMetadataGetMode()) { return; } - peer->peerInterested(false); - if(!peer->amChoking()) { + getPeer()->peerInterested(false); + if(!getPeer()->amChoking()) { _peerStorage->executeChoke(); } } bool BtNotInterestedMessage::sendPredicate() const { - return peer->amInterested(); + return getPeer()->amInterested(); } void BtNotInterestedMessage::onSendComplete() { - peer->amInterested(false); + getPeer()->amInterested(false); } void BtNotInterestedMessage::setPeerStorage |
