summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/CAppletManager.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/MirandaG15/src/CAppletManager.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/MirandaG15/src/CAppletManager.cpp')
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 48f861b2c9..17399ad465 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -445,7 +445,7 @@ void CAppletManager::ActivateCListScreen()
//************************************************************************
// activates the chat screen
//************************************************************************
-bool CAppletManager::ActivateChatScreen(HANDLE hContact)
+bool CAppletManager::ActivateChatScreen(HCONTACT hContact)
{
if(!m_ChatScreen.SetContact(hContact))
return false;
@@ -461,7 +461,7 @@ bool CAppletManager::ActivateChatScreen(HANDLE hContact)
//************************************************************************
// returns the contacts displayname
//************************************************************************
-tstring CAppletManager::GetContactDisplayname(HANDLE hContact,bool bShortened)
+tstring CAppletManager::GetContactDisplayname(HCONTACT hContact,bool bShortened)
{
if(!bShortened || !CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF))
return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
@@ -476,7 +476,7 @@ tstring CAppletManager::GetContactDisplayname(HANDLE hContact,bool bShortened)
//************************************************************************
// returns the contacts group
//************************************************************************
-tstring CAppletManager::GetContactGroup(HANDLE hContact)
+tstring CAppletManager::GetContactGroup(HCONTACT hContact)
{
DBVARIANT dbv;
int res = db_get_ts(hContact, "CList", "Group", &dbv);
@@ -649,7 +649,7 @@ void CAppletManager::HandleEvent(CEvent *pEvent)
}
}
-bool CAppletManager::IsUtfSendAvailable(HANDLE hContact) {
+bool CAppletManager::IsUtfSendAvailable(HCONTACT hContact) {
char* szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
if ( szProto == NULL )
return FALSE;
@@ -660,7 +660,7 @@ bool CAppletManager::IsUtfSendAvailable(HANDLE hContact) {
//************************************************************************
// returns the contacts message service name
//************************************************************************
-char *CAppletManager::GetMessageServiceName(HANDLE hContact,bool bIsUnicode)
+char *CAppletManager::GetMessageServiceName(HCONTACT hContact,bool bIsUnicode)
{
char szServiceName[100];
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
@@ -785,7 +785,7 @@ void CAppletManager::CancelMessageJob(SMessageJob *pJob)
//************************************************************************
// returns wether or not a contact is a subcontact
//************************************************************************
-bool CAppletManager::IsSubContact(HANDLE hContact)
+bool CAppletManager::IsSubContact(HCONTACT hContact)
{
if(!db_get_b(0, "MetaContacts", "Enabled", 1))
return false;
@@ -798,7 +798,7 @@ bool CAppletManager::IsSubContact(HANDLE hContact)
//************************************************************************
// sends typing notifications to the specified contact
//************************************************************************
-void CAppletManager::SendTypingNotification(HANDLE hContact,bool bEnable)
+void CAppletManager::SendTypingNotification(HCONTACT hContact,bool bEnable)
{
DWORD protoStatus;
DWORD protoCaps;
@@ -841,7 +841,7 @@ void CAppletManager::SendTypingNotification(HANDLE hContact,bool bEnable)
//************************************************************************
// sends a message to the specified contact
//************************************************************************
-HANDLE CAppletManager::SendMessageToContact(HANDLE hContact,tstring strMessage)
+HANDLE CAppletManager::SendMessageToContact(HCONTACT hContact,tstring strMessage)
{
tstring strAscii = _A2T(toNarrowString(strMessage).c_str());
int bufSize = lstrlen(strAscii.c_str())+1;
@@ -859,7 +859,7 @@ HANDLE CAppletManager::SendMessageToContact(HANDLE hContact,tstring strMessage)
GCDEST gcd = { szProto, 0, GC_EVENT_SENDMESSAGE };
DBVARIANT dbv;
- if (!db_get_ts((HANDLE)hContact, szProto, "Nick", &dbv))
+ if (!db_get_ts(hContact, szProto, "Nick", &dbv))
gcd.ptszID = dbv.ptszVal;
else
return NULL;
@@ -924,7 +924,7 @@ HANDLE CAppletManager::SendMessageToContact(HANDLE hContact,tstring strMessage)
//************************************************************************
// check if a contacts message window is opened
//************************************************************************
-bool CAppletManager::IsMessageWindowOpen(HANDLE hContact)
+bool CAppletManager::IsMessageWindowOpen(HCONTACT hContact)
{
MessageWindowInputData mwid;
mwid.cbSize = sizeof(MessageWindowInputData);
@@ -942,7 +942,7 @@ bool CAppletManager::IsMessageWindowOpen(HANDLE hContact)
//************************************************************************
// marks the given message as read
//************************************************************************
-void CAppletManager::MarkMessageAsRead(HANDLE hContact,HANDLE hEvent)
+void CAppletManager::MarkMessageAsRead(HCONTACT hContact,HANDLE hEvent)
{
db_event_markRead(hContact, hEvent);
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hEvent);
@@ -953,7 +953,7 @@ void CAppletManager::MarkMessageAsRead(HANDLE hContact,HANDLE hEvent)
//************************************************************************
bool CAppletManager::TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
HANDLE hdbevent = (HANDLE)lParam;
@@ -1163,7 +1163,7 @@ CIRCConnection *CAppletManager::CreateIRCConnection(tstring strProtocol)
//************************************************************************
// returns the history class for the specified IRC channel
//************************************************************************
-CIRCHistory *CAppletManager::GetIRCHistory(HANDLE hContact)
+CIRCHistory *CAppletManager::GetIRCHistory(HCONTACT hContact)
{
list<CIRCHistory*>::iterator iter = m_LIRCHistorys.begin();
while(iter != m_LIRCHistorys.end())
@@ -1190,7 +1190,7 @@ CIRCHistory *CAppletManager::GetIRCHistoryByName(tstring strProtocol,tstring str
//************************************************************************
// deletes the history class for the specified IRC channel
//************************************************************************
-void CAppletManager::DeleteIRCHistory(HANDLE hContact)
+void CAppletManager::DeleteIRCHistory(HCONTACT hContact)
{
list<CIRCHistory*>::iterator iter = m_LIRCHistorys.begin();
while(iter != m_LIRCHistorys.end())
@@ -1214,7 +1214,7 @@ void CAppletManager::DeleteIRCHistory(HANDLE hContact)
//************************************************************************
// creates a history class for the specified IRC channel
//************************************************************************
-CIRCHistory *CAppletManager::CreateIRCHistory(HANDLE hContact,tstring strChannel)
+CIRCHistory *CAppletManager::CreateIRCHistory(HCONTACT hContact,tstring strChannel)
{
char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if(!szProto)
@@ -1582,7 +1582,7 @@ int CAppletManager::HookMessageWindowEvent(WPARAM wParam, LPARAM lParam)
//************************************************************************
int CAppletManager::HookContactIsTyping(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
int iState = (int)lParam;
CEvent Event;
@@ -1621,7 +1621,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam)
// Prepare message and append to queue
CEvent Event;
- Event.hContact = (HANDLE)wParam;
+ Event.hContact = (HCONTACT)wParam;
int iStatus = cws->value.wVal;
Event.iValue = iStatus;
@@ -1821,7 +1821,7 @@ int CAppletManager::HookContactAdded(WPARAM wParam, LPARAM lParam)
{
CEvent Event;
Event.eType = EVENT_CONTACT_ADDED;
- Event.hContact = (HANDLE)wParam;
+ Event.hContact = (HCONTACT)wParam;
CAppletManager::GetInstance()->HandleEvent(&Event);
return 0;
@@ -1834,7 +1834,7 @@ int CAppletManager::HookContactDeleted(WPARAM wParam, LPARAM lParam)
{
CEvent Event;
Event.eType = EVENT_CONTACT_DELETED;
- Event.hContact = (HANDLE)wParam;
+ Event.hContact = (HCONTACT)wParam;
Event.bNotification = CConfig::GetBoolSetting(NOTIFY_CONTACTS);
Event.bLog = Event.bNotification;
@@ -1854,7 +1854,7 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam)
DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
CEvent Event;
- Event.hContact = (HANDLE)wParam;
+ Event.hContact = (HCONTACT)wParam;
if(!lstrcmpA(dbcws->szModule,"MetaContacts"))
{
@@ -1865,7 +1865,7 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam)
if(!lstrcmpA(dbcws->szSetting,"IsSubcontact")) {
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts((HANDLE)wParam, "CList", "Group", &dbv);
+ int res = db_get_ts((HCONTACT)wParam, "CList", "Group", &dbv);
if(!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);
@@ -1910,13 +1910,13 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam)
if(!lstrcmpA(dbcws->szSetting,"Hidden"))
{
Event.eType = EVENT_CONTACT_HIDDEN;
- Event.iValue = db_get_b((HANDLE)wParam,"CList","Hidden",0);
+ Event.iValue = db_get_b((HCONTACT)wParam,"CList","Hidden",0);
}
else if(!lstrcmpA(dbcws->szSetting,"Group"))
{
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts((HANDLE)wParam, "CList", "Group", &dbv);
+ int res = db_get_ts((HCONTACT)wParam, "CList", "Group", &dbv);
if(!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);