diff options
author | Kirill Volinsky <Mataes2007@gmail.com> | 2018-07-27 10:35:17 +0300 |
---|---|---|
committer | Kirill Volinsky <Mataes2007@gmail.com> | 2018-07-27 10:35:17 +0300 |
commit | 29d414e39c3aa15f4877e597c1cac2d83b199078 (patch) | |
tree | b54b2ce556715727bd21c8e5dd8852b925a7bc10 /plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.h | |
parent | 24cc466028da7e224c12babfbfe425a694052be9 (diff) |
CurrencyRates: quotes replaced to currencyrates
Diffstat (limited to 'plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.h')
-rw-r--r-- | plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.h b/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.h new file mode 100644 index 0000000000..66658c5c99 --- /dev/null +++ b/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.h @@ -0,0 +1,29 @@ +#pragma once + +#define DB_STR_FROM_ID "FromID" +#define DB_STR_TO_ID "ToID" +#define DB_STR_FROM_DESCRIPTION "FromDesc" +#define DB_STR_TO_DESCRIPTION "ToDesc" + + +class CCurrencyRatesProviderCurrencyConverter : public CCurrencyRatesProviderBase +{ +public: + using TRateInfo = std::pair<CCurrencyRate, CCurrencyRate>; + +public: + CCurrencyRatesProviderCurrencyConverter(); + ~CCurrencyRatesProviderCurrencyConverter(); + + double Convert(double dAmount, const CCurrencyRate& from, const CCurrencyRate& to)const; + size_t GetWatchedRateCount()const; + bool GetWatchedRateInfo(size_t nIndex, TRateInfo& rRateInfo); + bool WatchForRate(const TRateInfo& ri, bool bWatch); + MCONTACT GetContactByID(const tstring& rsFromID, const tstring& rsToID)const; + +private: + virtual void Accept(CCurrencyRatesProviderVisitor& visitor)const override; + virtual void ShowPropertyPage(WPARAM wp, OPTIONSDIALOGPAGE& odp)override; + virtual void RefreshCurrencyRates(TContracts& anContacts)override; +}; + |