//------------------------------------------------------------------------------ /* Copyright (c) 2011-2013, OpenCoin, Inc. */ //============================================================================== #ifndef RIPPLE_IVALIDATIONS_H #define RIPPLE_IVALIDATIONS_H // VFALCO TODO rename and move these typedefs into the IValidations interface typedef boost::unordered_map ValidationSet; typedef std::pair currentValidationCount; // nodes validating and highest node ID validating class IValidations : LeakChecked { public: static IValidations* New (); virtual ~IValidations () { } virtual bool addValidation (SerializedValidation::ref, const std::string& source) = 0; virtual ValidationSet getValidations (uint256 const& ledger) = 0; virtual void getValidationCount (uint256 const& ledger, bool currentOnly, int& trusted, int& untrusted) = 0; virtual void getValidationTypes (uint256 const& ledger, int& full, int& partial) = 0; virtual int getTrustedValidationCount (uint256 const& ledger) = 0; virtual int getNodesAfter (uint256 const& ledger) = 0; virtual int getLoadRatio (bool overLoaded) = 0; // VFALCO TODO make a typedef for this ugly return value! virtual boost::unordered_map getCurrentValidations ( uint256 currentLedger, uint256 previousLedger) = 0; virtual std::list getCurrentTrustedValidations () = 0; virtual void tune (int size, int age) = 0; virtual void flush () = 0; virtual void sweep () = 0; }; #endif