summaryrefslogtreecommitdiff
path: root/src/UnknownLengthPieceStorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/UnknownLengthPieceStorage.h')
-rw-r--r--src/UnknownLengthPieceStorage.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/UnknownLengthPieceStorage.h b/src/UnknownLengthPieceStorage.h
index 00d79a45..3263870f 100644
--- a/src/UnknownLengthPieceStorage.h
+++ b/src/UnknownLengthPieceStorage.h
@@ -223,31 +223,23 @@ public:
virtual int32_t getPieceLength(size_t index) CXX11_OVERRIDE;
- /**
- * Adds piece index to advertise to other commands. They send have message
- * based on this information.
- */
- virtual void advertisePiece(cuid_t cuid, size_t index) CXX11_OVERRIDE {}
-
- /**
- * Returns piece index which is not advertised by the caller command and
- * newer than lastCheckTime.
- */
- virtual void
- getAdvertisedPieceIndexes(std::vector<size_t>& indexes, cuid_t myCuid,
- const Timer& lastCheckTime) CXX11_OVERRIDE
+ virtual void advertisePiece(cuid_t cuid, size_t index,
+ Timer registeredTime) CXX11_OVERRIDE
{
}
/**
- * Removes have entry if specified seconds have elapsed since its
- * registration.
+ * indexes is filled with piece index which is not advertised by the
+ * caller command and newer than lastHaveIndex.
*/
- virtual void
- removeAdvertisedPiece(const std::chrono::seconds& elapsed) CXX11_OVERRIDE
+ virtual uint64_t
+ getAdvertisedPieceIndexes(std::vector<size_t>& indexes, cuid_t myCuid,
+ uint64_t lastHaveIndex) CXX11_OVERRIDE
{
}
+ virtual void removeAdvertisedPiece(const Timer& expiry) CXX11_OVERRIDE {}
+
/**
* Sets all bits in bitfield to 1.
*/