#ifndef RIPPLE_IVALIDATIONS_H #define RIPPLE_IVALIDATIONS_H //#include //#include //#include //#include "SerializedValidation.h" //#include "JobQueue.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 { public: static IValidations* New (); virtual ~IValidations () { } virtual bool addValidation (SerializedValidation::ref, const std::string& source) = 0; virtual ValidationSet getValidations (const uint256& ledger) = 0; virtual void getValidationCount (const uint256& ledger, bool currentOnly, int& trusted, int& untrusted) = 0; virtual void getValidationTypes (const uint256& ledger, int& full, int& partial) = 0; virtual int getTrustedValidationCount (const uint256& ledger) = 0; virtual int getNodesAfter (const uint256& 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