/* */ #ifndef D_SHARE_RATIO_SEED_CRITERIA_H #define D_SHARE_RATIO_SEED_CRITERIA_H #include "SeedCriteria.h" #include namespace aria2 { class DownloadContext; class BtRuntime; class PieceStorage; class ShareRatioSeedCriteria : public SeedCriteria { private: double ratio_; std::shared_ptr downloadContext_; std::shared_ptr btRuntime_; std::shared_ptr pieceStorage_; public: ShareRatioSeedCriteria( double ratio, const std::shared_ptr& downloadContext); virtual ~ShareRatioSeedCriteria(); virtual void reset() CXX11_OVERRIDE; virtual bool evaluate() CXX11_OVERRIDE; void setRatio(double ratio) { ratio_ = ratio; } double getRatio() const { return ratio_; } void setBtRuntime(const std::shared_ptr& btRuntime); void setPieceStorage(const std::shared_ptr& pieceStorage); }; } // namespace aria2 #endif // D_SHARE_RATIO_SEED_CRITERIA_H