summaryrefslogtreecommitdiff
path: root/plugins/Quotes/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Quotes/src')
-rw-r--r--plugins/Quotes/src/DBUtils.cpp8
-rw-r--r--plugins/Quotes/src/DBUtils.h8
-rw-r--r--plugins/Quotes/src/ExtraImages.cpp4
-rw-r--r--plugins/Quotes/src/ExtraImages.h2
-rw-r--r--plugins/Quotes/src/Forex.cpp2
-rw-r--r--plugins/Quotes/src/IQuotesProvider.h8
-rw-r--r--plugins/Quotes/src/ImportExport.cpp18
-rw-r--r--plugins/Quotes/src/QuoteChart.cpp12
-rw-r--r--plugins/Quotes/src/QuoteInfoDlg.cpp32
-rw-r--r--plugins/Quotes/src/QuotesProviderBase.cpp28
-rw-r--r--plugins/Quotes/src/QuotesProviderBase.h16
-rw-r--r--plugins/Quotes/src/QuotesProviderDukasCopy.cpp42
-rw-r--r--plugins/Quotes/src/QuotesProviderDukasCopy.h4
-rw-r--r--plugins/Quotes/src/QuotesProviderFinance.cpp12
-rw-r--r--plugins/Quotes/src/QuotesProviderFinance.h2
-rw-r--r--plugins/Quotes/src/QuotesProviderGoogle.cpp16
-rw-r--r--plugins/Quotes/src/QuotesProviderGoogle.h2
-rw-r--r--plugins/Quotes/src/QuotesProviderGoogleFinance.cpp4
-rw-r--r--plugins/Quotes/src/QuotesProviderVisitorFormater.cpp6
-rw-r--r--plugins/Quotes/src/QuotesProviderVisitorFormater.h4
-rw-r--r--plugins/Quotes/src/QuotesProviderVisitorTendency.cpp2
-rw-r--r--plugins/Quotes/src/QuotesProviderVisitorTendency.h4
-rw-r--r--plugins/Quotes/src/QuotesProviderYahoo.cpp8
-rw-r--r--plugins/Quotes/src/QuotesProviders.cpp6
-rw-r--r--plugins/Quotes/src/QuotesProviders.h2
-rw-r--r--plugins/Quotes/src/SettingsDlg.cpp18
-rw-r--r--plugins/Quotes/src/SettingsDlg.h10
27 files changed, 128 insertions, 152 deletions
diff --git a/plugins/Quotes/src/DBUtils.cpp b/plugins/Quotes/src/DBUtils.cpp
index d85f85c282..3fe5690273 100644
--- a/plugins/Quotes/src/DBUtils.cpp
+++ b/plugins/Quotes/src/DBUtils.cpp
@@ -1,6 +1,6 @@
#include "StdAfx.h"
-std::string Quotes_DBGetStringA(HANDLE hContact,const char* szModule,const char* szSetting,const char* pszDefValue /*= NULL*/)
+std::string Quotes_DBGetStringA(HCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue /*= NULL*/)
{
std::string sResult;
char* pszSymbol = db_get_sa(hContact,szModule,szSetting);
@@ -17,7 +17,7 @@ std::string Quotes_DBGetStringA(HANDLE hContact,const char* szModule,const char*
return sResult;
}
-std::wstring Quotes_DBGetStringW(HANDLE hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue/* = NULL*/)
+std::wstring Quotes_DBGetStringW(HCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue/* = NULL*/)
{
std::wstring sResult;
wchar_t* pszSymbol = db_get_wsa(hContact,szModule,szSetting);
@@ -34,12 +34,12 @@ std::wstring Quotes_DBGetStringW(HANDLE hContact,const char* szModule,const char
return sResult;
}
-bool Quotes_DBWriteDouble(HANDLE hContact,const char* szModule,const char* szSetting,double dValue)
+bool Quotes_DBWriteDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double dValue)
{
return 0 == db_set_blob(hContact, szModule, szSetting, &dValue, sizeof(dValue));
}
-bool Quotes_DBReadDouble(HANDLE hContact,const char* szModule,const char* szSetting,double& rdValue)
+bool Quotes_DBReadDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue)
{
DBVARIANT dbv = {0};
dbv.type = DBVT_BLOB;
diff --git a/plugins/Quotes/src/DBUtils.h b/plugins/Quotes/src/DBUtils.h
index 27e3de5038..330b953d27 100644
--- a/plugins/Quotes/src/DBUtils.h
+++ b/plugins/Quotes/src/DBUtils.h
@@ -1,13 +1,13 @@
#ifndef __54294385_3fdd_4f0c_98c3_c583a96e7fb4_DBUtils_h__
#define __54294385_3fdd_4f0c_98c3_c583a96e7fb4_DBUtils_h__
-std::string Quotes_DBGetStringA(HANDLE hContact,const char* szModule,const char* szSetting,const char* pszDefValue = NULL);
-std::wstring Quotes_DBGetStringW(HANDLE hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue = NULL);
+std::string Quotes_DBGetStringA(HCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue = NULL);
+std::wstring Quotes_DBGetStringW(HCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue = NULL);
#define Quotes_DBGetStringT Quotes_DBGetStringW
-bool Quotes_DBWriteDouble(HANDLE hContact,const char* szModule,const char* szSetting,double dValue);
-bool Quotes_DBReadDouble(HANDLE hContact,const char* szModule,const char* szSetting,double& rdValue);
+bool Quotes_DBWriteDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double dValue);
+bool Quotes_DBReadDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue);
#endif //__54294385_3fdd_4f0c_98c3_c583a96e7fb4_DBUtils_h__
diff --git a/plugins/Quotes/src/ExtraImages.cpp b/plugins/Quotes/src/ExtraImages.cpp
index 2a6c95b10d..ad2ac5e54a 100644
--- a/plugins/Quotes/src/ExtraImages.cpp
+++ b/plugins/Quotes/src/ExtraImages.cpp
@@ -23,7 +23,7 @@ void CExtraImages::RebuildExtraImages()
{
}
-bool CExtraImages::SetContactExtraImage(HANDLE hContact,EImageIndex nIndex)const
+bool CExtraImages::SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)const
{
if (!m_hExtraIcons)
return false;
@@ -47,7 +47,7 @@ bool CExtraImages::SetContactExtraImage(HANDLE hContact,EImageIndex nIndex)const
int QuotesEventFunc_onExtraImageApply(WPARAM wp,LPARAM lp)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr();
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
diff --git a/plugins/Quotes/src/ExtraImages.h b/plugins/Quotes/src/ExtraImages.h
index ca9cfd7c42..f02bfbacf9 100644
--- a/plugins/Quotes/src/ExtraImages.h
+++ b/plugins/Quotes/src/ExtraImages.h
@@ -21,7 +21,7 @@ public:
static CExtraImages& GetInstance();
void RebuildExtraImages();
- bool SetContactExtraImage(HANDLE hContact,EImageIndex nIndex)const;
+ bool SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)const;
private:
mutable CLightMutex m_lmExtraImages;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 4d61bd793b..1536bf8e9f 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -191,7 +191,7 @@ namespace
int QuotesEventFunc_OnContactDeleted(WPARAM wParam, LPARAM)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr();
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
diff --git a/plugins/Quotes/src/IQuotesProvider.h b/plugins/Quotes/src/IQuotesProvider.h
index 1317a115f6..a6359097b7 100644
--- a/plugins/Quotes/src/IQuotesProvider.h
+++ b/plugins/Quotes/src/IQuotesProvider.h
@@ -22,13 +22,13 @@ public:
virtual bool Init() = 0;
virtual const CProviderInfo& GetInfo()const = 0;
- virtual void AddContact(HANDLE hContact) = 0;
- virtual void DeleteContact(HANDLE hContact) = 0;
+ virtual void AddContact(HCONTACT hContact) = 0;
+ virtual void DeleteContact(HCONTACT hContact) = 0;
virtual void ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp) = 0;
virtual void RefreshAll() = 0;
- virtual void RefreshContact(HANDLE hContact) = 0;
- virtual void SetContactExtraIcon(HANDLE hContact)const = 0;
+ virtual void RefreshContact(HCONTACT hContact) = 0;
+ virtual void SetContactExtraIcon(HCONTACT hContact)const = 0;
virtual void Run() = 0;
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp
index be7b4fc974..282d5aa448 100644
--- a/plugins/Quotes/src/ImportExport.cpp
+++ b/plugins/Quotes/src/ImportExport.cpp
@@ -21,7 +21,7 @@ namespace
{
CModuleInfo::TXMLEnginePtr m_pXmlEngine;
IXMLNode::TXMLNodePtr m_pNode;
- HANDLE m_hContact;
+ HCONTACT m_hContact;
LPCSTR m_pszModule;
};
@@ -153,7 +153,7 @@ namespace
return 0;
}
- IXMLNode::TXMLNodePtr export_contact(HANDLE hContact,const CModuleInfo::TXMLEnginePtr& pXmlEngine)
+ IXMLNode::TXMLNodePtr export_contact(HCONTACT hContact,const CModuleInfo::TXMLEnginePtr& pXmlEngine)
{
IXMLNode::TXMLNodePtr pNode = pXmlEngine->CreateNode(g_pszXmlContact,tstring());
if(pNode)
@@ -273,7 +273,7 @@ INT_PTR Quotes_Export(WPARAM wp,LPARAM lp)
CModuleInfo::TXMLEnginePtr pXmlEngine = CModuleInfo::GetInstance().GetXMLEnginePtr();
CModuleInfo::TQuotesProvidersPtr pProviders = CModuleInfo::GetInstance().GetQuoteProvidersPtr();
IXMLNode::TXMLNodePtr pRoot = pXmlEngine->CreateNode(g_pszXmlContacts,tstring());
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
if(hContact)
{
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
@@ -307,13 +307,13 @@ INT_PTR Quotes_Export(WPARAM wp,LPARAM lp)
namespace
{
- bool set_contact_settings(HANDLE hContact, DBCONTACTWRITESETTING& dbs)
+ bool set_contact_settings(HCONTACT hContact, DBCONTACTWRITESETTING& dbs)
{
assert(DBVT_DELETED != dbs.value.type);
return (0 == db_set(hContact, dbs.szModule, dbs.szSetting, &dbs.value));
}
- bool handle_module(HANDLE hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
+ bool handle_module(HCONTACT hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
{
size_t cCreatedRecords = 0;
tstring sModuleName = pXmlModule->GetText();
@@ -488,7 +488,7 @@ namespace
struct CContactState
{
CContactState() : m_hContact(NULL),m_bNewContact(false){}
- HANDLE m_hContact;
+ HCONTACT m_hContact;
CQuotesProviders::TQuotesProviderPtr m_pProvider;
bool m_bNewContact;
};
@@ -568,7 +568,7 @@ namespace
visitor(const IXMLNode::TXMLNodePtr& pXmlQuotes)
: m_hContact(NULL),m_pXmlQuotes(pXmlQuotes){}
- HANDLE GetContact()const{return m_hContact;}
+ HCONTACT GetContact()const{return m_hContact;}
private:
virtual void Visit(const CQuotesProviderDukasCopy& rProvider)
@@ -646,7 +646,7 @@ namespace
}
private:
- HANDLE m_hContact;
+ HCONTACT m_hContact;
IXMLNode::TXMLNodePtr m_pXmlQuotes;
};
@@ -676,7 +676,7 @@ namespace
{
if(NULL == cst.m_hContact)
{
- cst.m_hContact = reinterpret_cast<HANDLE>(CallService(MS_DB_CONTACT_ADD,0,0));
+ cst.m_hContact = reinterpret_cast<HCONTACT>(CallService(MS_DB_CONTACT_ADD,0,0));
cst.m_bNewContact = true;
}
else if(impctx.m_nFlags&QUOTES_IMPORT_SKIP_EXISTING_CONTACTS)
diff --git a/plugins/Quotes/src/QuoteChart.cpp b/plugins/Quotes/src/QuoteChart.cpp
index 123c8c1a4f..82c4eefe0d 100644
--- a/plugins/Quotes/src/QuoteChart.cpp
+++ b/plugins/Quotes/src/QuoteChart.cpp
@@ -31,7 +31,7 @@ namespace
return pChart;
}
- bool read_log_file(HANDLE hContact,TChart& rChart)
+ bool read_log_file(HCONTACT hContact,TChart& rChart)
{
tstring sLogFileName = GetContactLogFileName(hContact);
if(false == sLogFileName.empty())
@@ -90,7 +90,7 @@ namespace
case WM_CREATE:
{
CREATESTRUCT* pCS = reinterpret_cast<CREATESTRUCT*>(lp);
- HANDLE hContact = reinterpret_cast<HANDLE>(pCS->lpCreateParams);
+ HCONTACT hContact = reinterpret_cast<HANDLE>(pCS->lpCreateParams);
TChart* pChart = new TChart;
read_log_file(hContact,*pChart);
@@ -184,7 +184,7 @@ namespace
inline HANDLE get_contact(HWND hWnd)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
+ HCONTACT hContact = reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
return hContact;
}
@@ -202,7 +202,7 @@ namespace
{
case WM_INITDIALOG:
{
- HANDLE hContact = reinterpret_cast<HANDLE>(lp);
+ HCONTACT hContact = reinterpret_cast<HANDLE>(lp);
TranslateDialogDefault(hDlg);
@@ -260,7 +260,7 @@ namespace
return (TRUE);
case WM_CLOSE:
{
- HANDLE hContact = get_contact(hDlg);
+ HCONTACT hContact = get_contact(hDlg);
SetWindowLongPtr(hDlg,GWLP_USERDATA,0);
// save_options(hDlg,hContact);
@@ -370,7 +370,7 @@ namespace
INT_PTR QuotesMenu_Chart(WPARAM wp,LPARAM lp)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HANDLE>(wp);
if(NULL == hContact)
{
return 0;
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp
index d21b3f2fed..fa7ae638c2 100644
--- a/plugins/Quotes/src/QuoteInfoDlg.cpp
+++ b/plugins/Quotes/src/QuoteInfoDlg.cpp
@@ -14,21 +14,21 @@ extern HGENMENU g_hMenuRefresh;
namespace
{
- HANDLE g_hContact;
+ HCONTACT g_hContact;
- inline bool IsMyContact(HANDLE hContact)
+ inline bool IsMyContact(HCONTACT hContact)
{
CQuotesProviders::TQuotesProviderPtr pProvider = CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact);
return (NULL != pProvider);
}
- inline HANDLE get_contact(HWND hWnd)
+ inline HCONTACT get_contact(HWND hWnd)
{
- return reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
+ return reinterpret_cast<HCONTACT>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
}
- bool get_fetch_time(time_t& rTime,HANDLE hContact)
+ bool get_fetch_time(time_t& rTime,HCONTACT hContact)
{
DBVARIANT dbv;
if (db_get(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FETCH_TIME, &dbv) || (DBVT_DWORD != dbv.type))
@@ -38,7 +38,7 @@ namespace
return true;
}
- INT_PTR CALLBACK QuoteInfoDlgProcImpl(HANDLE hContact,HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
+ INT_PTR CALLBACK QuoteInfoDlgProcImpl(HCONTACT hContact,HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
switch(msg)
{
@@ -118,7 +118,7 @@ namespace
int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(lp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(lp);
if(NULL == hContact)
return 0;
@@ -141,7 +141,7 @@ int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp)
INT_PTR QuotesMenu_EditSettings(WPARAM wp,LPARAM lp)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
if(NULL == hContact)
{
return 0;
@@ -154,7 +154,7 @@ INT_PTR QuotesMenu_EditSettings(WPARAM wp,LPARAM lp)
namespace
{
- bool get_log_file(HANDLE hContact,tstring& rsLogfile)
+ bool get_log_file(HCONTACT hContact,tstring& rsLogfile)
{
rsLogfile = GetContactLogFileName(hContact);
return ((rsLogfile.empty()) ? false : true);
@@ -163,7 +163,7 @@ namespace
INT_PTR QuotesMenu_OpenLogFile(WPARAM wp,LPARAM lp)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
if(NULL == hContact)
{
return 0;
@@ -180,7 +180,7 @@ INT_PTR QuotesMenu_OpenLogFile(WPARAM wp,LPARAM lp)
INT_PTR QuotesMenu_RefreshContact(WPARAM wp,LPARAM lp)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
if(NULL == hContact)
{
return 0;
@@ -201,12 +201,12 @@ namespace
{
INT_PTR CALLBACK QuoteInfoDlgProc1(HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
- HANDLE hContact = NULL;
+ HCONTACT hContact = NULL;
switch(msg)
{
case WM_INITDIALOG:
{
- hContact = reinterpret_cast<HANDLE>(lParam);
+ hContact = reinterpret_cast<HCONTACT>(lParam);
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO,false);
assert(hWL);
WindowList_Add(hWL,hdlg,hContact);
@@ -221,7 +221,7 @@ namespace
return FALSE;
case WM_DESTROY:
{
- HANDLE hContact = get_contact(hdlg);
+ HCONTACT hContact = get_contact(hdlg);
if(hContact)
{
SetWindowLongPtr(hdlg,GWLP_USERDATA,0);
@@ -251,7 +251,7 @@ namespace
int Quotes_OnContactDoubleClick(WPARAM wp,LPARAM/* lp*/)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
if(CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact))
{
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO,true);
@@ -297,7 +297,7 @@ int Quotes_PrebuildContactMenu(WPARAM wp,LPARAM lp)
#endif
enable_menu(g_hMenuRefresh,false);
- HANDLE hContact = reinterpret_cast<HANDLE>(wp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wp);
if(NULL == hContact)
{
return 0;
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp
index e0f17a9b1d..b017c7c162 100644
--- a/plugins/Quotes/src/QuotesProviderBase.cpp
+++ b/plugins/Quotes/src/QuotesProviderBase.cpp
@@ -238,7 +238,7 @@ bool CQuotesProviderBase::IsOnline()
return ID_STATUS_ONLINE == g_nStatus;
}
-void CQuotesProviderBase::AddContact(HANDLE hContact)
+void CQuotesProviderBase::AddContact(HCONTACT hContact)
{
// CCritSection cs(m_cs);
assert(m_aContacts.end() == std::find(m_aContacts.begin(),m_aContacts.end(),hContact));
@@ -246,7 +246,7 @@ void CQuotesProviderBase::AddContact(HANDLE hContact)
m_aContacts.push_back(hContact);
}
-void CQuotesProviderBase::DeleteContact(HANDLE hContact)
+void CQuotesProviderBase::DeleteContact(HCONTACT hContact)
{
CGuard<CLightMutex> cs(m_cs);
@@ -257,7 +257,7 @@ void CQuotesProviderBase::DeleteContact(HANDLE hContact)
}
}
-void CQuotesProviderBase::SetContactStatus(HANDLE hContact,int nNewStatus)
+void CQuotesProviderBase::SetContactStatus(HCONTACT hContact,int nNewStatus)
{
int nStatus = db_get_w(hContact,QUOTES_PROTOCOL_NAME,DB_STR_STATUS,ID_STATUS_OFFLINE);
if(nNewStatus != nStatus)
@@ -304,7 +304,7 @@ namespace
public:
CTendency() : m_nComparison(NonValid){}
- bool Parse(const IQuotesProvider* pProvider,const tstring& rsFrmt,HANDLE hContact)
+ bool Parse(const IQuotesProvider* pProvider,const tstring& rsFrmt,HCONTACT hContact)
{
m_abValueFlags[0] = false;
m_abValueFlags[1] = false;
@@ -460,7 +460,7 @@ namespace
};
tstring format_rate(const IQuotesProvider* pProvider,
- HANDLE hContact,
+ HCONTACT hContact,
const tstring& rsFrmt,
double dRate)
{
@@ -535,7 +535,7 @@ namespace
}
void log_to_file(const IQuotesProvider* pProvider,
- HANDLE hContact,
+ HCONTACT hContact,
double dRate,
const tstring& rsLogFileName,
const tstring& rsFormat)
@@ -563,7 +563,7 @@ namespace
}
void log_to_history(const IQuotesProvider* pProvider,
- HANDLE hContact,
+ HCONTACT hContact,
double dRate,
time_t nTime,
const tstring& rsFormat)
@@ -581,7 +581,7 @@ namespace
db_event_add(hContact, &dbei);
}
- bool do_set_contact_extra_icon(HANDLE hContact,const CTendency& tendency)
+ bool do_set_contact_extra_icon(HCONTACT hContact,const CTendency& tendency)
{
bool bResult = false;
CTendency::EResult nComparison = tendency.Compare();
@@ -604,7 +604,7 @@ namespace
}
bool show_popup(const IQuotesProvider* pProvider,
- HANDLE hContact,
+ HCONTACT hContact,
double dRate,
// double dPrevRate,
// bool bValidPrevRate,
@@ -685,7 +685,7 @@ namespace
}
}
-void CQuotesProviderBase::WriteContactRate(HANDLE hContact,double dRate,const tstring& rsSymbol/* = ""*/)
+void CQuotesProviderBase::WriteContactRate(HCONTACT hContact,double dRate,const tstring& rsSymbol/* = ""*/)
{
time_t nTime = ::time(NULL);
@@ -825,9 +825,9 @@ void CQuotesProviderBase::WriteContactRate(HANDLE hContact,double dRate,const ts
}
}
-HANDLE CQuotesProviderBase::CreateNewContact(const tstring& rsName)
+HCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(CallService(MS_DB_CONTACT_ADD,0,0));
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(CallService(MS_DB_CONTACT_ADD,0,0));
if(hContact)
{
if(0 == CallService(MS_PROTO_ADDTOCONTACT,reinterpret_cast<WPARAM>(hContact),(LPARAM)QUOTES_PROTOCOL_NAME))
@@ -1028,7 +1028,7 @@ void CQuotesProviderBase::RefreshAll()
assert(b && "Failed to set event");
}
-void CQuotesProviderBase::RefreshContact(HANDLE hContact)
+void CQuotesProviderBase::RefreshContact(HCONTACT hContact)
{
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
@@ -1039,7 +1039,7 @@ void CQuotesProviderBase::RefreshContact(HANDLE hContact)
assert(b && "Failed to set event");
}
-void CQuotesProviderBase::SetContactExtraIcon(HANDLE hContact)const
+void CQuotesProviderBase::SetContactExtraIcon(HCONTACT hContact)const
{
// tstring s = DBGetStringT(hContact,LIST_MODULE_NAME,CONTACT_LIST_NAME);
// tostringstream o;
diff --git a/plugins/Quotes/src/QuotesProviderBase.h b/plugins/Quotes/src/QuotesProviderBase.h
index 7340d41f79..d468b38a68 100644
--- a/plugins/Quotes/src/QuotesProviderBase.h
+++ b/plugins/Quotes/src/QuotesProviderBase.h
@@ -50,7 +50,7 @@ public:
};
protected:
- typedef std::vector<HANDLE> TContracts;
+ typedef std::vector<HCONTACT> TContracts;
public:
struct CXMLFileInfo;
@@ -65,20 +65,20 @@ public:
virtual bool Init();
virtual const CProviderInfo& GetInfo()const;
- virtual void AddContact(HANDLE hContact);
- virtual void DeleteContact(HANDLE hContact);
+ virtual void AddContact(HCONTACT hContact);
+ virtual void DeleteContact(HCONTACT hContact);
virtual void Run();
virtual void Accept(CQuotesProviderVisitor& visitor)const;
virtual void RefreshAll();
- virtual void RefreshContact(HANDLE hContact);
- virtual void SetContactExtraIcon(HANDLE hContact)const;
+ virtual void RefreshContact(HCONTACT hContact);
+ virtual void SetContactExtraIcon(HCONTACT hContact)const;
protected:
const tstring& GetURL()const;
- HANDLE CreateNewContact(const tstring& rsName);
+ HCONTACT CreateNewContact(const tstring& rsName);
static bool IsOnline();
- static void SetContactStatus(HANDLE hContact,int nNewStatus);
- void WriteContactRate(HANDLE hContact,double dRate,const tstring& rsSymbol = _T(""));
+ static void SetContactStatus(HCONTACT hContact,int nNewStatus);
+ void WriteContactRate(HCONTACT hContact,double dRate,const tstring& rsSymbol = _T(""));
private:
virtual void RefreshQuotes(TContracts& anContacts) = 0;
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;
+}
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.h b/plugins/Quotes/src/QuotesProviderDukasCopy.h
index 6bd49fc87e..117788c044 100644
--- a/plugins/Quotes/src/QuotesProviderDukasCopy.h
+++ b/plugins/Quotes/src/QuotesProviderDukasCopy.h
@@ -16,9 +16,9 @@ public:
bool WatchForQuote(const CQuote& rQuote,bool bWatch);
bool IsQuoteWatched(const CQuote& rQuote)const;
- HANDLE GetContactByQuoteID(const tstring& rsQuoteID)const;
+ HCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
// #ifdef CHART_IMPLEMENT
-// bool Chart(HANDLE hContact,const tstring& url)const;
+// bool Chart(HCONTACT hContact,const tstring& url)const;
// #endif
private:
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp
index cbd121ea4b..83e6389d54 100644
--- a/plugins/Quotes/src/QuotesProviderFinance.cpp
+++ b/plugins/Quotes/src/QuotesProviderFinance.cpp
@@ -3,7 +3,7 @@
void CQuotesProviderFinance::GetWatchedQuotes(TQuotes& raQuotes)const
{
raQuotes.clear();
- BOOST_FOREACH(HANDLE hContact,m_aContacts)
+ BOOST_FOREACH(HCONTACT hContact,m_aContacts)
{
tstring sID = Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
tstring sSymbol = Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_SYMBOL,sID.c_str());
@@ -16,12 +16,12 @@ void CQuotesProviderFinance::GetWatchedQuotes(TQuotes& raQuotes)const
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);
}
@@ -35,7 +35,7 @@ bool CQuotesProviderFinance::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);
@@ -46,7 +46,7 @@ bool CQuotesProviderFinance::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());
@@ -62,7 +62,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote,bool bWatch)
return false;
}
-HANDLE CQuotesProviderFinance::GetContactByQuoteID(const tstring& rsQuoteID)const
+HCONTACT CQuotesProviderFinance::GetContactByQuoteID(const tstring& rsQuoteID)const
{
CGuard<CLightMutex> cs(m_cs);
diff --git a/plugins/Quotes/src/QuotesProviderFinance.h b/plugins/Quotes/src/QuotesProviderFinance.h
index f5f0e547cc..df71a70a90 100644
--- a/plugins/Quotes/src/QuotesProviderFinance.h
+++ b/plugins/Quotes/src/QuotesProviderFinance.h
@@ -9,7 +9,7 @@ public:
public:
void GetWatchedQuotes(TQuotes& raQuotes)const;
bool WatchForQuote(const CQuote& rQuote,bool bWatch);
- HANDLE GetContactByQuoteID(const tstring& rsQuoteID)const;
+ HCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
protected:
virtual void ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp);
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.cpp b/plugins/Quotes/src/QuotesProviderGoogle.cpp
index f2fbc5f8ca..14f9ae1daa 100644
--- a/plugins/Quotes/src/QuotesProviderGoogle.cpp
+++ b/plugins/Quotes/src/QuotesProviderGoogle.cpp
@@ -17,7 +17,7 @@ namespace
return o.str();
}
- inline bool is_rate_watched(HANDLE hContact,
+ inline bool is_rate_watched(HCONTACT hContact,
const CQuotesProviderBase::CQuote& from,
const CQuotesProviderBase::CQuote& to)
{
@@ -36,7 +36,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri,
if ((true == bWatch) && (i == m_aContacts.end()))
{
tstring sName = make_contact_name(ri.m_from.GetSymbol(),ri.m_to.GetSymbol());
- HANDLE hContact = CreateNewContact(sName);
+ HCONTACT hContact = CreateNewContact(sName);
if(hContact)
{
db_set_ts(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID,ri.m_from.GetID().c_str());
@@ -55,7 +55,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri,
}
else if ((false == bWatch) && (i != m_aContacts.end()))
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
m_aContacts.erase(i);
@@ -77,7 +77,7 @@ bool CQuotesProviderGoogle::GetWatchedRateInfo(size_t nIndex,CRateInfo& rRateInf
{
if(nIndex < m_aContacts.size())
{
- HANDLE hContact = m_aContacts[nIndex];
+ HCONTACT hContact = m_aContacts[nIndex];
tstring sSymbolFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID);
tstring sSymbolTo = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_TO_ID);
tstring sDescFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_DESCRIPTION);
@@ -101,7 +101,7 @@ namespace
o << rsURL << _T("?a=") << std::fixed << dAmount << _T("&from=") << from << _T("&to=") << to;
return o.str();
}
- tstring build_url(HANDLE hContact,const tstring& rsURL,double dAmount = 1.0)
+ tstring build_url(HCONTACT hContact,const tstring& rsURL,double dAmount = 1.0)
{
tstring sFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID);
tstring sTo = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_TO_ID);
@@ -168,7 +168,7 @@ void CQuotesProviderGoogle::RefreshQuotes(TContracts& anContacts)
for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
if(bUseExtendedStatus)
{
@@ -497,7 +497,7 @@ double CQuotesProviderGoogle::Convert(double dAmount,const CQuote& from,const CQ
namespace
{
- bool is_equal_ids(HANDLE hContact,const tstring& rsFromID,const tstring& rsToID)
+ bool is_equal_ids(HCONTACT hContact,const tstring& rsFromID,const tstring& rsToID)
{
tstring sFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID);
tstring sTo = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_TO_ID);
@@ -506,7 +506,7 @@ namespace
}
}
-HANDLE CQuotesProviderGoogle::GetContactByID(const tstring& rsFromID,const tstring& rsToID)const
+HCONTACT CQuotesProviderGoogle::GetContactByID(const tstring& rsFromID,const tstring& rsToID)const
{
CGuard<CLightMutex> cs(m_cs);
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.h b/plugins/Quotes/src/QuotesProviderGoogle.h
index 48e3d27e11..59cb3273b0 100644
--- a/plugins/Quotes/src/QuotesProviderGoogle.h
+++ b/plugins/Quotes/src/QuotesProviderGoogle.h
@@ -27,7 +27,7 @@ public:
size_t GetWatchedRateCount()const;
bool GetWatchedRateInfo(size_t nIndex,CRateInfo& rRateInfo);
- HANDLE GetContactByID(const tstring& rsFromID,const tstring& rsToID)const;
+ HCONTACT GetContactByID(const tstring& rsFromID,const tstring& rsToID)const;
double Convert(double dAmount,const CQuote& from,const CQuote& to)const;
diff --git a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp
index 5150610ed5..be34fcb29e 100644
--- a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp
+++ b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp
@@ -10,7 +10,7 @@ CQuotesProviderGoogleFinance::~CQuotesProviderGoogleFinance()
namespace
{
- tstring build_url(HANDLE hContact,const tstring& rsURL)
+ tstring build_url(HCONTACT hContact,const tstring& rsURL)
{
tostringstream o;
o << rsURL << _T("?q=") << Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
@@ -292,7 +292,7 @@ void CQuotesProviderGoogleFinance::RefreshQuotes(TContracts& anContacts)
for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
if(bUseExtendedStatus)
{
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp
index 0c95f3846f..a78096d052 100644
--- a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp
+++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp
@@ -1,6 +1,6 @@
#include "StdAfx.h"
-CQuotesProviderVisitorFormater::CQuotesProviderVisitorFormater(HANDLE hContact,TCHAR chr,int nWidth)
+CQuotesProviderVisitorFormater::CQuotesProviderVisitorFormater(HCONTACT hContact,TCHAR chr,int nWidth)
: m_hContact(hContact),
m_chr(chr),
m_nWidth(nWidth)
@@ -45,7 +45,7 @@ void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderGoogle& rProvide
namespace
{
- bool get_fetch_time(HANDLE hContact,time_t& rTime)
+ bool get_fetch_time(HCONTACT hContact,time_t& rTime)
{
DBVARIANT dbv;
if (db_get(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_FETCH_TIME, &dbv) || (DBVT_DWORD != dbv.type))
@@ -55,7 +55,7 @@ namespace
return true;
}
- tstring format_fetch_time(const CQuotesProviderBase& rProvider,HANDLE hContact,const tstring& rsFormat)
+ tstring format_fetch_time(const CQuotesProviderBase& rProvider,HCONTACT hContact,const tstring& rsFormat)
{
time_t nTime;
if(true == get_fetch_time(hContact,nTime))
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.h b/plugins/Quotes/src/QuotesProviderVisitorFormater.h
index 412c4a9fda..605c919725 100644
--- a/plugins/Quotes/src/QuotesProviderVisitorFormater.h
+++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.h
@@ -4,7 +4,7 @@
class CQuotesProviderVisitorFormater : public CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitorFormater(HANDLE hContact,TCHAR chr,int nWidth);
+ CQuotesProviderVisitorFormater(HCONTACT hContact,TCHAR chr,int nWidth);
~CQuotesProviderVisitorFormater();
const tstring& GetResult()const;
@@ -21,7 +21,7 @@ private:
// void FormatChangeValueHelper(bool bPercentage);
private:
- HANDLE m_hContact;
+ HCONTACT m_hContact;
TCHAR m_chr;
tstring m_sResult;
int m_nWidth;
diff --git a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp
index 752dcc403e..0f53784953 100644
--- a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp
+++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(HANDLE hContact,TCHAR chr)
+CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(HCONTACT hContact,TCHAR chr)
: m_hContact(hContact),m_chr(chr),m_bValid(false),m_dResult(0.0)
{
}
diff --git a/plugins/Quotes/src/QuotesProviderVisitorTendency.h b/plugins/Quotes/src/QuotesProviderVisitorTendency.h
index c9acf27317..48411d6a4b 100644
--- a/plugins/Quotes/src/QuotesProviderVisitorTendency.h
+++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.h
@@ -4,7 +4,7 @@
class CQuotesProviderVisitorTendency : public CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitorTendency(HANDLE hContact,TCHAR chr);
+ CQuotesProviderVisitorTendency(HCONTACT hContact,TCHAR chr);
bool IsValid()const{return m_bValid;}
double GetResult()const{return m_dResult;}
@@ -18,7 +18,7 @@ private:
void GetValue(LPCSTR pszDbKeyName);
private:
- HANDLE m_hContact;
+ HCONTACT m_hContact;
TCHAR m_chr;
bool m_bValid;
double m_dResult;
diff --git a/plugins/Quotes/src/QuotesProviderYahoo.cpp b/plugins/Quotes/src/QuotesProviderYahoo.cpp
index f34a21523b..20581b0d89 100644
--- a/plugins/Quotes/src/QuotesProviderYahoo.cpp
+++ b/plugins/Quotes/src/QuotesProviderYahoo.cpp
@@ -50,7 +50,7 @@ namespace
typedef std::vector<tstring> TStrings;
- bool get_double_from_parsed_line(HANDLE hContact,const TStrings& rasParsedLine,size_t nIndex,const char* pszDbName)
+ bool get_double_from_parsed_line(HCONTACT hContact,const TStrings& rasParsedLine,size_t nIndex,const char* pszDbName)
{
if(rasParsedLine.size() > nIndex)
{
@@ -71,13 +71,13 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts)
tstring sURL = GetURL();
bool bUseExtendedStatus = CModuleInfo::GetInstance().GetExtendedStatusFlag();
- typedef std::map<tstring,HANDLE> TQuoteID2ContractHandles;
+ typedef std::map<tstring,HCONTACT> TQuoteID2ContractHandles;
TQuoteID2ContractHandles aQuoteID2Handles;
tostringstream oURL;
oURL << sURL << _T("dioksin.txt?s=");
for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HANDLE hContact = *i;
+ HCONTACT hContact = *i;
if(bUseExtendedStatus)
{
SetContactStatus(hContact,ID_STATUS_OCCUPIED);
@@ -151,7 +151,7 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts)
auto it3 = aQuoteID2Handles.find(asStrings[indexSymbol]);
if(it3 != aQuoteID2Handles.end())
{
- HANDLE hContact = it3->second;
+ HCONTACT hContact = it3->second;
double dRate = 0.0;
if(true == t2d(asStrings[indexLastTrade],dRate))
{
diff --git a/plugins/Quotes/src/QuotesProviders.cpp b/plugins/Quotes/src/QuotesProviders.cpp
index cfab6903ab..1acf732f6f 100644
--- a/plugins/Quotes/src/QuotesProviders.cpp
+++ b/plugins/Quotes/src/QuotesProviders.cpp
@@ -44,7 +44,7 @@ void CQuotesProviders::ClearProviders()
namespace
{
- void convert_contact_settings(HANDLE hContact)
+ void convert_contact_settings(HCONTACT hContact)
{
WORD dwLogMode = db_get_w(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_LOG,static_cast<WORD>(lmDisabled));
if ((dwLogMode&lmInternalHistory) || (dwLogMode&lmExternalFile))
@@ -60,7 +60,7 @@ void CQuotesProviders::InitProviders()
const WORD nCurrentVersion = 17;
WORD nVersion = db_get_w(NULL,QUOTES_MODULE_NAME,LAST_RUN_VERSION,1);
- for(HANDLE hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
+ for(HCONTACT hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
{
TQuotesProviderPtr pProvider = GetContactProviderPtr(hContact);
if(pProvider)
@@ -76,7 +76,7 @@ void CQuotesProviders::InitProviders()
db_set_w(NULL,QUOTES_MODULE_NAME,LAST_RUN_VERSION,nCurrentVersion);
}
-CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(HANDLE hContact)const
+CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(HCONTACT hContact)const
{
char* szProto = GetContactProto(hContact);
if(NULL == szProto || 0 != ::_stricmp(szProto, QUOTES_PROTOCOL_NAME))
diff --git a/plugins/Quotes/src/QuotesProviders.h b/plugins/Quotes/src/QuotesProviders.h
index 8ccb3a5474..50394923cb 100644
--- a/plugins/Quotes/src/QuotesProviders.h
+++ b/plugins/Quotes/src/QuotesProviders.h
@@ -14,7 +14,7 @@ public:
~CQuotesProviders();
TQuotesProviderPtr FindProvider(const tstring& rsName)const;
- TQuotesProviderPtr GetContactProviderPtr(HANDLE hContact)const;
+ TQuotesProviderPtr GetContactProviderPtr(HCONTACT hContact)const;
const TQuotesProviders& GetProviders()const;
private:
diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp
index 9cf906526f..0045c21cad 100644
--- a/plugins/Quotes/src/SettingsDlg.cpp
+++ b/plugins/Quotes/src/SettingsDlg.cpp
@@ -126,10 +126,10 @@ namespace
struct CSettingWindowParam
{
- CSettingWindowParam(HANDLE hContact) : m_hContact(hContact),m_pPopupSettings(NULL){}
+ CSettingWindowParam(HCONTACT hContact) : m_hContact(hContact),m_pPopupSettings(NULL){}
~CSettingWindowParam(){delete m_pPopupSettings;}
- HANDLE m_hContact;
+ HCONTACT m_hContact;
CPopupSettings* m_pPopupSettings;
};
@@ -268,7 +268,7 @@ namespace
{
case WM_INITDIALOG:
{
- HANDLE hContact = reinterpret_cast<HANDLE>(lp);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(lp);
TranslateDialogDefault(hWnd);
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS,false);
@@ -393,7 +393,7 @@ namespace
case IDOK:
{
CSettingWindowParam* pParam = get_param(hWnd);
- HANDLE hContact = pParam->m_hContact;
+ HCONTACT hContact = pParam->m_hContact;
bool bUseContactSpec = 1 == ::IsDlgButtonChecked(hWnd,IDC_CHECK_CONTACT_SPECIFIC);
@@ -507,7 +507,7 @@ namespace
}
-void ShowSettingsDlg(HANDLE hContact)
+void ShowSettingsDlg(HCONTACT hContact)
{
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS,true);
assert(hWL);
@@ -933,7 +933,7 @@ COLORREF CPopupSettings::GetDefColourText()
return ::GetSysColor(COLOR_BTNTEXT);
}
-void CPopupSettings::InitForContact(HANDLE hContact)
+void CPopupSettings::InitForContact(HCONTACT hContact)
{
BYTE m = db_get_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_COLOUR_MODE,static_cast<BYTE>(m_modeColour));
if(m >= CPopupSettings::colourDefault && m <= CPopupSettings::colourUserDefined)
@@ -953,7 +953,7 @@ void CPopupSettings::InitForContact(HANDLE hContact)
m_bUseHistory = 1 == db_get_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_HISTORY_FLAG,m_bUseHistory);
}
-void CPopupSettings::SaveForContact(HANDLE hContact)const
+void CPopupSettings::SaveForContact(HCONTACT hContact)const
{
db_set_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_COLOUR_MODE,static_cast<BYTE>(m_modeColour));
db_set_dw(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_COLOUR_BK,m_rgbBkg);
@@ -1088,7 +1088,7 @@ tstring GenerateLogFileName(const tstring& rsLogFilePattern,
return sPath;
}
-tstring GetContactLogFileName(HANDLE hContact)
+tstring GetContactLogFileName(HCONTACT hContact)
{
tstring result;
@@ -1113,7 +1113,7 @@ tstring GetContactLogFileName(HANDLE hContact)
return result;
}
-tstring GetContactName(HANDLE hContact)
+tstring GetContactName(HCONTACT hContact)
{
tstring sDescription = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_DESCRIPTION);
if(sDescription.empty())
diff --git a/plugins/Quotes/src/SettingsDlg.h b/plugins/Quotes/src/SettingsDlg.h
index 569d0b7d2c..355f7bd216 100644
--- a/plugins/Quotes/src/SettingsDlg.h
+++ b/plugins/Quotes/src/SettingsDlg.h
@@ -25,8 +25,8 @@ public:
static COLORREF GetDefColourBk();
static COLORREF GetDefColourText();
- void InitForContact(HANDLE hContact);
- void SaveForContact(HANDLE hContact)const;
+ void InitForContact(HCONTACT hContact);
+ void SaveForContact(HCONTACT hContact)const;
EColourMode GetColourMode()const;
void SetColourMode(EColourMode nMode);
@@ -101,7 +101,7 @@ private:
mutable CPopupSettings* m_pPopupSettings;
};
-void ShowSettingsDlg(HANDLE hContact);
+void ShowSettingsDlg(HCONTACT hContact);
bool ShowSettingsDlg(HWND hWndParent,CAdvProviderSettings* pAdvSettings);
enum
@@ -111,8 +111,8 @@ enum
glfnResolveAll = glfnResolveQuoteName|glfnResolveUserProfile,
};
tstring GenerateLogFileName(const tstring& rsLogFilePattern,const tstring& rsQuoteSymbol,int nFlags = glfnResolveAll);
-tstring GetContactLogFileName(HANDLE hContact);
-tstring GetContactName(HANDLE hContact);
+tstring GetContactLogFileName(HCONTACT hContact);
+tstring GetContactName(HCONTACT hContact);
#endif //__E211E4D9_383C_43BE_A787_7EF1D585B90D_SettingsDlg_h__