summaryrefslogtreecommitdiff
path: root/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/Quotes/src/QuotesProviderDukasCopy.cpp
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src/QuotesProviderDukasCopy.cpp')
-rw-r--r--plugins/Quotes/src/QuotesProviderDukasCopy.cpp42
1 files changed, 9 insertions, 33 deletions
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
index 7a74575308..1d660b155d 100644
--- a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
+++ b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp
@@ -10,12 +10,12 @@ CQuotesProviderDukasCopy::~CQuotesProviderDukasCopy()
namespace
{
- inline tstring get_quote_id(HANDLE hContact)
+ inline tstring get_quote_id(HCONTACT hContact)
{
return Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
}
- inline bool is_quote_id_equal(HANDLE hContact,const tstring& sID)
+ inline bool is_quote_id_equal(HCONTACT hContact,const tstring& sID)
{
return sID == get_quote_id(hContact);
}
@@ -36,7 +36,7 @@ bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote,bool bWatch)
if((false == bWatch) && (i != m_aContacts.end()))
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
m_aContacts.erase(i);
@@ -47,7 +47,7 @@ bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote,bool bWatch)
}
else if((true == bWatch) && (i == m_aContacts.end()))
{
- HANDLE hContact = CreateNewContact(rQuote.GetSymbol());
+ HCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
if(hContact)
{
db_set_ts(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_ID,sQuoteID.c_str());
@@ -72,7 +72,7 @@ tstring CQuotesProviderDukasCopy::BuildHTTPURL()const
CGuard<CLightMutex> cs(m_cs);
for(TContracts::const_iterator i = m_aContacts.begin();i != m_aContacts.end();++i)
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
tstring sID = get_quote_id(hContact);
if(false == sID.empty())
{
@@ -243,7 +243,7 @@ void CQuotesProviderDukasCopy::RefreshQuotes(TContracts& anContacts)
boost::bind(is_quote_id_equal,_1,ri.m_sID));
if(i != anContacts.end() && (true == IsOnline()))
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
anContacts.erase(i);
WriteContactRate(hContact,ri.m_dCurRate,ri.m_sName);
@@ -270,38 +270,14 @@ void CQuotesProviderDukasCopy::Accept(CQuotesProviderVisitor& visitor)const
visitor.Visit(*this);
}
-HANDLE CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
+HCONTACT CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
{
CGuard<CLightMutex> cs(m_cs);
TContracts::const_iterator i = std::find_if(m_aContacts.begin(),m_aContacts.end(),
boost::bind(std::equal_to<tstring>(),rsQuoteID,boost::bind(get_quote_id,_1)));
if(i != m_aContacts.end())
- {
return *i;
- }
- else
- {
- return NULL;
- }
-}
-
-// #ifdef CHART_IMPLEMENT
-// bool CQuotesProviderDukasCopy::Chart(HANDLE hContact,const tstring& url)const
-// {
-// LogIt(Info,url);
-//
-// CHTTPSession http;
-// if((true == http.OpenURL(url)))
-// {
-// tstring sHTML;
-// if((true == http.ReadResponce(sHTML)))
-// {
-// LogIt(Info,sHTML);
-// }
-// }
-//
-// return false;
-// }
-// #endif //CHART_IMPLEMENT
+ return NULL;
+}