136 #ifndef OPENTXS_CORE_CRON_OTCRON_HPP
137 #define OPENTXS_CORE_CRON_OTCRON_HPP
139 #include "../OTContract.hpp"
140 #include "../util/StringUtils.hpp"
141 #include "../util/Assert.hpp"
184 static int32_t __trans_refill_amount;
187 static int32_t __cron_ms_between_process;
191 static int32_t __cron_max_items_per_nym;
198 return __cron_ms_between_process;
202 __cron_ms_between_process = lMS;
207 return __trans_refill_amount;
211 __trans_refill_amount = nAmount;
215 return __cron_max_items_per_nym;
219 __cron_max_items_per_nym = nMax;
223 return m_bIsActivated;
228 return m_bIsActivated =
true;
243 EXPORT mapOfCronItems::iterator
FindItemOnMap(int64_t lTransactionNum);
245 int64_t lTransactionNum);
255 const int64_t& lScale);
262 int32_t& nOfferCount);
291 m_SERVER_ID = SERVER_ID;
301 m_pServerNym = pServerNym;
313 OTCron(
const char* szFilename);
333 #endif // OPENTXS_CORE_CRON_OTCRON_HPP
bool RemoveMarket(const OTIdentifier &MARKET_ID)
OTMarket * GetOrCreateMarket(const OTIdentifier &ASSET_ID, const OTIdentifier &CURRENCY_ID, const int64_t &lScale)
EXPORT void AddTransactionNumber(const int64_t &lTransactionNum)
static void SetCronRefillAmount(int32_t nAmount)
int64_t GetNextTransactionNumber()
virtual void UpdateContents()
void SetServerID(const OTIdentifier &SERVER_ID)
std::map< std::string, OTMarket * > mapOfMarkets
EXPORT bool AddCronItem(OTCronItem &theItem, OTPseudonym *pActivator, bool bSaveReceipt, time64_t tDateAdded)
virtual bool SaveContractWallet(std::ofstream &ofs) const
EXPORT OTCronItem * GetItemByOfficialNum(int64_t lTransactionNum)
static void SetCronMaxItemsPerNym(int32_t nMax)
const OTIdentifier & GetServerID() const
std::multimap< time64_t, OTCronItem * > multimapOfCronItems
static int32_t GetCronMaxItemsPerNym()
EXPORT OTCronItem * GetItemByValidOpeningNum(int64_t lOpeningNum)
EXPORT mapOfCronItems::iterator FindItemOnMap(int64_t lTransactionNum)
EXPORT multimapOfCronItems::iterator FindItemOnMultimap(int64_t lTransactionNum)
std::list< int64_t > listOfLongNumbers
EXPORT void ProcessCronItems()
bool AddMarket(OTMarket &theMarket, bool bSaveMarketFile=true)
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
static void SetCronMsBetweenProcess(int32_t lMS)
EXPORT int32_t GetTransactionCount() const
OTPseudonym * GetServerNym() const
static int32_t GetCronRefillAmount()
void SetServerNym(OTPseudonym *pServerNym)
EXPORT bool GetMarketList(OTASCIIArmor &ascOutput, int32_t &nMarketCount)
EXPORT bool GetNym_OfferList(OTASCIIArmor &ascOutput, const OTIdentifier &NYM_ID, int32_t &nOfferCount)
EXPORT OTMarket * GetMarket(const OTIdentifier &MARKET_ID)
static int32_t GetCronMsBetweenProcess()
std::map< int64_t, OTCronItem * > mapOfCronItems
EXPORT bool RemoveCronItem(int64_t lTransactionNum, OTPseudonym &theRemover)