diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/Quotes/src | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes/src')
27 files changed, 126 insertions, 126 deletions
diff --git a/plugins/Quotes/src/DBUtils.cpp b/plugins/Quotes/src/DBUtils.cpp index 3fe5690273..1636419ac9 100644 --- a/plugins/Quotes/src/DBUtils.cpp +++ b/plugins/Quotes/src/DBUtils.cpp @@ -1,6 +1,6 @@ #include "StdAfx.h"
-std::string Quotes_DBGetStringA(HCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue /*= NULL*/)
+std::string Quotes_DBGetStringA(MCONTACT 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(HCONTACT hContact,const char* szModule,const cha return sResult;
}
-std::wstring Quotes_DBGetStringW(HCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue/* = NULL*/)
+std::wstring Quotes_DBGetStringW(MCONTACT 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(HCONTACT hContact,const char* szModule,const ch return sResult;
}
-bool Quotes_DBWriteDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double dValue)
+bool Quotes_DBWriteDouble(MCONTACT hContact,const char* szModule,const char* szSetting,double dValue)
{
return 0 == db_set_blob(hContact, szModule, szSetting, &dValue, sizeof(dValue));
}
-bool Quotes_DBReadDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue)
+bool Quotes_DBReadDouble(MCONTACT 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 330b953d27..8441bd61d6 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(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);
+std::string Quotes_DBGetStringA(MCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue = NULL);
+std::wstring Quotes_DBGetStringW(MCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue = NULL);
#define Quotes_DBGetStringT Quotes_DBGetStringW
-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);
+bool Quotes_DBWriteDouble(MCONTACT hContact,const char* szModule,const char* szSetting,double dValue);
+bool Quotes_DBReadDouble(MCONTACT 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 99350fab93..4d061a0651 100644 --- a/plugins/Quotes/src/ExtraImages.cpp +++ b/plugins/Quotes/src/ExtraImages.cpp @@ -23,7 +23,7 @@ void CExtraImages::RebuildExtraImages() {
}
-bool CExtraImages::SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)const
+bool CExtraImages::SetContactExtraImage(MCONTACT hContact,EImageIndex nIndex)const
{
if (!m_hExtraIcons)
return false;
@@ -47,7 +47,7 @@ bool CExtraImages::SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)con int QuotesEventFunc_onExtraImageApply(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(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 f02bfbacf9..6099ee5f94 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(HCONTACT hContact,EImageIndex nIndex)const;
+ bool SetContactExtraImage(MCONTACT hContact,EImageIndex nIndex)const;
private:
mutable CLightMutex m_lmExtraImages;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 03a8565806..e148794ee1 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -191,7 +191,7 @@ namespace int QuotesEventFunc_OnContactDeleted(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(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 a6359097b7..f72a68f3a0 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(HCONTACT hContact) = 0;
- virtual void DeleteContact(HCONTACT hContact) = 0;
+ virtual void AddContact(MCONTACT hContact) = 0;
+ virtual void DeleteContact(MCONTACT hContact) = 0;
virtual void ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp) = 0;
virtual void RefreshAll() = 0;
- virtual void RefreshContact(HCONTACT hContact) = 0;
- virtual void SetContactExtraIcon(HCONTACT hContact)const = 0;
+ virtual void RefreshContact(MCONTACT hContact) = 0;
+ virtual void SetContactExtraIcon(MCONTACT hContact)const = 0;
virtual void Run() = 0;
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index 6bf10e2de3..b41451ce8c 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;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
LPCSTR m_pszModule;
};
@@ -151,7 +151,7 @@ namespace return 0;
}
- IXMLNode::TXMLNodePtr export_contact(HCONTACT hContact,const CModuleInfo::TXMLEnginePtr& pXmlEngine)
+ IXMLNode::TXMLNodePtr export_contact(MCONTACT hContact,const CModuleInfo::TXMLEnginePtr& pXmlEngine)
{
IXMLNode::TXMLNodePtr pNode = pXmlEngine->CreateNode(g_pszXmlContact,tstring());
if(pNode)
@@ -271,7 +271,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());
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(hContact)
{
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
@@ -305,13 +305,13 @@ INT_PTR Quotes_Export(WPARAM wp,LPARAM lp) namespace
{
- bool set_contact_settings(HCONTACT hContact, DBCONTACTWRITESETTING& dbs)
+ bool set_contact_settings(MCONTACT hContact, DBCONTACTWRITESETTING& dbs)
{
assert(DBVT_DELETED != dbs.value.type);
return (0 == db_set(hContact, dbs.szModule, dbs.szSetting, &dbs.value));
}
- bool handle_module(HCONTACT hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
+ bool handle_module(MCONTACT hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
{
size_t cCreatedRecords = 0;
tstring sModuleName = pXmlModule->GetText();
@@ -486,7 +486,7 @@ namespace struct CContactState
{
CContactState() : m_hContact(NULL),m_bNewContact(false){}
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
CQuotesProviders::TQuotesProviderPtr m_pProvider;
bool m_bNewContact;
};
@@ -566,7 +566,7 @@ namespace visitor(const IXMLNode::TXMLNodePtr& pXmlQuotes)
: m_hContact(NULL),m_pXmlQuotes(pXmlQuotes){}
- HCONTACT GetContact()const{return m_hContact;}
+ MCONTACT GetContact()const{return m_hContact;}
private:
virtual void Visit(const CQuotesProviderDukasCopy& rProvider)
@@ -644,7 +644,7 @@ namespace }
private:
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
IXMLNode::TXMLNodePtr m_pXmlQuotes;
};
@@ -674,7 +674,7 @@ namespace {
if(NULL == cst.m_hContact)
{
- cst.m_hContact = HCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
+ cst.m_hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
cst.m_bNewContact = true;
}
else if(impctx.m_nFlags"ES_IMPORT_SKIP_EXISTING_CONTACTS)
diff --git a/plugins/Quotes/src/QuoteChart.cpp b/plugins/Quotes/src/QuoteChart.cpp index 82c4eefe0d..17e304f4dc 100644 --- a/plugins/Quotes/src/QuoteChart.cpp +++ b/plugins/Quotes/src/QuoteChart.cpp @@ -31,7 +31,7 @@ namespace return pChart;
}
- bool read_log_file(HCONTACT hContact,TChart& rChart)
+ bool read_log_file(MCONTACT 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);
- HCONTACT hContact = reinterpret_cast<HANDLE>(pCS->lpCreateParams);
+ MCONTACT 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)
{
- HCONTACT hContact = reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
+ MCONTACT hContact = reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
return hContact;
}
@@ -202,7 +202,7 @@ namespace {
case WM_INITDIALOG:
{
- HCONTACT hContact = reinterpret_cast<HANDLE>(lp);
+ MCONTACT hContact = reinterpret_cast<HANDLE>(lp);
TranslateDialogDefault(hDlg);
@@ -260,7 +260,7 @@ namespace return (TRUE);
case WM_CLOSE:
{
- HCONTACT hContact = get_contact(hDlg);
+ MCONTACT 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)
{
- HCONTACT hContact = reinterpret_cast<HANDLE>(wp);
+ MCONTACT 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 a5be52dd9d..059ff40ae8 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -14,21 +14,21 @@ extern HGENMENU g_hMenuRefresh; namespace
{
- HCONTACT g_hContact;
+ MCONTACT g_hContact;
- inline bool IsMyContact(HCONTACT hContact)
+ inline bool IsMyContact(MCONTACT hContact)
{
CQuotesProviders::TQuotesProviderPtr pProvider = CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact);
return (NULL != pProvider);
}
- inline HCONTACT get_contact(HWND hWnd)
+ inline MCONTACT get_contact(HWND hWnd)
{
- return HCONTACT(GetWindowLongPtr(hWnd,GWLP_USERDATA));
+ return MCONTACT(GetWindowLongPtr(hWnd,GWLP_USERDATA));
}
- bool get_fetch_time(time_t& rTime,HCONTACT hContact)
+ bool get_fetch_time(time_t& rTime,MCONTACT 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(HCONTACT hContact,HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
+ INT_PTR CALLBACK QuoteInfoDlgProcImpl(MCONTACT hContact,HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
switch(msg)
{
@@ -118,7 +118,7 @@ namespace int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(lp);
+ MCONTACT hContact = MCONTACT(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)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
@@ -154,7 +154,7 @@ INT_PTR QuotesMenu_EditSettings(WPARAM wp,LPARAM lp) namespace
{
- bool get_log_file(HCONTACT hContact,tstring& rsLogfile)
+ bool get_log_file(MCONTACT hContact,tstring& rsLogfile)
{
rsLogfile = GetContactLogFileName(hContact);
return ((rsLogfile.empty()) ? false : true);
@@ -163,7 +163,7 @@ namespace INT_PTR QuotesMenu_OpenLogFile(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(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)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
@@ -201,11 +201,11 @@ namespace {
INT_PTR CALLBACK QuoteInfoDlgProc1(HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
switch(msg) {
case WM_INITDIALOG:
{
- hContact = HCONTACT(lParam);
+ hContact = MCONTACT(lParam);
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO,false);
assert(hWL);
WindowList_Add(hWL,hdlg,hContact);
@@ -220,7 +220,7 @@ namespace return FALSE;
case WM_DESTROY:
{
- HCONTACT hContact = get_contact(hdlg);
+ MCONTACT hContact = get_contact(hdlg);
if(hContact)
{
SetWindowLongPtr(hdlg,GWLP_USERDATA,0);
@@ -250,7 +250,7 @@ namespace int Quotes_OnContactDoubleClick(WPARAM wp,LPARAM/* lp*/)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact))
{
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO,true);
@@ -291,7 +291,7 @@ int Quotes_PrebuildContactMenu(WPARAM wp,LPARAM lp) #endif
enable_menu(g_hMenuRefresh,false);
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp index 462154c478..92b5099f70 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(HCONTACT hContact)
+void CQuotesProviderBase::AddContact(MCONTACT 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(HCONTACT hContact) m_aContacts.push_back(hContact);
}
-void CQuotesProviderBase::DeleteContact(HCONTACT hContact)
+void CQuotesProviderBase::DeleteContact(MCONTACT hContact)
{
CGuard<CLightMutex> cs(m_cs);
@@ -257,7 +257,7 @@ void CQuotesProviderBase::DeleteContact(HCONTACT hContact) }
}
-void CQuotesProviderBase::SetContactStatus(HCONTACT hContact,int nNewStatus)
+void CQuotesProviderBase::SetContactStatus(MCONTACT 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,HCONTACT hContact)
+ bool Parse(const IQuotesProvider* pProvider,const tstring& rsFrmt,MCONTACT hContact)
{
m_abValueFlags[0] = false;
m_abValueFlags[1] = false;
@@ -460,7 +460,7 @@ namespace };
tstring format_rate(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
const tstring& rsFrmt,
double dRate)
{
@@ -535,7 +535,7 @@ namespace }
void log_to_file(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
double dRate,
const tstring& rsLogFileName,
const tstring& rsFormat)
@@ -563,7 +563,7 @@ namespace }
void log_to_history(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT 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(HCONTACT hContact,const CTendency& tendency)
+ bool do_set_contact_extra_icon(MCONTACT hContact,const CTendency& tendency)
{
bool bResult = false;
CTendency::EResult nComparison = tendency.Compare();
@@ -604,7 +604,7 @@ namespace }
bool show_popup(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
double dRate,
// double dPrevRate,
// bool bValidPrevRate,
@@ -685,7 +685,7 @@ namespace }
}
-void CQuotesProviderBase::WriteContactRate(HCONTACT hContact,double dRate,const tstring& rsSymbol/* = ""*/)
+void CQuotesProviderBase::WriteContactRate(MCONTACT hContact,double dRate,const tstring& rsSymbol/* = ""*/)
{
time_t nTime = ::time(NULL);
@@ -825,9 +825,9 @@ void CQuotesProviderBase::WriteContactRate(HCONTACT hContact,double dRate,const }
}
-HCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
+MCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
{
- HCONTACT hContact = HCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
+ MCONTACT hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
if(hContact) {
if(0 == CallService(MS_PROTO_ADDTOCONTACT, WPARAM(hContact), (LPARAM)QUOTES_PROTOCOL_NAME)) {
tstring sProvName = GetInfo().m_sName;
@@ -1020,7 +1020,7 @@ void CQuotesProviderBase::RefreshAll() assert(b && "Failed to set event");
}
-void CQuotesProviderBase::RefreshContact(HCONTACT hContact)
+void CQuotesProviderBase::RefreshContact(MCONTACT hContact)
{
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
@@ -1031,7 +1031,7 @@ void CQuotesProviderBase::RefreshContact(HCONTACT hContact) assert(b && "Failed to set event");
}
-void CQuotesProviderBase::SetContactExtraIcon(HCONTACT hContact)const
+void CQuotesProviderBase::SetContactExtraIcon(MCONTACT 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 d468b38a68..2be1658c1d 100644 --- a/plugins/Quotes/src/QuotesProviderBase.h +++ b/plugins/Quotes/src/QuotesProviderBase.h @@ -50,7 +50,7 @@ public: };
protected:
- typedef std::vector<HCONTACT> TContracts;
+ typedef std::vector<MCONTACT> TContracts;
public:
struct CXMLFileInfo;
@@ -65,20 +65,20 @@ public: virtual bool Init();
virtual const CProviderInfo& GetInfo()const;
- virtual void AddContact(HCONTACT hContact);
- virtual void DeleteContact(HCONTACT hContact);
+ virtual void AddContact(MCONTACT hContact);
+ virtual void DeleteContact(MCONTACT hContact);
virtual void Run();
virtual void Accept(CQuotesProviderVisitor& visitor)const;
virtual void RefreshAll();
- virtual void RefreshContact(HCONTACT hContact);
- virtual void SetContactExtraIcon(HCONTACT hContact)const;
+ virtual void RefreshContact(MCONTACT hContact);
+ virtual void SetContactExtraIcon(MCONTACT hContact)const;
protected:
const tstring& GetURL()const;
- HCONTACT CreateNewContact(const tstring& rsName);
+ MCONTACT CreateNewContact(const tstring& rsName);
static bool IsOnline();
- static void SetContactStatus(HCONTACT hContact,int nNewStatus);
- void WriteContactRate(HCONTACT hContact,double dRate,const tstring& rsSymbol = _T(""));
+ static void SetContactStatus(MCONTACT hContact,int nNewStatus);
+ void WriteContactRate(MCONTACT 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 8fd913fa25..afdc79c6f5 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(HCONTACT hContact)
+ inline tstring get_quote_id(MCONTACT hContact)
{
return Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
}
- inline bool is_quote_id_equal(HCONTACT hContact,const tstring& sID)
+ inline bool is_quote_id_equal(MCONTACT 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()))
{
- HCONTACT hContact = *i;
+ MCONTACT 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()))
{
- HCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
+ MCONTACT 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)
{
- HCONTACT hContact = *i;
+ MCONTACT 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()))
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
anContacts.erase(i);
WriteContactRate(hContact,ri.m_dCurRate,ri.m_sName);
@@ -270,7 +270,7 @@ void CQuotesProviderDukasCopy::Accept(CQuotesProviderVisitor& visitor)const visitor.Visit(*this);
}
-HCONTACT CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
+MCONTACT CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
{
CGuard<CLightMutex> cs(m_cs);
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.h b/plugins/Quotes/src/QuotesProviderDukasCopy.h index 117788c044..1c53f53dd4 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;
- HCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
+ MCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
// #ifdef CHART_IMPLEMENT
-// bool Chart(HCONTACT hContact,const tstring& url)const;
+// bool Chart(MCONTACT hContact,const tstring& url)const;
// #endif
private:
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp index 49d2c5bf23..b0912dddb5 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(HCONTACT hContact,m_aContacts)
+ BOOST_FOREACH(MCONTACT 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(HCONTACT hContact)
+ inline tstring get_quote_id(MCONTACT hContact)
{
return Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
}
- inline bool is_quote_id_equal(HCONTACT hContact,const tstring& sID)
+ inline bool is_quote_id_equal(MCONTACT 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()))
{
- HCONTACT hContact = *i;
+ MCONTACT 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()))
{
- HCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
+ MCONTACT 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;
}
-HCONTACT CQuotesProviderFinance::GetContactByQuoteID(const tstring& rsQuoteID)const
+MCONTACT 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 df71a70a90..67e4e3febc 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);
- HCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
+ MCONTACT 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 fb64f3b730..907639ff47 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(HCONTACT hContact,
+ inline bool is_rate_watched(MCONTACT 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());
- HCONTACT hContact = CreateNewContact(sName);
+ MCONTACT 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()))
{
- HCONTACT hContact = *i;
+ MCONTACT 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())
{
- HCONTACT hContact = m_aContacts[nIndex];
+ MCONTACT 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(HCONTACT hContact,const tstring& rsURL,double dAmount = 1.0)
+ tstring build_url(MCONTACT 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)
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
if(bUseExtendedStatus)
{
@@ -497,7 +497,7 @@ double CQuotesProviderGoogle::Convert(double dAmount,const CQuote& from,const CQ namespace
{
- bool is_equal_ids(HCONTACT hContact,const tstring& rsFromID,const tstring& rsToID)
+ bool is_equal_ids(MCONTACT 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 }
}
-HCONTACT CQuotesProviderGoogle::GetContactByID(const tstring& rsFromID,const tstring& rsToID)const
+MCONTACT 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 59cb3273b0..ec2a6c4d85 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);
- HCONTACT GetContactByID(const tstring& rsFromID,const tstring& rsToID)const;
+ MCONTACT 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 be34fcb29e..a37829421e 100644 --- a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp @@ -10,7 +10,7 @@ CQuotesProviderGoogleFinance::~CQuotesProviderGoogleFinance() namespace
{
- tstring build_url(HCONTACT hContact,const tstring& rsURL)
+ tstring build_url(MCONTACT 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)
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
if(bUseExtendedStatus)
{
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp index a78096d052..e9bef2e8a6 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp @@ -1,6 +1,6 @@ #include "StdAfx.h"
-CQuotesProviderVisitorFormater::CQuotesProviderVisitorFormater(HCONTACT hContact,TCHAR chr,int nWidth)
+CQuotesProviderVisitorFormater::CQuotesProviderVisitorFormater(MCONTACT 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(HCONTACT hContact,time_t& rTime)
+ bool get_fetch_time(MCONTACT 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,HCONTACT hContact,const tstring& rsFormat)
+ tstring format_fetch_time(const CQuotesProviderBase& rProvider,MCONTACT 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 605c919725..e2360fb538 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.h +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.h @@ -4,7 +4,7 @@ class CQuotesProviderVisitorFormater : public CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitorFormater(HCONTACT hContact,TCHAR chr,int nWidth);
+ CQuotesProviderVisitorFormater(MCONTACT hContact,TCHAR chr,int nWidth);
~CQuotesProviderVisitorFormater();
const tstring& GetResult()const;
@@ -21,7 +21,7 @@ private: // void FormatChangeValueHelper(bool bPercentage);
private:
- HCONTACT m_hContact;
+ MCONTACT 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 0f53784953..d5495abc16 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp @@ -1,6 +1,6 @@ #include "stdafx.h"
-CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(HCONTACT hContact,TCHAR chr)
+CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(MCONTACT 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 48411d6a4b..d3d1b34b1c 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorTendency.h +++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.h @@ -4,7 +4,7 @@ class CQuotesProviderVisitorTendency : public CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitorTendency(HCONTACT hContact,TCHAR chr);
+ CQuotesProviderVisitorTendency(MCONTACT 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:
- HCONTACT m_hContact;
+ MCONTACT 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 20581b0d89..d7196b7466 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(HCONTACT hContact,const TStrings& rasParsedLine,size_t nIndex,const char* pszDbName)
+ bool get_double_from_parsed_line(MCONTACT 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,HCONTACT> TQuoteID2ContractHandles;
+ typedef std::map<tstring,MCONTACT> TQuoteID2ContractHandles;
TQuoteID2ContractHandles aQuoteID2Handles;
tostringstream oURL;
oURL << sURL << _T("dioksin.txt?s=");
for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HCONTACT hContact = *i;
+ MCONTACT 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())
{
- HCONTACT hContact = it3->second;
+ MCONTACT 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 1acf732f6f..b8194f3cea 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(HCONTACT hContact)
+ void convert_contact_settings(MCONTACT 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(HCONTACT hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
+ for(MCONTACT 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(HCONTACT hContact)const
+CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(MCONTACT 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 50394923cb..68628faa2a 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(HCONTACT hContact)const;
+ TQuotesProviderPtr GetContactProviderPtr(MCONTACT hContact)const;
const TQuotesProviders& GetProviders()const;
private:
diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp index e52be731bd..e100401ece 100644 --- a/plugins/Quotes/src/SettingsDlg.cpp +++ b/plugins/Quotes/src/SettingsDlg.cpp @@ -126,10 +126,10 @@ namespace struct CSettingWindowParam
{
- CSettingWindowParam(HCONTACT hContact) : m_hContact(hContact),m_pPopupSettings(NULL){}
+ CSettingWindowParam(MCONTACT hContact) : m_hContact(hContact),m_pPopupSettings(NULL){}
~CSettingWindowParam(){delete m_pPopupSettings;}
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
CPopupSettings* m_pPopupSettings;
};
@@ -268,7 +268,7 @@ namespace {
case WM_INITDIALOG:
{
- HCONTACT hContact = HCONTACT(lp);
+ MCONTACT hContact = MCONTACT(lp);
TranslateDialogDefault(hWnd);
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS,false);
@@ -393,7 +393,7 @@ namespace case IDOK:
{
CSettingWindowParam* pParam = get_param(hWnd);
- HCONTACT hContact = pParam->m_hContact;
+ MCONTACT hContact = pParam->m_hContact;
bool bUseContactSpec = 1 == ::IsDlgButtonChecked(hWnd,IDC_CHECK_CONTACT_SPECIFIC);
@@ -507,7 +507,7 @@ namespace }
-void ShowSettingsDlg(HCONTACT hContact)
+void ShowSettingsDlg(MCONTACT 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(HCONTACT hContact)
+void CPopupSettings::InitForContact(MCONTACT 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(HCONTACT hContact) m_bUseHistory = 1 == db_get_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_HISTORY_FLAG,m_bUseHistory);
}
-void CPopupSettings::SaveForContact(HCONTACT hContact)const
+void CPopupSettings::SaveForContact(MCONTACT 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(HCONTACT hContact)
+tstring GetContactLogFileName(MCONTACT hContact)
{
tstring result;
@@ -1113,7 +1113,7 @@ tstring GetContactLogFileName(HCONTACT hContact) return result;
}
-tstring GetContactName(HCONTACT hContact)
+tstring GetContactName(MCONTACT 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 355f7bd216..3c17d7038d 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(HCONTACT hContact);
- void SaveForContact(HCONTACT hContact)const;
+ void InitForContact(MCONTACT hContact);
+ void SaveForContact(MCONTACT hContact)const;
EColourMode GetColourMode()const;
void SetColourMode(EColourMode nMode);
@@ -101,7 +101,7 @@ private: mutable CPopupSettings* m_pPopupSettings;
};
-void ShowSettingsDlg(HCONTACT hContact);
+void ShowSettingsDlg(MCONTACT 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(HCONTACT hContact);
-tstring GetContactName(HCONTACT hContact);
+tstring GetContactLogFileName(MCONTACT hContact);
+tstring GetContactName(MCONTACT hContact);
#endif //__E211E4D9_383C_43BE_A787_7EF1D585B90D_SettingsDlg_h__
|