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 --- src/modules/chat/chat.h | 26 +++++++++++++------------- src/modules/chat/chat_svc.cpp | 16 ++++++++-------- src/modules/chat/clist.cpp | 24 ++++++++++++------------ src/modules/chat/tools.cpp | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'src/modules/chat') diff --git a/src/modules/chat/chat.h b/src/modules/chat/chat.h index de8dac8906..d79accdc35 100644 --- a/src/modules/chat/chat.h +++ b/src/modules/chat/chat.h @@ -55,18 +55,18 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData); char* Log_SetStyle(int style); // clist.c -BOOL AddEvent(HANDLE hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ...); -HANDLE AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType); -HANDLE FindRoom(const char *pszModule, const TCHAR *pszRoom); -BOOL SetAllOffline(BOOL bHide, const char *pszModule); -BOOL SetOffline(HANDLE hContact, BOOL bHide); - -int RoomDoubleclicked(WPARAM wParam,LPARAM lParam); -INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam); -INT_PTR JoinChat(WPARAM wParam, LPARAM lParam); -INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam); -int PrebuildContactMenu(WPARAM wParam, LPARAM lParam); -INT_PTR PrebuildContactMenuSvc(WPARAM wParam, LPARAM lParam); +BOOL AddEvent(HCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ...); +HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType); +HCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom); +BOOL SetAllOffline(BOOL bHide, const char *pszModule); +BOOL SetOffline(HCONTACT hContact, BOOL bHide); + +int RoomDoubleclicked(WPARAM wParam,LPARAM lParam); +INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam); +INT_PTR JoinChat(WPARAM wParam, LPARAM lParam); +INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam); +int PrebuildContactMenu(WPARAM wParam, LPARAM lParam); +INT_PTR PrebuildContactMenuSvc(WPARAM wParam, LPARAM lParam); // options.c int OptionsInit(void); @@ -99,7 +99,7 @@ BOOL IsEventSupported(int eventType); BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce); BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce); BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce); -int ShowPopup(HANDLE hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...); +int ShowPopup(HCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...); const TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2); diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index b999172b4d..f69a06b75c 100644 --- a/src/modules/chat/chat_svc.cpp +++ b/src/modules/chat/chat_svc.cpp @@ -133,20 +133,20 @@ static INT_PTR Service_GetInfo(WPARAM wParam, LPARAM lParam) mir_cslock lck(cs); SESSION_INFO *si; - if (gci->Flags & BYINDEX) + if (gci->Flags & GCF_BYINDEX) si = ci.SM_FindSessionByIndex(gci->pszModule, gci->iItem); else si = ci.SM_FindSession(gci->pszID, gci->pszModule); if (si == NULL) return 1; - if (gci->Flags & DATA) gci->dwItemData = si->dwItemData; - if (gci->Flags & HCONTACT) gci->hContact = si->hContact; - if (gci->Flags & TYPE) gci->iType = si->iType; - if (gci->Flags & COUNT) gci->iCount = si->nUsersInNicklist; - if (gci->Flags & USERS) gci->pszUsers = ci.SM_GetUsers(si); - if (gci->Flags & ID) gci->pszID = si->ptszID; - if (gci->Flags & NAME) gci->pszName = si->ptszName; + if (gci->Flags & GCF_DATA) gci->dwItemData = si->dwItemData; + if (gci->Flags & GCF_HCONTACT) gci->hContact = si->hContact; + if (gci->Flags & GCF_TYPE) gci->iType = si->iType; + if (gci->Flags & GCF_COUNT) gci->iCount = si->nUsersInNicklist; + if (gci->Flags & GCF_USERS) gci->pszUsers = ci.SM_GetUsers(si); + if (gci->Flags & GCF_ID) gci->pszID = si->ptszID; + if (gci->Flags & GCF_NAME) gci->pszName = si->ptszName; return 0; } diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index 90d507a39f..cbd9fbd262 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "chat.h" -HANDLE AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType) +HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType) { TCHAR pszGroup[50]; *pszGroup = '\0'; ptrT groupName(db_get_tsa(NULL, CHAT_MODULE, "AddToGroup")); @@ -42,7 +42,7 @@ HANDLE AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisp } } - HANDLE hContact = ci.FindRoom(pszModule, pszRoom); + HCONTACT hContact = ci.FindRoom(pszModule, pszRoom); if (hContact) { //contact exist, make sure it is in the right group if (pszGroup[0]) { ptrT grpName(db_get_tsa(hContact, "CList", "Group")); @@ -56,7 +56,7 @@ HANDLE AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisp } // here we create a new one since no one is to be found - if ((hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL) + if ((hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL) return NULL; CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)pszModule); @@ -71,7 +71,7 @@ HANDLE AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisp return hContact; } -BOOL SetOffline(HANDLE hContact, BOOL bHide) +BOOL SetOffline(HCONTACT hContact, BOOL bHide) { if (hContact) { char *szProto = GetContactProto(hContact); @@ -85,7 +85,7 @@ BOOL SetOffline(HANDLE hContact, BOOL bHide) BOOL SetAllOffline(BOOL bHide, const char *pszModule) { - for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { char *szProto = GetContactProto(hContact); if (!ci.MM_FindModule(szProto)) continue; @@ -103,7 +103,7 @@ BOOL SetAllOffline(BOOL bHide, const char *pszModule) int RoomDoubleclicked(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (!hContact) return 0; @@ -141,7 +141,7 @@ INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam) INT_PTR JoinChat(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (hContact) { char *szProto = GetContactProto(hContact); if (szProto) { @@ -157,7 +157,7 @@ INT_PTR JoinChat(WPARAM wParam, LPARAM lParam) INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (hContact) { char *szProto = GetContactProto(hContact); if (szProto) @@ -168,7 +168,7 @@ INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam) int PrebuildContactMenu(WPARAM wParam, LPARAM) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (hContact == NULL) return 0; @@ -201,7 +201,7 @@ INT_PTR PrebuildContactMenuSvc(WPARAM wParam, LPARAM lParam) return PrebuildContactMenu(wParam, lParam); } -BOOL AddEvent(HANDLE hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ... ) +BOOL AddEvent(HCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ... ) { TCHAR szBuf[4096]; @@ -233,9 +233,9 @@ BOOL AddEvent(HANDLE hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, return TRUE; } -HANDLE FindRoom(const char *pszModule, const TCHAR *pszRoom) +HCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom) { - for (HANDLE hContact = db_find_first(pszModule); hContact; hContact = db_find_next(hContact, pszModule)) { + for (HCONTACT hContact = db_find_first(pszModule); hContact; hContact = db_find_next(hContact, pszModule)) { if (!db_get_b(hContact, pszModule, "ChatRoom", 0)) continue; diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index 23980a5e91..9001e5678b 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -166,7 +166,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA return DefWindowProc(hWnd, message, wParam, lParam); } -int ShowPopup(HANDLE hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...) +int ShowPopup(HCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...) { static TCHAR szBuf[4 * 1024]; -- cgit v1.2.3