summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp8
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp32
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp10
-rw-r--r--protocols/Gadu-Gadu/src/filetransfer.cpp52
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/gg.h4
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp42
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.h68
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp26
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp10
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/links.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp2
13 files changed, 133 insertions, 133 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index 6cadef414a..3072de1898 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -26,7 +26,7 @@
//////////////////////////////////////////////////////////
// Avatars support
-void GGPROTO::getAvatarFilename(HCONTACT hContact, TCHAR *pszDest, int cbLen)
+void GGPROTO::getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName);
@@ -142,7 +142,7 @@ char *gg_avatarhash(char *param)
return bin2hex(digest, sizeof(digest), result);
}
-void GGPROTO::requestAvatarTransfer(HCONTACT hContact, char *szAvatarURL)
+void GGPROTO::requestAvatarTransfer(MCONTACT hContact, char *szAvatarURL)
{
if (pth_avatar.dwThreadId == NULL) {
debugLogA("requestAvatarTransfer(): Can not list_add element to avatar_transfers list. No pth_avatar.dwThreadId");
@@ -159,7 +159,7 @@ void GGPROTO::requestAvatarTransfer(HCONTACT hContact, char *szAvatarURL)
gg_LeaveCriticalSection(&avatar_mutex, "requestAvatarTransfer", 1, 1, "avatar_mutex", 1);
}
-void GGPROTO::requestAvatarInfo(HCONTACT hContact, int iWaitFor)
+void GGPROTO::requestAvatarInfo(MCONTACT hContact, int iWaitFor)
{
if (pth_avatar.dwThreadId == NULL) {
debugLogA("requestAvatarInfo(): Can not list_add element to avatar_requests list. No pth_avatar.dwThreadId");
@@ -192,7 +192,7 @@ void __cdecl GGPROTO::avatarrequestthread(void*)
if (avatar_requests.getCount()) {
GGREQUESTAVATARDATA *data = avatar_requests[0];
int iWaitFor = data->iWaitFor;
- HCONTACT hContact = data->hContact;
+ MCONTACT hContact = data->hContact;
avatar_requests.remove(0);
mir_free(data);
gg_LeaveCriticalSection(&avatar_mutex, "avatarrequestthread", 3, 1, "avatar_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index 2c210c57a7..c6983d0665 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -628,7 +628,7 @@ retry:
const char *__status = gg_pubdir50_get(res, i, GG_PUBDIR50_STATUS);
uin_t uin = __fmnumber ? atoi(__fmnumber) : 0;
- HCONTACT hContact = (res->seq == GG_SEQ_CHINFO) ? NULL : getcontact(uin, 0, 0, NULL);
+ MCONTACT hContact = (res->seq == GG_SEQ_CHINFO) ? NULL : getcontact(uin, 0, 0, NULL);
debugLogA("mainthread() (%x): Search result for uin %d, seq %d.", this, uin, res->seq);
if (res->seq == GG_SEQ_SEARCH)
{
@@ -766,7 +766,7 @@ retry:
// Status (version >= 6.0)
case GG_EVENT_STATUS60:
{
- HCONTACT hContact = getcontact(e->event.status60.uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(e->event.status60.uin, 0, 0, NULL);
int oldstatus = getWord(hContact, GG_KEY_STATUS, (WORD)ID_STATUS_OFFLINE);
uin_t uin = (uin_t)getDword(GG_KEY_UIN, 0);
@@ -991,7 +991,7 @@ retry:
// Get rid of empty image
if (e->event.image_reply.size && e->event.image_reply.image)
{
- HCONTACT hContact = getcontact(e->event.image_reply.sender, 1, 0, NULL);
+ MCONTACT hContact = getcontact(e->event.image_reply.sender, 1, 0, NULL);
void *img = (void *)img_loadpicture(e, 0);
if (!img)
@@ -1064,7 +1064,7 @@ retry:
pre.tszDescription = filenameT;
pre.ptszFiles = &filenameT;
pre.lParam = (LPARAM)dcc7;
- ProtoChainRecvFile((HCONTACT)dcc7->contact, &pre);
+ ProtoChainRecvFile((MCONTACT)dcc7->contact, &pre);
mir_free(filenameT);
e->event.dcc7_new = NULL;
@@ -1078,7 +1078,7 @@ retry:
if (dcc7->type == GG_SESSION_DCC7_SEND)
{
debugLogA("mainthread() (%x): File transfer denied by client %d (reason = %d).", this, dcc7->peer_uin, e->event.dcc7_reject.reason);
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
// Remove from watches and free
gg_EnterCriticalSection(&ft_mutex, "mainthread", 21, "ft_mutex", 1);
@@ -1139,7 +1139,7 @@ retry:
}
if (dcc7->contact)
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Free dcc
gg_dcc7_free(dcc7);
@@ -1186,7 +1186,7 @@ retry:
case GG_EVENT_TYPING_NOTIFICATION:
{
- HCONTACT hContact = getcontact(e->event.typing_notification.uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(e->event.typing_notification.uin, 0, 0, NULL);
#ifdef DEBUGMODE
debugLogA("mainthread() (%x): Typing notification from %d (%d).", this,
e->event.typing_notification.uin, e->event.typing_notification.length);
@@ -1272,7 +1272,7 @@ void GGPROTO::broadcastnewstatus(int newStatus)
// When contact is deleted
int GGPROTO::contactdeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
// Terminate conference if contact is deleted
@@ -1327,7 +1327,7 @@ static TCHAR* sttSettingToTchar( DBVARIANT* value )
int GGPROTO::dbsettingchanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *szProto = NULL;
debugLogA("dbsettingchanged(): fired. szModule=%s szSetting=%s", cws->szModule, cws->szSetting);
@@ -1411,7 +1411,7 @@ void GGPROTO::setalloffline()
debugLogA("setalloffline(): started. Setting buddies offline");
setWord(GG_KEY_STATUS, ID_STATUS_OFFLINE);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
setWord(hContact, GG_KEY_STATUS, ID_STATUS_OFFLINE);
// Clear IP and port settings
delSetting(hContact, GG_KEY_CLIENTIP);
@@ -1427,7 +1427,7 @@ void GGPROTO::setalloffline()
////////////////////////////////////////////////////////////
// All users set offline
-void GGPROTO::notifyuser(HCONTACT hContact, int refresh)
+void GGPROTO::notifyuser(MCONTACT hContact, int refresh)
{
uin_t uin;
if (!hContact) return;
@@ -1469,7 +1469,7 @@ void GGPROTO::notifyuser(HCONTACT hContact, int refresh)
void GGPROTO::notifyall()
{
- HCONTACT hContact;
+ MCONTACT hContact;
int count = 0, cc = 0;
uin_t *uins;
char *types;
@@ -1522,13 +1522,13 @@ void GGPROTO::notifyall()
////////////////////////////////////////////////////////////
// Get contact by uin
-HCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick)
+MCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick)
{
#ifdef DEBUGMODE
debugLogA("getcontact(): uin=%d create=%d inlist=%d", uin, create, inlist);
#endif
// Look for contact in DB
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !isChatRoom(hContact)) {
if (inlist) {
db_unset(hContact, "CList", "NotOnList");
@@ -1540,7 +1540,7 @@ HCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick)
if (!create)
return NULL;
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!hContact) {
debugLog(_T("getcontact(): Failed to create Gadu-Gadu contact %s"), szNick);
return NULL;
@@ -1698,7 +1698,7 @@ void GGPROTO::changecontactstatus(uin_t uin, int status, const TCHAR *idescr, in
#ifdef DEBUGMODE
debugLogA("changecontactstatus(): uin=%d status=%d", uin, status);
#endif
- HCONTACT hContact = getcontact(uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(uin, 0, 0, NULL);
// Check if contact is on list
if (!hContact) return;
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index e0f39d35dc..b4745e0b8e 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -38,7 +38,7 @@ extern INT_PTR CALLBACK gg_userutildlgproc(HWND hwndDlg, UINT msg, WPARAM wParam
#define SVS_TIMEZONE 7
#define SVS_GGVERSION 9
-static void SetValue(HWND hwndDlg, int idCtrl, HCONTACT hContact, char *szModule, char *szSetting, int special, int disableIfUndef)
+static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule, char *szSetting, int special, int disableIfUndef)
{
DBVARIANT dbv = {0};
TCHAR str[256];
@@ -688,7 +688,7 @@ static INT_PTR CALLBACK gg_advoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
struct GGDETAILSDLGDATA
{
GGPROTO *gg;
- HCONTACT hContact;
+ MCONTACT hContact;
int disableUpdate;
int updating;
};
@@ -704,7 +704,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
TranslateDialogDefault(hwndDlg);
dat = (struct GGDETAILSDLGDATA *)mir_alloc(sizeof(struct GGDETAILSDLGDATA));
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->disableUpdate = FALSE;
dat->updating = FALSE;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
@@ -728,7 +728,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
case PSN_INFOCHANGED:
{
char *szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
GGPROTO *gg = dat->gg;
// Show updated message
@@ -902,7 +902,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
int GGPROTO::details_init(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
char* pszTemplate;
if (hContact == NULL){
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp
index 14d4f6bd62..4426f3c9eb 100644
--- a/protocols/Gadu-Gadu/src/filetransfer.cpp
+++ b/protocols/Gadu-Gadu/src/filetransfer.cpp
@@ -60,7 +60,7 @@ void GGPROTO::dccstart()
void GGPROTO::dccconnect(uin_t uin)
{
struct gg_dcc *local_dcc;
- HCONTACT hContact = getcontact(uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(uin, 0, 0, NULL);
DWORD ip, myuin; WORD port;
debugLogA("dccconnect(): Connecting to uin %d.", uin);
@@ -89,7 +89,7 @@ void GGPROTO::dccconnect(uin_t uin)
// THREAD: File transfer fail
struct ftfaildata
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hProcess;
};
@@ -103,7 +103,7 @@ void __cdecl GGPROTO::ftfailthread(void *param)
debugLogA("ftfailthread(): end.");
}
-HANDLE ftfail(GGPROTO *gg, HCONTACT hContact)
+HANDLE ftfail(GGPROTO *gg, MCONTACT hContact)
{
ftfaildata *ft = (ftfaildata*)malloc(sizeof(struct ftfaildata));
#ifdef DEBUGMODE
@@ -273,7 +273,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc->contact;
+ pfts.hContact = (MCONTACT)local_dcc->contact;
pfts.flags = (local_dcc->type == GG_SESSION_DCC_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -286,7 +286,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc->offset;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 3, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
break;
@@ -304,7 +304,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc->contact;
+ pfts.hContact = (MCONTACT)local_dcc->contact;
pfts.flags = (local_dcc->type == GG_SESSION_DCC_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -317,11 +317,11 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc->file_info.size;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 4, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
_close(local_dcc->file_fd); local_dcc->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 5, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -361,7 +361,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
{
_close(local_dcc->file_fd); local_dcc->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 6, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -393,7 +393,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
pre.lParam = (LPARAM)local_dcc;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 7, "ft_mutex", 1);
- ProtoChainRecvFile((HCONTACT)local_dcc->contact, &pre);
+ ProtoChainRecvFile((MCONTACT)local_dcc->contact, &pre);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
mir_free(filenameT);
@@ -503,7 +503,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc7->contact;
+ pfts.hContact = (MCONTACT)local_dcc7->contact;
pfts.flags = (local_dcc7->type == GG_SESSION_DCC7_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -516,7 +516,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc7->offset;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 9, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
break;
@@ -534,7 +534,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc7->contact;
+ pfts.hContact = (MCONTACT)local_dcc7->contact;
pfts.flags = (local_dcc7->type == GG_SESSION_DCC7_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -547,11 +547,11 @@ void __cdecl GGPROTO::dccmainthread(void*)
pfts.currentFileProgress = local_dcc7->size;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 10, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
_close(local_dcc7->file_fd); local_dcc7->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 11, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc7, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -595,7 +595,7 @@ void __cdecl GGPROTO::dccmainthread(void*)
if (local_dcc7->contact) {
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 12, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc7, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
@@ -684,7 +684,7 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
TCHAR error[512];
mir_sntprintf(error, SIZEOF(error), TranslateT("Cannot create transfer file. ERROR: %d: %s (dcc)\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
- ProtoBroadcastAck((HCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
+ ProtoBroadcastAck((MCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
// Free transfer
gg_free_dcc(dcc);
return 0;
@@ -722,7 +722,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
if (iFtRemoveRes == -1)
{
debugLogA("dcc7fileallow(): File transfer denied.");
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
// Free transfer
gg_dcc7_free(dcc7);
return 0;
@@ -736,7 +736,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath)
mir_sntprintf(error, SIZEOF(error), TranslateT("Cannot create transfer file. ERROR: %d: %s (dcc7)\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
gg_dcc7_reject(dcc7, GG_DCC7_REJECT_USER);
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Free transfer
gg_dcc7_free(dcc7);
return 0;
@@ -807,7 +807,7 @@ int GGPROTO::dccfilecancel(HANDLE hTransfer)
gg_LeaveCriticalSection(&ft_mutex, "dccfilecancel", 44, 1, "ft_mutex", 1);
// Send failed info
- ProtoBroadcastAck((HCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
+ ProtoBroadcastAck((MCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
// Close file
if (dcc->file_fd != -1)
{
@@ -837,7 +837,7 @@ int GGPROTO::dcc7filecancel(HANDLE hTransfer)
gg_LeaveCriticalSection(&ft_mutex, "dcc7filecancel", 45, 1, "ft_mutex", 1);
// Send failed info
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Close file
if (dcc7->file_fd != -1)
{
@@ -856,7 +856,7 @@ int GGPROTO::dcc7filecancel(HANDLE hTransfer)
////////////////////////////////////////////////////////////
// File receiving allowed
-HANDLE GGPROTO::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE GGPROTO::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -872,7 +872,7 @@ HANDLE GGPROTO::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*
////////////////////////////////////////////////////////////
// File transfer canceled
-int GGPROTO::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int GGPROTO::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -888,7 +888,7 @@ int GGPROTO::FileCancel(HCONTACT hContact, HANDLE hTransfer)
////////////////////////////////////////////////////////////
// File receiving denied
-int GGPROTO::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int GGPROTO::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -904,7 +904,7 @@ int GGPROTO::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szRe
////////////////////////////////////////////////////////////
// Called when received an file
-int GGPROTO::RecvFile(HCONTACT hContact, PROTOFILEEVENT* pre)
+int GGPROTO::RecvFile(MCONTACT hContact, PROTOFILEEVENT* pre)
{
return Proto_RecvFile(hContact, pre);
}
@@ -912,7 +912,7 @@ int GGPROTO::RecvFile(HCONTACT hContact, PROTOFILEEVENT* pre)
////////////////////////////////////////////////////////////
// Called when user sends a file
-HANDLE GGPROTO::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE GGPROTO::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
char *bslash, *filename;
struct gg_dcc *dcc;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 2945c3c96c..e340b6703b 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -196,7 +196,7 @@ static int gg_modulesloaded(WPARAM wParam, LPARAM lParam)
//////////////////////////////////////////////////////////
// Gets protocol instance associated with a contact
-static GGPROTO* gg_getprotoinstance(HCONTACT hContact)
+static GGPROTO* gg_getprotoinstance(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -213,7 +213,7 @@ static GGPROTO* gg_getprotoinstance(HCONTACT hContact)
// Handles PrebuildContactMenu event
static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
GGPROTO* gg = gg_getprotoinstance(hContact);
if (gg == NULL)
return 0;
@@ -232,7 +232,7 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
// Contact block service function
INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
notifyuser(hContact, 1);
return 0;
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h
index d5babd7e52..9240ef7e09 100644
--- a/protocols/Gadu-Gadu/src/gg.h
+++ b/protocols/Gadu-Gadu/src/gg.h
@@ -122,13 +122,13 @@ typedef struct
struct GGREQUESTAVATARDATA
{
- HCONTACT hContact;
+ MCONTACT hContact;
int iWaitFor;
};
struct GGGETAVATARDATA
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *szAvatarURL;
};
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 1d8e211195..b6f55e0db7 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -124,24 +124,24 @@ GGPROTO::~GGPROTO()
//////////////////////////////////////////////////////////
// Dummies for function that have to be implemented
-HCONTACT GGPROTO::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
+MCONTACT GGPROTO::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
int GGPROTO::Authorize(HANDLE hDbEvent) { return 1; }
int GGPROTO::AuthDeny(HANDLE hDbEvent, const TCHAR *szReason) { return 1; }
-int GGPROTO::AuthRecv(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::AuthRequest(HCONTACT hContact, const TCHAR *szMessage) { return 1; }
+int GGPROTO::AuthRecv(MCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::AuthRequest(MCONTACT hContact, const TCHAR *szMessage) { return 1; }
HANDLE GGPROTO::ChangeInfo(int iInfoType, void *pInfoData) { return NULL; }
int GGPROTO::FileResume(HANDLE hTransfer, int *action, const PROTOCHAR** szFilename) { return 1; }
HANDLE GGPROTO::SearchByEmail(const PROTOCHAR *email) { return NULL; }
-int GGPROTO::RecvContacts(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::RecvUrl(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList) { return 1; }
-int GGPROTO::SendUrl(HCONTACT hContact, int flags, const char *url) { return 1; }
-int GGPROTO::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 1; }
+int GGPROTO::RecvContacts(MCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::RecvUrl(MCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) { return 1; }
+int GGPROTO::SendUrl(MCONTACT hContact, int flags, const char *url) { return 1; }
+int GGPROTO::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 1; }
//////////////////////////////////////////////////////////
// when contact is added to list
-HCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
+MCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
#ifdef DEBUGMODE
debugLogA("AddToList(): id=%s");
@@ -160,7 +160,7 @@ HCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
//////////////////////////////////////////////////////////
// checks proto capabilities
-DWORD_PTR GGPROTO::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR GGPROTO::GetCaps(int type, MCONTACT hContact)
{
switch (type) {
case PFLAGNUM_1:
@@ -190,11 +190,11 @@ void __cdecl GGPROTO::cmdgetinfothread(void *hContact)
{
debugLogA("cmdgetinfothread(): started. Failed info retreival.");
gg_sleep(100, FALSE, "cmdgetinfothread", 103, 1);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
debugLogA("cmdgetinfothread(): end.");
}
-int GGPROTO::GetInfo(HCONTACT hContact, int infoType)
+int GGPROTO::GetInfo(MCONTACT hContact, int infoType)
{
gg_pubdir50_t req;
@@ -570,7 +570,7 @@ HWND GGPROTO::CreateExtendedSearchUI(HWND owner)
//////////////////////////////////////////////////////////
// when messsage received
-int GGPROTO::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int GGPROTO::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
return Proto_RecvMessage(hContact, pre);
}
@@ -580,7 +580,7 @@ int GGPROTO::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
int seq;
} GG_SEQ_ACK;
@@ -592,7 +592,7 @@ void __cdecl GGPROTO::sendackthread(void *ack)
mir_free(ack);
}
-int GGPROTO::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int GGPROTO::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
if (!isonline() || !uin)
@@ -633,7 +633,7 @@ int GGPROTO::SendMsg(HCONTACT hContact, int flags, const char *msg)
//////////////////////////////////////////////////////////
// visible lists
-int GGPROTO::SetApparentMode(HCONTACT hContact, int mode)
+int GGPROTO::SetApparentMode(MCONTACT hContact, int mode)
{
setWord(hContact, GG_KEY_APPARENT, (WORD)mode);
notifyuser(hContact, 1);
@@ -670,18 +670,18 @@ void __cdecl GGPROTO::getawaymsgthread(void *hContact)
debugLogA("getawaymsgthread(): started");
gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
- if (!db_get_s((HCONTACT)hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR))
+ if (!db_get_s((MCONTACT)hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR))
{
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
debugLog(_T("getawaymsgthread(): Reading away msg <%s>."), dbv.ptszVal);
db_free(&dbv);
} else {
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)NULL);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)NULL);
}
debugLogA("getawaymsgthread(): end");
}
-HANDLE GGPROTO::GetAwayMsg(HCONTACT hContact)
+HANDLE GGPROTO::GetAwayMsg(MCONTACT hContact)
{
#ifdef DEBUGMODE
debugLogA("GetAwayMsg(): ForkThread 17 GGPROTO::getawaymsgthread");
@@ -757,7 +757,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const PROTOCHAR *newMsg)
//////////////////////////////////////////////////////////
// sends a notification that the user is typing a message
-int GGPROTO::UserIsTyping(HCONTACT hContact, int type)
+int GGPROTO::UserIsTyping(MCONTACT hContact, int type)
{
uin_t uin = getDword(hContact, GG_KEY_UIN, 0);
if (!uin || !isonline())
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h
index a993447226..fc34dd0aab 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.h
+++ b/protocols/Gadu-Gadu/src/gg_proto.h
@@ -31,23 +31,23 @@ struct GGPROTO : public PROTO<GGPROTO>
// PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
@@ -55,24 +55,24 @@ struct GGPROTO : public PROTO<GGPROTO>
virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
@@ -110,10 +110,10 @@ struct GGPROTO : public PROTO<GGPROTO>
void gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int sleepNumber, int logging);
/* Global GG functions */
- void notifyuser(HCONTACT hContact, int refresh);
+ void notifyuser(MCONTACT hContact, int refresh);
void setalloffline();
void disconnect();
- HCONTACT getcontact(uin_t uin, int create, int inlist, TCHAR *nick);
+ MCONTACT getcontact(uin_t uin, int create, int inlist, TCHAR *nick);
void __cdecl mainthread(void *empty);
int isonline();
int refreshstatus(int status);
@@ -133,9 +133,9 @@ struct GGPROTO : public PROTO<GGPROTO>
void menus_init();
/* Avatar functions */
- void getAvatarFilename(HCONTACT hContact, TCHAR *pszDest, int cbLen);
- void requestAvatarTransfer(HCONTACT hContact, char *szAvatarURL);
- void requestAvatarInfo(HCONTACT hContact, int iWaitFor);
+ void getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen);
+ void requestAvatarTransfer(MCONTACT hContact, char *szAvatarURL);
+ void requestAvatarInfo(MCONTACT hContact, int iWaitFor);
void getOwnAvatar();
void setAvatar(const TCHAR *szFilename);
bool getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts);
@@ -152,11 +152,11 @@ struct GGPROTO : public PROTO<GGPROTO>
void __cdecl setavatarthread(void*);
/* File transfer functions */
- HANDLE fileallow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- int filecancel(HCONTACT hContact, HANDLE hTransfer);
- int filedeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- int recvfile(HCONTACT hContact, PROTOFILEEVENT* pre);
- HANDLE sendfile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ HANDLE fileallow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ int filecancel(MCONTACT hContact, HANDLE hTransfer);
+ int filedeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ int recvfile(MCONTACT hContact, PROTOFILEEVENT* pre);
+ HANDLE sendfile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
HANDLE dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath);
HANDLE dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath);
@@ -187,8 +187,8 @@ struct GGPROTO : public PROTO<GGPROTO>
int img_sendonrequest(gg_event* e);
BOOL img_opened(uin_t uin);
void *img_loadpicture(gg_event* e, TCHAR *szFileName);
- int img_display(HCONTACT hContact, void *img);
- int img_displayasmsg(HCONTACT hContact, void *img);
+ int img_display(MCONTACT hContact, void *img);
+ int img_displayasmsg(MCONTACT hContact, void *img);
void __cdecl img_dlgcallthread(void *param);
@@ -211,7 +211,7 @@ struct GGPROTO : public PROTO<GGPROTO>
int gc_destroy();
TCHAR * gc_getchat(uin_t sender, uin_t *recipients, int recipients_count);
GGGC *gc_lookup(const TCHAR *id);
- int gc_changenick(HCONTACT hContact, TCHAR *ptszNick);
+ int gc_changenick(MCONTACT hContact, TCHAR *ptszNick);
int __cdecl gc_event(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 676b7abbe5..816e1e5d9b 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -138,8 +138,8 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
list_remove(&chats, chat, 1);
// Remove contact from contact list (duh!) should be done by chat.dll !!
- for (HCONTACT hContact = db_find_first(); hContact; ) {
- HCONTACT hNext = db_find_next(hContact);
+ for (MCONTACT hContact = db_find_first(); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact);
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
if (dbv.ptszVal && !_tcscmp(gch->pDest->ptszID, dbv.ptszVal))
@@ -193,7 +193,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
// Privmessage selected
if (gch->pDest->iType == GC_USER_PRIVMESS)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if ((uin = _ttoi(gch->ptszUID)) && (hContact = getcontact(uin, 1, 0, NULL)))
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
@@ -369,7 +369,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count
// Add contacts
for(i = 0; i < chat->recipients_count; i++) {
- HCONTACT hContact = getcontact(chat->recipients[i], 1, 0, NULL);
+ MCONTACT hContact = getcontact(chat->recipients[i], 1, 0, NULL);
UIN2IDT(chat->recipients[i], id);
if (hContact && (name = pcli->pfnGetContactDisplayName(hContact, 0)) != NULL)
gce.ptszNick = name;
@@ -389,7 +389,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count
return chat->id;
}
-static HCONTACT gg_getsubcontact(GGPROTO* gg, HCONTACT hContact)
+static MCONTACT gg_getsubcontact(GGPROTO* gg, MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
char* szMetaProto = (char*)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
@@ -398,7 +398,7 @@ static HCONTACT gg_getsubcontact(GGPROTO* gg, HCONTACT hContact)
{
int nSubContacts = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0), i;
for (i = 0; i < nSubContacts; i++) {
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
szProto = GetContactProto(hMetaContact);
if (szProto && !lstrcmpA(szProto, gg->m_szModuleName))
return hMetaContact;
@@ -423,7 +423,7 @@ static void gg_gc_resetclistopts(HWND hwndList)
static int gg_gc_countcheckmarks(HWND hwndList)
{
int count = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
count++;
@@ -475,10 +475,10 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
TCHAR* chat;
uin_t* participants = (uin_t*)calloc(count, sizeof(uin_t));
gg->debugLogA("gg_gc_openconfdlg(): WM_COMMAND IDOK Opening new conference for %d contacts.", count);
- for (HCONTACT hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- HCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
+ MCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
participants[i++] = db_get_dw(hMetaContact ? hMetaContact : hContact, gg->m_szModuleName, GG_KEY_UIN, 0);
}
}
@@ -524,10 +524,10 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
if (!gg) break;
// Delete non-gg contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HCONTACT hItem = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
- HCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
+ MCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
if (hMetaContact) {
szProto = gg->m_szModuleName;
uin = (uin_t)gg->getDword(hMetaContact, GG_KEY_UIN, 0);
@@ -618,7 +618,7 @@ INT_PTR GGPROTO::gc_openconf(WPARAM wParam, LPARAM lParam)
return 1;
}
-int GGPROTO::gc_changenick(HCONTACT hContact, TCHAR *ptszNick)
+int GGPROTO::gc_changenick(MCONTACT hContact, TCHAR *ptszNick)
{
list_t l;
uin_t uin = getDword(hContact, GG_KEY_UIN, 0);
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 607edfdb37..be57084318 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -49,7 +49,7 @@ typedef struct _GGIMAGEENTRY
typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hEvent;
HWND hWnd;
uin_t uin;
@@ -730,7 +730,7 @@ void __cdecl GGPROTO::img_dlgcallthread(void *param)
////////////////////////////////////////////////////////////////////////////
// Open dialog receive for specified contact
-GGIMAGEDLGDATA *gg_img_recvdlg(GGPROTO *gg, HCONTACT hContact)
+GGIMAGEDLGDATA *gg_img_recvdlg(GGPROTO *gg, MCONTACT hContact)
{
// Create dialog data
GGIMAGEDLGDATA *dat = (GGIMAGEDLGDATA *)calloc(1, sizeof(GGIMAGEDLGDATA));
@@ -804,7 +804,7 @@ TCHAR *gg_img_hasextension(TCHAR *filename)
////////////////////////////////////////////////////////////////////////////////
// Display received image using message with [img] BBCode
-int GGPROTO::img_displayasmsg(HCONTACT hContact, void *img)
+int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img)
{
GGIMAGEENTRY *dat = (GGIMAGEENTRY *)img;
TCHAR szPath[MAX_PATH], path[MAX_PATH], *pImgext, imgext[6];
@@ -896,7 +896,7 @@ BOOL GGPROTO::img_opened(uin_t uin)
////////////////////////////////////////////////////////////////////////////
// Image Module : Looking for window entry, create if not found
-int GGPROTO::img_display(HCONTACT hContact, void *img)
+int GGPROTO::img_display(MCONTACT hContact, void *img)
{
list_t l = imagedlgs;
GGIMAGEDLGDATA *dat;
@@ -1173,7 +1173,7 @@ BOOL GGPROTO::img_sendonrequest(gg_event* e)
INT_PTR GGPROTO::img_sendimg(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
GGIMAGEDLGDATA *dat = NULL;
gg_EnterCriticalSection(&img_mutex, "img_sendimg", 64, "img_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index e4954fc14c..5b528ee0ef 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -26,7 +26,7 @@ char *gg_makecontacts(GGPROTO *gg, int cr)
char *contacts;
// Readup contacts
- for (HCONTACT hContact = db_find_first(gg->m_szModuleName); hContact; hContact = db_find_next(hContact, gg->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(gg->m_szModuleName); hContact; hContact = db_find_next(hContact, gg->m_szModuleName)) {
if (gg->isChatRoom(hContact))
continue;
@@ -210,7 +210,7 @@ void GGPROTO::parsecontacts(char *contacts)
// Loadup contact
if (uin && strNick)
{
- HCONTACT hContact = getcontact(uin, 1, 1, _A2T(strNick));
+ MCONTACT hContact = getcontact(uin, 1, 1, _A2T(strNick));
#ifdef DEBUGMODE
debugLogA("parsecontacts(): Found contact %d with nickname \"%s\".", uin, strNick);
#endif
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp
index f241938c5a..8b46a68b80 100644
--- a/protocols/Gadu-Gadu/src/links.cpp
+++ b/protocols/Gadu-Gadu/src/links.cpp
@@ -99,7 +99,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam)
if (ServiceExists(MS_MSG_SENDMESSAGE))
{
- HCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
+ MCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
if (hContact != NULL)
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp
index 4b6d8610df..cac6119d71 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -382,7 +382,7 @@ INT_PTR GGPROTO::get_acc_mgr_gui(WPARAM wParam, LPARAM lParam)
INT_PTR GGPROTO::leavechat(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);