/* */ #ifndef D_SHARE_RATIO_SEED_CRITERIA_H #define D_SHARE_RATIO_SEED_CRITERIA_H #include "SeedCriteria.h" namespace aria2 { class DownloadContext; class PeerStorage; class PieceStorage; class ShareRatioSeedCriteria : public SeedCriteria { private: double ratio_; SharedHandle downloadContext_; SharedHandle peerStorage_; SharedHandle pieceStorage_; public: ShareRatioSeedCriteria (double ratio, const SharedHandle& downloadContext); virtual ~ShareRatioSeedCriteria(); virtual void reset(); virtual bool evaluate(); void setRatio(double ratio) { ratio_ = ratio; } double getRatio() const { return ratio_; } void setPeerStorage(const SharedHandle& peerStorage); void setPieceStorage(const SharedHandle& pieceStorage); }; } // namespace aria2 #endif // D_SHARE_RATIO_SEED_CRITERIA_H