From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - 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 --- plugins/MirandaG15/src/CContactList.cpp | 58 +++++++++++++++------------------ 1 file changed, 27 insertions(+), 31 deletions(-) (limited to 'plugins/MirandaG15/src/CContactList.cpp') 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 *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;iiStatus == 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 *pGroup = NULL; ///tstring strGroup = GetContactGroupPath(hContact); @@ -282,12 +280,10 @@ void CContactList::RemoveContact(HANDLE hContact) { pGroup->RemoveGroup(((CListContainer*)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 *CContactList::AddGroupByS //************************************************************************ // returns the contact's status //************************************************************************ -int CContactList::GetContactStatus(HANDLE hContact) +int CContactList::GetContactStatus(HCONTACT hContact) { CListEntry *pContactEntry = FindContact(hContact); if(!pContactEntry) @@ -554,7 +550,7 @@ void CContactList::RefreshList() m_bUseMetaContacts = db_get_b(NULL,"MetaContacts","Enabled",1); CListEntry *pContactEntry = NULL; - HANDLE hContact = db_find_first(); + HCONTACT hContact = db_find_first(); while(hContact != NULL) { pContactEntry = FindContact(hContact); @@ -623,7 +619,7 @@ CListContainer *CContactList::FindGroupIn //************************************************************************ // returns the entry for the specified handle //************************************************************************ -CListEntry *CContactList::FindContact(HANDLE hContact) +CListEntry *CContactList::FindContact(HCONTACT hContact) { if(hContact == NULL) return NULL; @@ -634,7 +630,7 @@ CListEntry *CContactList::FindContact(HAN //************************************************************************ // returns the entry for the specified handle //************************************************************************ -CListEntry *CContactList::FindContactInGroup(HANDLE hContact,CListContainer *pGroup) +CListEntry *CContactList::FindContactInGroup(HCONTACT hContact,CListContainer *pGroup) { if(hContact == NULL) return NULL; @@ -670,7 +666,7 @@ CListEntry *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 *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 *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 *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 *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) -- cgit v1.2.3