summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15
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
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')
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp46
-rw-r--r--plugins/MirandaG15/src/CAppletManager.h28
-rw-r--r--plugins/MirandaG15/src/CChatScreen.cpp2
-rw-r--r--plugins/MirandaG15/src/CChatScreen.h8
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp58
-rw-r--r--plugins/MirandaG15/src/CContactList.h30
-rw-r--r--plugins/MirandaG15/src/CContactlistScreen.cpp9
-rw-r--r--plugins/MirandaG15/src/CContactlistScreen.h4
-rw-r--r--plugins/MirandaG15/src/CEvent.h2
-rw-r--r--plugins/MirandaG15/src/CEventLog.h2
-rw-r--r--plugins/MirandaG15/src/CEventScreen.cpp2
-rw-r--r--plugins/MirandaG15/src/CIRCHistory.h2
-rw-r--r--plugins/MirandaG15/src/CNotificationScreen.h2
-rw-r--r--plugins/MirandaG15/src/Miranda.h2
14 files changed, 96 insertions, 101 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);
diff --git a/plugins/MirandaG15/src/CAppletManager.h b/plugins/MirandaG15/src/CAppletManager.h
index dee9b96a9e..f3551b41fe 100644
--- a/plugins/MirandaG15/src/CAppletManager.h
+++ b/plugins/MirandaG15/src/CAppletManager.h
@@ -19,7 +19,7 @@
struct SMessageJob
{
HANDLE hEvent;
- HANDLE hContact;
+ HCONTACT hContact;
DWORD dwFlags;
char *pcBuffer;
int iBufferSize;
@@ -59,7 +59,7 @@ public:
void ActivateCreditsScreen();
void ActivateEventScreen();
void ActivateCListScreen();
- bool ActivateChatScreen(HANDLE hContact);
+ bool ActivateChatScreen(HCONTACT hContact);
// hook functions
static int HookMessageWindowEvent(WPARAM wParam, LPARAM lParam);
@@ -73,31 +73,31 @@ public:
static int HookChatInbound(WPARAM wParam,LPARAM lParam);
// check if a contacts message window is opened
- static bool IsMessageWindowOpen(HANDLE hContact);
+ static bool IsMessageWindowOpen(HCONTACT hContact);
// marks the given event as read
- static void MarkMessageAsRead(HANDLE hContact,HANDLE hEvent);
+ static void MarkMessageAsRead(HCONTACT hContact,HANDLE hEvent);
// translates the given database event
static bool TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lParam);
// sends a message to the specified contact
- static HANDLE SendMessageToContact(HANDLE hContact,tstring strMessage);
+ static HANDLE SendMessageToContact(HCONTACT hContact,tstring strMessage);
// sends typing notifications to the specified contact
- static void SendTypingNotification(HANDLE hContact,bool bEnable);
+ static void SendTypingNotification(HCONTACT hContact,bool bEnable);
// returns the contacts message service name
- static char *GetMessageServiceName(HANDLE hContact,bool bIsUnicode);
- static bool IsUtfSendAvailable(HANDLE hContact);
+ static char *GetMessageServiceName(HCONTACT hContact,bool bIsUnicode);
+ static bool IsUtfSendAvailable(HCONTACT hContact);
// returns a formatted timestamp string
static tstring GetFormattedTimestamp(tm *time);
// returns wether or not a contact is a subcontact
- static bool IsSubContact(HANDLE hContact);
+ static bool IsSubContact(HCONTACT hContact);
// returns the contacts group
- static tstring GetContactGroup(HANDLE hContact);
+ static tstring GetContactGroup(HCONTACT hContact);
// returns the contacts displayname
- static tstring GetContactDisplayname(HANDLE hContact,bool bShortened=false);
+ static tstring GetContactDisplayname(HCONTACT hContact,bool bShortened=false);
// returns the history class for the specified IRC channel
- CIRCHistory *GetIRCHistory(HANDLE hContact);
+ CIRCHistory *GetIRCHistory(HCONTACT hContact);
CIRCHistory *GetIRCHistoryByName(tstring strProtocol,tstring strChannel);
// returns the IRC connection class for the specified protocol
@@ -118,9 +118,9 @@ public:
private:
list<CIRCHistory*> m_LIRCHistorys;
// deletes the history class for the specified IRC channel
- void DeleteIRCHistory(HANDLE hContact);
+ void DeleteIRCHistory(HCONTACT hContact);
// creates a history class for the specified IRC channel
- CIRCHistory *CreateIRCHistory(HANDLE hContact,tstring strChannel);
+ CIRCHistory *CreateIRCHistory(HCONTACT hContact,tstring strChannel);
CIRCHistory *CreateIRCHistoryByName(tstring strProtocol,tstring strChannel);
// activate a screen
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp
index dc87294e26..9fb9acb88b 100644
--- a/plugins/MirandaG15/src/CChatScreen.cpp
+++ b/plugins/MirandaG15/src/CChatScreen.cpp
@@ -224,7 +224,7 @@ HANDLE CChatScreen::GetContact()
//************************************************************************
// sets the screen's chat contact
//************************************************************************
-bool CChatScreen::SetContact(HANDLE hContact)
+bool CChatScreen::SetContact(HCONTACT hContact)
{
if(hContact == NULL)
{
diff --git a/plugins/MirandaG15/src/CChatScreen.h b/plugins/MirandaG15/src/CChatScreen.h
index 7af002e46c..6a29dea079 100644
--- a/plugins/MirandaG15/src/CChatScreen.h
+++ b/plugins/MirandaG15/src/CChatScreen.h
@@ -44,7 +44,7 @@ public:
void OnSizeChanged();
// Set's the chat contact
- bool SetContact(HANDLE hContact);
+ bool SetContact(HCONTACT hContact);
// returns the chat contact
HANDLE GetContact();
@@ -92,10 +92,10 @@ protected:
DWORD m_dwMaximizedTimer;
DWORD m_dwMaximizedDuration;
- HANDLE m_hContact;
- HANDLE m_hMessage;
+ HCONTACT m_hContact;
+ HANDLE m_hMessage;
- int m_iStatus;
+ int m_iStatus;
CLCDLabel m_UserProto;
CLCDLabel m_UserName;
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index e22f1a868d..bf3469ed95 100644
--- a/plugins/MirandaG15/src/CContactList.cpp
+++ b/plugins/MirandaG15/src/CContactList.cpp
@@ -78,12 +78,12 @@ CContactListEntry *CContactList::GetContactData(CListEntry<CContactListEntry*,CC
//************************************************************************
// returns the contacts group path
//************************************************************************
-tstring CContactList::GetContactGroupPath(HANDLE hContact)
+tstring CContactList::GetContactGroupPath(HCONTACT hContact)
{
tstring strGroup = _T("");
if(db_get_b(0, "MetaContacts", "Enabled", 1) && CAppletManager::IsSubContact(hContact))
{
- HANDLE hMetaContact = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL);
+ HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL);
if(CConfig::GetBoolSetting(CLIST_USEGROUPS))
strGroup = CAppletManager::GetContactGroup(hMetaContact);
@@ -98,7 +98,7 @@ tstring CContactList::GetContactGroupPath(HANDLE hContact)
//************************************************************************
// adds a contact to the list
//************************************************************************
-void CContactList::AddContact(HANDLE hContact)
+void CContactList::AddContact(HCONTACT hContact)
{
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup = NULL;
@@ -151,15 +151,16 @@ void CContactList::AddContact(HANDLE hContact)
// check that all subcontacts exist
int numContacts = CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0);
- HANDLE hSubContact = NULL;
+ HCONTACT hSubContact = NULL;
for(int i=0;i<numContacts;i++) {
- hSubContact = (HANDLE *) CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)i);
+ hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)i);
RemoveContact(hSubContact);
AddContact(hSubContact);
}
return;
- } else if(CAppletManager::IsSubContact(hContact)) {
- HANDLE hMetaContact = (HANDLE *) CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ }
+ else if(CAppletManager::IsSubContact(hContact)) {
+ HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
// check that the metacontact exists
if(!FindContact(hMetaContact)) {
AddContact(hMetaContact);
@@ -204,11 +205,9 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) {
} else {
if(pEntry->iStatus == ID_STATUS_OFFLINE) {
DWORD dwNumContacts = (DWORD)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)pEntry->hHandle,0);
- HANDLE hSubContact = NULL;
- char *szProto;
for(DWORD i = 0; i < dwNumContacts; i++) {
- hSubContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)pEntry->hHandle,i);
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hSubContact,0);
+ HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)pEntry->hHandle,i);
+ char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hSubContact,0);
if(db_get_w(hSubContact,szProto,"Status",ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
return true;
}
@@ -223,10 +222,9 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) {
if(db_get_b(pEntry->hHandle,"CList","Hidden",0))
return false;
else if(CAppletManager::IsSubContact(pEntry->hHandle)) {
- HANDLE hMetaContact = (HANDLE) CallService(MS_MC_GETMETACONTACT, (WPARAM)pEntry->hHandle, 0);
- if(db_get_b(hMetaContact,"CList","Hidden",0)) {
+ HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)pEntry->hHandle, 0);
+ if(db_get_b(hMetaContact,"CList","Hidden",0))
return false;
- }
}
}
@@ -243,7 +241,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) {
//************************************************************************
// removes a contact from the list
//************************************************************************
-void CContactList::RemoveContact(HANDLE hContact) {
+void CContactList::RemoveContact(HCONTACT hContact) {
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup = NULL;
///tstring strGroup = GetContactGroupPath(hContact);
@@ -282,12 +280,10 @@ void CContactList::RemoveContact(HANDLE hContact) {
pGroup->RemoveGroup(((CListContainer<CContactListEntry*,CContactListGroup*>*)pContactEntry)->GetGroupData());
// Reenumerate all subcontacts (maybe MetaContacts was disabled
int numContacts = CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0);
- HANDLE hSubContact = NULL;
for(int i=0;i<numContacts;i++) {
- hSubContact = (HANDLE *) CallService(MS_MC_GETSUBCONTACT,(WPARAM)hContact, (LPARAM)i);
- if(!FindContact(hSubContact)) {
+ HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)hContact, (LPARAM)i);
+ if(!FindContact(hSubContact))
AddContact(hSubContact);
- }
}
}
@@ -370,7 +366,7 @@ CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::AddGroupByS
//************************************************************************
// returns the contact's status
//************************************************************************
-int CContactList::GetContactStatus(HANDLE hContact)
+int CContactList::GetContactStatus(HCONTACT hContact)
{
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
if(!pContactEntry)
@@ -554,7 +550,7 @@ void CContactList::RefreshList()
m_bUseMetaContacts = db_get_b(NULL,"MetaContacts","Enabled",1);
CListEntry<CContactListEntry*,CContactListGroup*> *pContactEntry = NULL;
- HANDLE hContact = db_find_first();
+ HCONTACT hContact = db_find_first();
while(hContact != NULL)
{
pContactEntry = FindContact(hContact);
@@ -623,7 +619,7 @@ CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::FindGroupIn
//************************************************************************
// returns the entry for the specified handle
//************************************************************************
-CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContact(HANDLE hContact)
+CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContact(HCONTACT hContact)
{
if(hContact == NULL)
return NULL;
@@ -634,7 +630,7 @@ CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContact(HAN
//************************************************************************
// returns the entry for the specified handle
//************************************************************************
-CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContactInGroup(HANDLE hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup)
+CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContactInGroup(HCONTACT hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup)
{
if(hContact == NULL)
return NULL;
@@ -670,7 +666,7 @@ CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContactInGr
//************************************************************************
// called when a contacts hidden flag has changed
//************************************************************************
-void CContactList::OnContactHiddenChanged(HANDLE hContact, bool bHidden)
+void CContactList::OnContactHiddenChanged(HCONTACT hContact, bool bHidden)
{
CListEntry<CContactListEntry*,CContactListGroup*> *pContactEntry = FindContact(hContact);
@@ -689,7 +685,7 @@ void CContactList::OnContactHiddenChanged(HANDLE hContact, bool bHidden)
//************************************************************************
// called when a contacts nickname has changed
//************************************************************************
-void CContactList::OnContactNickChanged(HANDLE hContact, tstring strNick)
+void CContactList::OnContactNickChanged(HCONTACT hContact, tstring strNick)
{
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
if(!pContactEntry)
@@ -715,7 +711,7 @@ void CContactList::OnContactNickChanged(HANDLE hContact, tstring strNick)
//************************************************************************
// called when a contacts status has changed
//************************************************************************
-void CContactList::OnStatusChange(HANDLE hContact,int iStatus)
+void CContactList::OnStatusChange(HCONTACT hContact,int iStatus)
{
// find the entry in the list
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
@@ -768,7 +764,7 @@ void CContactList::OnStatusChange(HANDLE hContact,int iStatus)
//************************************************************************
// called when the contacts message count has changed
//************************************************************************
-void CContactList::OnMessageCountChanged(HANDLE hContact)
+void CContactList::OnMessageCountChanged(HCONTACT hContact)
{
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
if(!pContactEntry)
@@ -788,7 +784,7 @@ void CContactList::OnMessageCountChanged(HANDLE hContact)
//************************************************************************
// called when a contact has been added
//************************************************************************
-void CContactList::OnContactAdded(HANDLE hContact)
+void CContactList::OnContactAdded(HCONTACT hContact)
{
// Update the list
AddContact(hContact);
@@ -809,7 +805,7 @@ void CContactList::OnContactAdded(HANDLE hContact)
//************************************************************************
// called when a contact has been deleted
//************************************************************************
-void CContactList::OnContactDeleted(HANDLE hContact)
+void CContactList::OnContactDeleted(HCONTACT hContact)
{
// Update the list
RemoveContact(hContact);
@@ -833,7 +829,7 @@ void CContactList::OnContactDeleted(HANDLE hContact)
//************************************************************************
// called when a contacts group has changed
//************************************************************************
-void CContactList::OnContactGroupChanged(HANDLE hContact,tstring strGroup)
+void CContactList::OnContactGroupChanged(HCONTACT hContact,tstring strGroup)
{
bool bMetaContact = false;
@@ -1017,7 +1013,7 @@ void CContactList::InitializeGroupObjects()
int res = 0;
CContactListGroup *pGroup = NULL;
- HANDLE hContact = db_find_first();
+ HCONTACT hContact = db_find_first();
HANDLE hMetaContact = NULL;
char *szProto = NULL;
while(hContact != NULL)
diff --git a/plugins/MirandaG15/src/CContactList.h b/plugins/MirandaG15/src/CContactList.h
index 75b129f8fc..a86d61852f 100644
--- a/plugins/MirandaG15/src/CContactList.h
+++ b/plugins/MirandaG15/src/CContactList.h
@@ -8,7 +8,7 @@ class CContactListEntry
public:
int iMessages;
tstring strMessages;
- HANDLE hHandle;
+ HCONTACT hHandle;
tstring strName;
tstring strProto;
tstring strStatus;
@@ -25,7 +25,7 @@ public:
int iOnline;
int iEvents;
- HANDLE hMetaContact;
+ HCONTACT hMetaContact;
CContactListEntry *pContactListEntry;
};
@@ -43,23 +43,23 @@ public:
bool Shutdown();
// called when a contact has been added
- void OnContactAdded(HANDLE hContact);
+ void OnContactAdded(HCONTACT hContact);
// called when a contact has been deleted
- void OnContactDeleted(HANDLE hContact);
+ void OnContactDeleted(HCONTACT hContact);
// called when the configuration has changed
void OnConfigChanged();
// called when a contacts group has changed
- void OnContactGroupChanged(HANDLE hContact,tstring strGroup);
+ void OnContactGroupChanged(HCONTACT hContact,tstring strGroup);
// called when a contacts hidden flag has changed
- void OnContactHiddenChanged(HANDLE hContact, bool bVisibility);
+ void OnContactHiddenChanged(HCONTACT hContact, bool bVisibility);
// called when a contacts nickname has changed
- void OnContactNickChanged(HANDLE hContact, tstring strNick);
+ void OnContactNickChanged(HCONTACT hContact, tstring strNick);
// called when a contacts status has changed
- void OnStatusChange(HANDLE hContact,int iStatus);
+ void OnStatusChange(HCONTACT hContact,int iStatus);
// called when the contacts message count has changed
- void OnMessageCountChanged(HANDLE hContact);
+ void OnMessageCountChanged(HCONTACT hContact);
// returns the contact's status
- int GetContactStatus(HANDLE hContact);
+ int GetContactStatus(HCONTACT hContact);
// Called to compare two entrys
static bool CompareEntries(CListEntry<CContactListEntry*,CContactListGroup*> *pLeft,CListEntry<CContactListEntry*,CContactListGroup*> *pRight);
@@ -72,12 +72,12 @@ public:
bool SetFont(LOGFONT &lf);
protected:
// returns the contacts group path
- tstring GetContactGroupPath(HANDLE hContact);
+ tstring GetContactGroupPath(HCONTACT hContact);
// adds a contact to the list
- void AddContact(HANDLE hContact);
+ void AddContact(HCONTACT hContact);
// removes a contact from the list
- void RemoveContact(HANDLE hContact);
+ void RemoveContact(HCONTACT hContact);
// uninitializes the group objects
void UninitializeGroupObjects();
@@ -101,7 +101,7 @@ protected:
void SortGroup(CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
// tries to find a contact in the specified group
- CListEntry<CContactListEntry*,CContactListGroup*> *FindContactInGroup(HANDLE hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
+ CListEntry<CContactListEntry*,CContactListGroup*> *FindContactInGroup(HCONTACT hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
// tries to find a group in the specified group
CListContainer<CContactListEntry*,CContactListGroup*> *FindGroupInGroup(tstring strGroup,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
@@ -117,7 +117,7 @@ protected:
void RefreshList();
// returns the entry for the specified handle
- CListEntry<CContactListEntry*,CContactListGroup*> *FindContact(HANDLE hContact);
+ CListEntry<CContactListEntry*,CContactListGroup*> *FindContact(HCONTACT hContact);
// returns the entry for the specified group name
CListContainer<CContactListEntry*,CContactListGroup*> *FindGroup(tstring strGroup);
diff --git a/plugins/MirandaG15/src/CContactlistScreen.cpp b/plugins/MirandaG15/src/CContactlistScreen.cpp
index b9cbebf5b2..d6e733f651 100644
--- a/plugins/MirandaG15/src/CContactlistScreen.cpp
+++ b/plugins/MirandaG15/src/CContactlistScreen.cpp
@@ -85,7 +85,7 @@ bool CContactlistScreen::Draw(CLCDGfx *pGfx)
//************************************************************************
// returns the online status of the specified contact
//************************************************************************
-int CContactlistScreen::GetContactStatus(HANDLE hContact)
+int CContactlistScreen::GetContactStatus(HCONTACT hContact)
{
return m_ContactList.GetContactStatus(hContact);
}
@@ -182,7 +182,7 @@ void CContactlistScreen::OnEventReceived(CEvent *pEvent)
//************************************************************************
// Called when a chat session was opened
//************************************************************************
-void CContactlistScreen::OnSessionOpened(HANDLE hContact)
+void CContactlistScreen::OnSessionOpened(HCONTACT hContact)
{
m_ContactList.OnMessageCountChanged(hContact);
}
@@ -253,11 +253,10 @@ void CContactlistScreen::OnLCDButtonUp(int iButton)
if(pEntry->GetType() == CONTAINER) {
CListContainer<CContactListEntry*,CContactListGroup*> *pContainer = (CListContainer<CContactListEntry*,CContactListGroup*>*)pEntry;
if(pContainer->GetGroupData()->hMetaContact != NULL) {
- if(m_bLongPress) {
+ if(m_bLongPress)
pContainer->ToggleOpen();
- } else {
+ else
CAppletManager::GetInstance()->ActivateChatScreen(pContainer->GetGroupData()->hMetaContact);
- }
}
}
}
diff --git a/plugins/MirandaG15/src/CContactlistScreen.h b/plugins/MirandaG15/src/CContactlistScreen.h
index 3b9a5f6f95..f3ce140267 100644
--- a/plugins/MirandaG15/src/CContactlistScreen.h
+++ b/plugins/MirandaG15/src/CContactlistScreen.h
@@ -26,10 +26,10 @@ public:
void ResetPosition();
// returns the online status of the specified contact
- int GetContactStatus(HANDLE hContact);
+ int GetContactStatus(HCONTACT hContact);
// Called when a chat session was opened
- void OnSessionOpened(HANDLE hContact);
+ void OnSessionOpened(HCONTACT hContact);
// Called when the configuration has changed
void OnConfigChanged();
diff --git a/plugins/MirandaG15/src/CEvent.h b/plugins/MirandaG15/src/CEvent.h
index cf23af037e..81d3b40833 100644
--- a/plugins/MirandaG15/src/CEvent.h
+++ b/plugins/MirandaG15/src/CEvent.h
@@ -53,7 +53,7 @@ public:
enum EventType eType;
DWORD dwFlags;
- HANDLE hContact;
+ HCONTACT hContact;
tm Time;
bool bTime;
diff --git a/plugins/MirandaG15/src/CEventLog.h b/plugins/MirandaG15/src/CEventLog.h
index e5953f92c7..e70d3f6a43 100644
--- a/plugins/MirandaG15/src/CEventLog.h
+++ b/plugins/MirandaG15/src/CEventLog.h
@@ -6,7 +6,7 @@
class CEventLogEntry
{
public:
- HANDLE hContact;
+ HCONTACT hContact;
tstring strValue;
tstring strTimestamp;
tm Time;
diff --git a/plugins/MirandaG15/src/CEventScreen.cpp b/plugins/MirandaG15/src/CEventScreen.cpp
index cda38b07b4..b5656a3188 100644
--- a/plugins/MirandaG15/src/CEventScreen.cpp
+++ b/plugins/MirandaG15/src/CEventScreen.cpp
@@ -187,7 +187,7 @@ void CEventScreen::OnLCDButtonDown(int iButton)
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(toTstring(szProto));
if(pIRCCon && db_get_b(pEntry->hContact, szProto, "ChatRoom", 0) != 0 &&
- db_get_b((HANDLE)pEntry->hContact,"CList","Hidden",0))
+ db_get_b(pEntry->hContact,"CList","Hidden",0))
return;
CAppletManager::GetInstance()->ActivateChatScreen(pEntry->hContact);
diff --git a/plugins/MirandaG15/src/CIRCHistory.h b/plugins/MirandaG15/src/CIRCHistory.h
index 299a80544b..bba2c40fb4 100644
--- a/plugins/MirandaG15/src/CIRCHistory.h
+++ b/plugins/MirandaG15/src/CIRCHistory.h
@@ -14,7 +14,7 @@ class CIRCHistory
public:
tstring strChannel;
tstring strProtocol;
- HANDLE hContact;
+ HCONTACT hContact;
list<SIRCMessage> LMessages;
list<tstring> LUsers;
};
diff --git a/plugins/MirandaG15/src/CNotificationScreen.h b/plugins/MirandaG15/src/CNotificationScreen.h
index 837398238a..7404832205 100644
--- a/plugins/MirandaG15/src/CNotificationScreen.h
+++ b/plugins/MirandaG15/src/CNotificationScreen.h
@@ -14,7 +14,7 @@ public:
tm Time;
tstring strText;
tstring strTitle;
- HANDLE hContact;
+ HCONTACT hContact;
EventType eType;
};
diff --git a/plugins/MirandaG15/src/Miranda.h b/plugins/MirandaG15/src/Miranda.h
index 5b35db47cd..f11db5f7b8 100644
--- a/plugins/MirandaG15/src/Miranda.h
+++ b/plugins/MirandaG15/src/Miranda.h
@@ -1,3 +1,3 @@
extern HINSTANCE hInstance;
-extern char *MsgServiceName(HANDLE hContact,bool bIsUnicode);
+extern char *MsgServiceName(HCONTACT hContact,bool bIsUnicode);