summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /protocols/SkypeClassic
parent7193759b046338c6f47ff2edb34743a1465791cd (diff)
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic')
-rw-r--r--protocols/SkypeClassic/src/contacts.cpp32
-rw-r--r--protocols/SkypeClassic/src/contacts.h8
-rw-r--r--protocols/SkypeClassic/src/gchat.cpp28
-rw-r--r--protocols/SkypeClassic/src/gchat.h6
-rw-r--r--protocols/SkypeClassic/src/skype.cpp74
-rw-r--r--protocols/SkypeClassic/src/skype.h2
-rw-r--r--protocols/SkypeClassic/src/skypeapi.cpp30
-rw-r--r--protocols/SkypeClassic/src/skypeapi.h2
-rw-r--r--protocols/SkypeClassic/src/skypeopt.cpp4
-rw-r--r--protocols/SkypeClassic/src/voiceservice.cpp8
-rw-r--r--protocols/SkypeClassic/src/voiceservice.h2
11 files changed, 98 insertions, 98 deletions
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp
index 127f962792..ecc6902397 100644
--- a/protocols/SkypeClassic/src/contacts.cpp
+++ b/protocols/SkypeClassic/src/contacts.cpp
@@ -151,7 +151,7 @@ CLISTMENUITEM ChatInitItem(void) {
return mi;
}
-HANDLE add_contextmenu(HCONTACT hContact) {
+HANDLE add_contextmenu(MCONTACT hContact) {
CLISTMENUITEM mi;
UNREFERENCED_PARAMETER(hContact);
@@ -225,8 +225,8 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
if (!strcmp(szProto, SKYPE_PROTONAME)) {
if (!HasVoiceService()) {
- if (!db_get((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0))
+ if (!db_get((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0))
mi=ResumeCallItem(); else mi=HoldCallItem();
mi.flags=CMIM_ALL;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)(HANDLE)hMenuHoldCallItem,(LPARAM)&mi);
@@ -237,7 +237,7 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
db_free(&dbv);
} else { callAvailable = TRUE; hangupAvailable = FALSE; }
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)!=0) {
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)!=0) {
callAvailable = FALSE;
hangupAvailable = FALSE;
}
@@ -259,7 +259,7 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
// File sending and groupchat-creation works starting with protocol version 5
if (protocol>=5) {
mi=FileTransferItem();
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
mi.flags ^= CMIF_HIDDEN;
mi.flags |= CMIM_FLAGS;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)(HANDLE)hMenuFileTransferItem,(LPARAM)&mi);
@@ -268,19 +268,19 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
if (protocol>=5 || bIsImoproxy) {
mi=ChatInitItem();
if (db_get_b(NULL, SKYPE_PROTONAME, "UseGroupchat", 0) &&
- db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
+ db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
mi.flags ^= CMIF_HIDDEN;
mi.flags |= CMIM_FLAGS;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)(HANDLE)hMenuChatInitItem,(LPARAM)&mi);
}
} else if (bSkypeOut) {
- if (!db_get((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
mi=SkypeOutHupItem();
db_free(&dbv);
} else {
mi=SkypeOutCallItem();
- if(!db_get((HCONTACT)wParam,"UserInfo","MyPhone0",&dbv)) {
+ if(!db_get((MCONTACT)wParam,"UserInfo","MyPhone0",&dbv)) {
db_free(&dbv);
mi.flags=0;
}
@@ -306,13 +306,13 @@ int ClistDblClick(WPARAM wParam, LPARAM lParam) {
}
*/
-HCONTACT find_contact(char *name)
+MCONTACT find_contact(char *name)
{
int tCompareResult;
DBVARIANT dbv;
// already on list?
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact=db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact=db_find_next(hContact))
{
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) && db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
@@ -327,13 +327,13 @@ HCONTACT find_contact(char *name)
return NULL;
}
-HCONTACT find_contactT(TCHAR *name)
+MCONTACT find_contactT(TCHAR *name)
{
int tCompareResult;
DBVARIANT dbv;
// already on list?
- for (HCONTACT hContact=db_find_first(); hContact != NULL; hContact=db_find_next(hContact))
+ for (MCONTACT hContact=db_find_first(); hContact != NULL; hContact=db_find_next(hContact))
{
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) && db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
@@ -349,9 +349,9 @@ HCONTACT find_contactT(TCHAR *name)
}
-HCONTACT add_contact(char *name, DWORD flags)
+MCONTACT add_contact(char *name, DWORD flags)
{
- HCONTACT hContact;
+ MCONTACT hContact;
// already on list?
if (hContact=find_contact(name)) {
@@ -365,7 +365,7 @@ HCONTACT add_contact(char *name, DWORD flags)
// no, so add
LOG(("add_contact: Adding %s", name));
- hContact=(HCONTACT)CallServiceSync(MS_DB_CONTACT_ADD, 0, 0);
+ hContact=(MCONTACT)CallServiceSync(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
if (CallServiceSync(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact,(LPARAM)SKYPE_PROTONAME)!=0) {
LOG(("add_contact: Ouch! MS_PROTO_ADDTOCONTACT failed for some reason"));
@@ -387,7 +387,7 @@ HCONTACT add_contact(char *name, DWORD flags)
}
void logoff_contacts(BOOL bCleanup) {
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
DBVARIANT dbv={0};
diff --git a/protocols/SkypeClassic/src/contacts.h b/protocols/SkypeClassic/src/contacts.h
index 1cc71571a5..5665b70a7b 100644
--- a/protocols/SkypeClassic/src/contacts.h
+++ b/protocols/SkypeClassic/src/contacts.h
@@ -1,10 +1,10 @@
// Prototypes
-HANDLE add_contextmenu(HCONTACT hContact);
+HANDLE add_contextmenu(MCONTACT hContact);
HANDLE add_mainmenu(void);
-HCONTACT find_contact(char *name);
-HCONTACT find_contactT(TCHAR *name);
-HCONTACT add_contact(char *name, DWORD flags);
+MCONTACT find_contact(char *name);
+MCONTACT find_contactT(TCHAR *name);
+MCONTACT add_contact(char *name, DWORD flags);
CLISTMENUITEM HupItem(void);
CLISTMENUITEM CallItem(void);
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp
index dd38a9d990..9e746244b6 100644
--- a/protocols/SkypeClassic/src/gchat.cpp
+++ b/protocols/SkypeClassic/src/gchat.cpp
@@ -112,7 +112,7 @@ gchat_contact *GetChatContact(gchat_contacts *gc, const TCHAR *who) {
static int AddChatContact(gchat_contacts *gc, char *who, TCHAR *pszRole)
{
int i = -2;
- HCONTACT hContact;
+ MCONTACT hContact;
CONTACTINFO ci = {0};
TCHAR *twho;
@@ -165,10 +165,10 @@ void RemChatContact(gchat_contacts *gc, const TCHAR *who) {
}
}
-HCONTACT find_chat(LPCTSTR chatname) {
+MCONTACT find_chat(LPCTSTR chatname) {
char *szProto;
int tCompareResult;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
@@ -187,10 +187,10 @@ HCONTACT find_chat(LPCTSTR chatname) {
}
#ifdef _UNICODE
-HCONTACT find_chatA(char *chatname) {
+MCONTACT find_chatA(char *chatname) {
char *szProto;
int tCompareResult;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
@@ -479,7 +479,7 @@ void KillChatSession(GCDEST *gcd)
void InviteUser(const TCHAR *szChatId)
{
HMENU tMenu = CreatePopupMenu();
- HCONTACT hContact = db_find_first(), hInvitedUser;
+ MCONTACT hContact = db_find_first(), hInvitedUser;
DBVARIANT dbv;
HWND tWindow;
POINT pt;
@@ -516,7 +516,7 @@ void InviteUser(const TCHAR *szChatId)
tWindow = CreateWindow(_T("EDIT"),_T(""),0,1,1,1,1,NULL,NULL,hInst,NULL);
GetCursorPos (&pt);
- hInvitedUser = (HCONTACT)TrackPopupMenu(tMenu, TPM_NONOTIFY | TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, tWindow, NULL);
+ hInvitedUser = (MCONTACT)TrackPopupMenu(tMenu, TPM_NONOTIFY | TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, tWindow, NULL);
DestroyMenu(tMenu);
DestroyWindow(tWindow);
@@ -527,7 +527,7 @@ void InviteUser(const TCHAR *szChatId)
}
-static void KickUser (HCONTACT hContact, GCHOOK *gch)
+static void KickUser (MCONTACT hContact, GCHOOK *gch)
{
char *ptr;
@@ -566,7 +566,7 @@ static void KickUser (HCONTACT hContact, GCHOOK *gch)
void SetChatTopic(const TCHAR *szChatId, TCHAR *szTopic, BOOL bSet)
{
- HCONTACT hContact = find_chat (szChatId);
+ MCONTACT hContact = find_chat (szChatId);
char *szUTFTopic;
GCDEST gcd = { SKYPE_PROTONAME, szChatId, GC_EVENT_TOPIC };
@@ -608,7 +608,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) {
switch (gch->pDest->iType) {
case GC_SESSION_TERMINATE: {
- HCONTACT hContact;
+ MCONTACT hContact;
if (gc->mJoinedCount == 1) {
// switch back to normal session
@@ -691,7 +691,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) {
InviteUser(gch->pDest->ptszID);
break;
case GC_USER_PRIVMESS: {
- HCONTACT hContact = find_contactT(gch->ptszUID);
+ MCONTACT hContact = find_contactT(gch->ptszUID);
if (hContact) CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
break;
@@ -714,7 +714,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) {
}
break;
case GC_USER_NICKLISTMENU: {
- HCONTACT hContact = find_contactT(gch->ptszUID);
+ MCONTACT hContact = find_contactT(gch->ptszUID);
switch(gch->dwData) {
case 10:CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0); break;
@@ -821,7 +821,7 @@ int __cdecl GCMenuHook(WPARAM wParam,LPARAM lParam) {
INT_PTR GCOnLeaveChat(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
UNREFERENCED_PARAMETER(lParam);
@@ -837,7 +837,7 @@ INT_PTR GCOnLeaveChat(WPARAM wParam,LPARAM lParam)
INT_PTR GCOnJoinChat(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
UNREFERENCED_PARAMETER(lParam);
diff --git a/protocols/SkypeClassic/src/gchat.h b/protocols/SkypeClassic/src/gchat.h
index 13ef26afe6..91dcef43f4 100644
--- a/protocols/SkypeClassic/src/gchat.h
+++ b/protocols/SkypeClassic/src/gchat.h
@@ -12,7 +12,7 @@
#define MAX_BUF 256 // Buffer for topic-string
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR who[33];
TCHAR szRole[12];
} gchat_contact;
@@ -26,9 +26,9 @@ typedef struct {
int ChatInit(WPARAM, LPARAM);
int __cdecl ChatStart(char *szChatId, BOOL bJustCreate);
gchat_contacts *GetChat(LPCTSTR szChatId);
-HCONTACT find_chat(LPCTSTR chatname);
+MCONTACT find_chat(LPCTSTR chatname);
#ifdef _UNICODE
-HCONTACT find_chatA(char *chatname);
+MCONTACT find_chatA(char *chatname);
#else
#define find_chatA find_chat
#endif
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp
index 3a6b431f96..5acdb42d43 100644
--- a/protocols/SkypeClassic/src/skype.cpp
+++ b/protocols/SkypeClassic/src/skype.cpp
@@ -123,7 +123,7 @@ typedef struct {
} fetchmsg_arg;
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
char szId[16];
} msgsendwt_arg;
@@ -266,7 +266,7 @@ int HookContactAdded(WPARAM wParam, LPARAM lParam) {
szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, wParam, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME))
- add_contextmenu((HCONTACT)wParam);
+ add_contextmenu((MCONTACT)wParam);
return 0;
}
@@ -280,7 +280,7 @@ int HookContactDeleted(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
int retval;
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 1;
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 1;
retval=SkypeSend("SET USER %s BUDDYSTATUS 1", dbv.pszVal);
db_free(&dbv);
if (retval) return 1;
@@ -304,7 +304,7 @@ void GetInfoThread(void *hContact)
LOG (("GetInfoThread started."));
EnterCriticalSection (&QueryThreadMutex);
- if (db_get_s((HCONTACT)hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ if (db_get_s((MCONTACT)hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
{
LOG (("GetInfoThread terminated, cannot find Skype Name for contact %08X.", hContact));
LeaveCriticalSection (&QueryThreadMutex);
@@ -320,7 +320,7 @@ void GetInfoThread(void *hContact)
if (ptr=SkypeGet ("USER", dbv.pszVal, "FULLNAME")) {
if (*ptr && !bSetNick && db_get_b(NULL, SKYPE_PROTONAME, "ShowFullname", 1)) {
// No Displayname and FULLNAME requested
- db_set_utf((HCONTACT)hContact, SKYPE_PROTONAME, "Nick", ptr);
+ db_set_utf((MCONTACT)hContact, SKYPE_PROTONAME, "Nick", ptr);
bSetNick = TRUE;
}
free (ptr);
@@ -328,7 +328,7 @@ void GetInfoThread(void *hContact)
if (!bSetNick) {
// Still no nick set, so use SKYPE Nickname
- db_set_s((HCONTACT)hContact, SKYPE_PROTONAME, "Nick", dbv.pszVal);
+ db_set_s((MCONTACT)hContact, SKYPE_PROTONAME, "Nick", dbv.pszVal);
}
@@ -345,7 +345,7 @@ void GetInfoThread(void *hContact)
ACKDATA ack = {0};
ack.cbSize = sizeof( ACKDATA );
ack.szModule = SKYPE_PROTONAME;
- ack.hContact = (HCONTACT)hContact;
+ ack.hContact = (MCONTACT)hContact;
ack.type = ACKTYPE_AVATAR;
ack.result = ACKRESULT_STATUS;
@@ -359,7 +359,7 @@ void GetInfoThread(void *hContact)
if (ptr=SkypeGet ("USER", dbv.pszVal, m_settings[i].SkypeSetting)) free (ptr);
}
- ProtoBroadcastAck(SKYPE_PROTONAME, (HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(SKYPE_PROTONAME, (MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
LeaveCriticalSection(&QueryThreadMutex);
db_free(&dbv);
LOG (("GetInfoThread terminated gracefully."));
@@ -449,11 +449,11 @@ INT_PTR ImportHistory(WPARAM wParam, LPARAM lParam) {
UNREFERENCED_PARAMETER(lParam);
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)) {
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoomID", &dbv)) return 0;
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)) {
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoomID", &dbv)) return 0;
SkypeSend ("GET CHAT %s CHATMESSAGES", dbv.pszVal);
} else {
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 0;
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 0;
SkypeSend("SEARCH %sS %s", cmdMessage, dbv.pszVal);
}
db_free(&dbv);
@@ -501,7 +501,7 @@ void __cdecl SearchUsersWaitingMyAuthorization(void *dummy) {
while (token) {
CCSDATA ccs={0};
PROTORECVEVENT pre={0};
- HCONTACT hContact;
+ MCONTACT hContact;
char *firstname=NULL, *lastname=NULL, *pCurBlob;
LOG(("Awaiting auth: %s", token));
@@ -513,7 +513,7 @@ void __cdecl SearchUsersWaitingMyAuthorization(void *dummy) {
pre.timestamp=(DWORD)SkypeTime(NULL);
/* blob is: */
- //DWORD protocolSpecific HCONTACT hContact
+ //DWORD protocolSpecific MCONTACT hContact
//ASCIIZ nick, firstName, lastName, e-mail, requestReason
if (firstname=SkypeGet("USER", token, "FULLNAME"))
if (lastname=strchr(firstname, ' ')) {
@@ -872,7 +872,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) {
DWORD timestamp = 0, lwr=0;
CCSDATA ccs={0};
PROTORECVEVENT pre={0};
- HCONTACT hContact = NULL, hChat = NULL;
+ MCONTACT hContact = NULL, hChat = NULL;
HANDLE hDbEvent;
DBEVENTINFO dbei={0};
DBVARIANT dbv={0};
@@ -1309,7 +1309,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) {
if (db_get_b(hContact, "MetaContacts", "IsSubcontact", 0))
{
DWORD dwMetaLink = db_get_dw(hContact, "MetaContacts", "MetaLink", MAXDWORD);
- HCONTACT hMetaContact;
+ MCONTACT hMetaContact;
if (dwMetaLink != MAXDWORD && (hMetaContact = GetMetaHandle(dwMetaLink)))
{
@@ -1364,8 +1364,8 @@ void FetchMessageThreadSync(fetchmsg_arg *pargs) {
/*
if (pargs->bIsRead && pMsgEvent->hEvent != INVALID_HANDLE_VALUE)
{
- HCONTACT hContact;
- if ((int)(hContact = (HCONTACT)CallService (MS_DB_EVENT_GETCONTACT, (WPARAM)pMsgEntry->hEvent, 0)) != -1)
+ MCONTACT hContact;
+ if ((int)(hContact = (MCONTACT)CallService (MS_DB_EVENT_GETCONTACT, (WPARAM)pMsgEntry->hEvent, 0)) != -1)
CallService (MS_DB_EVENT_MARKREAD, (WPARAM)hContact, (LPARAM)hDBEvent);
}
*/
@@ -1419,10 +1419,10 @@ char *GetCallerHandle(char *szSkypeMsg) {
}
-HCONTACT GetCallerContact(char *szSkypeMsg)
+MCONTACT GetCallerContact(char *szSkypeMsg)
{
char *szHandle;
- HCONTACT hContact=NULL;
+ MCONTACT hContact=NULL;
if (!(szHandle=GetCallerHandle(szSkypeMsg))) return NULL;
if (!(hContact=find_contact(szHandle))) {
@@ -1442,9 +1442,9 @@ HCONTACT GetCallerContact(char *szSkypeMsg)
return hContact;
}
-HCONTACT GetMetaHandle(DWORD dwId)
+MCONTACT GetMetaHandle(DWORD dwId)
{
- for (HCONTACT hContact=db_find_first(); hContact != NULL; hContact=db_find_next(hContact)) {
+ for (MCONTACT hContact=db_find_first(); hContact != NULL; hContact=db_find_next(hContact)) {
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, "MetaContacts") &&
db_get_dw(hContact, "MetaContacts", "MetaID", MAXDWORD)==dwId)
@@ -1478,7 +1478,7 @@ LRESULT CALLBACK InCallPopUpProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
}
void RingThread(char *szSkypeMsg) {
- HCONTACT hContact;
+ MCONTACT hContact;
DBEVENTINFO dbei={0};
DBVARIANT dbv;
char *ptr = NULL;
@@ -1606,7 +1606,7 @@ l_exitRT:
}
void EndCallThread(char *szSkypeMsg) {
- HCONTACT hContact=NULL;
+ MCONTACT hContact=NULL;
HANDLE hDbEvent;
DBEVENTINFO dbei={0};
DBVARIANT dbv;
@@ -1669,7 +1669,7 @@ void EndCallThread(char *szSkypeMsg) {
}
void HoldCallThread(char *szSkypeMsg) {
- HCONTACT hContact;
+ MCONTACT hContact;
LOG(("HoldCallThread started"));
if (!szSkypeMsg) {
@@ -1685,7 +1685,7 @@ void HoldCallThread(char *szSkypeMsg) {
}
void ResumeCallThread(char *szSkypeMsg) {
- HCONTACT hContact;
+ MCONTACT hContact;
LOG(("ResumeCallThread started"));
if (!szSkypeMsg) {
@@ -1743,7 +1743,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam)
static char *onlinestatus=NULL;
static BOOL RestoreUserStatus=FALSE;
int sstat, oldstatus, flag;
- HCONTACT hContact;
+ MCONTACT hContact;
fetchmsg_arg *args;
static int iReentranceCnt = 0;
@@ -2091,7 +2091,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam)
} else
if (strncmp(ptr, " FRIENDLYNAME ", 14) == 0) {
// Chat session name
- HCONTACT hContact;
+ MCONTACT hContact;
*ptr=0;
if (hContact = find_chatA(szSkypeMsg+5))
@@ -2359,7 +2359,7 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam)
return iRet;
}
-int __stdcall SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+int __stdcall SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
ACKDATA ack = { sizeof( ACKDATA ) };
ack.szModule = SKYPE_PROTONAME;
@@ -2374,11 +2374,11 @@ int __stdcall SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hPro
static void __cdecl SkypeGetAwayMessageThread(void *hContact)
{
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)hContact, "CList", "StatusMsg", &dbv )) {
- SendBroadcast((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )dbv.ptszVal );
+ if (!db_get_ts((MCONTACT)hContact, "CList", "StatusMsg", &dbv )) {
+ SendBroadcast((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )dbv.ptszVal );
db_free( &dbv );
}
- else SendBroadcast((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )0 );
+ else SendBroadcast((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )0 );
}
INT_PTR SkypeGetAwayMessage(WPARAM wParam,LPARAM lParam)
@@ -2449,7 +2449,7 @@ static int _GetFileSize(char* filename)
*/
void RetrieveUserAvatar(void *param)
{
- HCONTACT hContact = (HCONTACT) param;
+ MCONTACT hContact = (MCONTACT) param;
HANDLE file;
PROTO_AVATAR_INFORMATION AI={0};
ACKDATA ack = {0};
@@ -2777,7 +2777,7 @@ INT_PTR SkypeRecvMessage(WPARAM wParam, LPARAM lParam)
INT_PTR SkypeUserIsTyping(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv={0};
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (protocol<5 && !bIsImoproxy) return 0;
if (db_get_s(hContact, SKYPE_PROTONAME, "Typing_Stream", &dbv)) {
@@ -2893,7 +2893,7 @@ INT_PTR SkypeAddToListByEvent(WPARAM wParam, LPARAM lParam) {
if (pBlob=__skypeauth(wParam))
{
- HCONTACT hContact=add_contact(pBlob+sizeof(DWORD)+sizeof(HANDLE), LOWORD(wParam));
+ MCONTACT hContact=add_contact(pBlob+sizeof(DWORD)+sizeof(HANDLE), LOWORD(wParam));
free(pBlob);
if (hContact) return (int)hContact;
}
@@ -2914,7 +2914,7 @@ INT_PTR SkypeRegisterProxy(WPARAM wParam, LPARAM lParam) {
void CleanupNicknames(char *dummy) {
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
DBVARIANT dbv, dbv2;
@@ -3014,7 +3014,7 @@ int EnumOldPluginName(const char *szSetting,LPARAM lParam)
// 0 --> No
int AnySkypeusers(void)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
int tCompareResult;
@@ -3039,7 +3039,7 @@ int AnySkypeusers(void)
DBCONTACTENUMSETTINGS cns;
DBCONTACTWRITESETTING cws;
DBVARIANT dbv;
- HCONTACT hContact=NULL;
+ MCONTACT hContact=NULL;
struct PLUGINDI pdi;
LOG(("Updating old database settings if there are any..."));
diff --git a/protocols/SkypeClassic/src/skype.h b/protocols/SkypeClassic/src/skype.h
index 83021b91c6..5cd87986dd 100644
--- a/protocols/SkypeClassic/src/skype.h
+++ b/protocols/SkypeClassic/src/skype.h
@@ -172,7 +172,7 @@ int __stdcall EnterBitmapFileName( char* szDest );
void CleanupNicknames(char *dummy);
int InitVSApi();
int FreeVSApi();
-HCONTACT GetMetaHandle(DWORD dwId);
+MCONTACT GetMetaHandle(DWORD dwId);
void LaunchSkypeAndSetStatusThread(void *newStatus);
// Structs
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp
index 310d26b975..1534a3530a 100644
--- a/protocols/SkypeClassic/src/skypeapi.cpp
+++ b/protocols/SkypeClassic/src/skypeapi.cpp
@@ -413,7 +413,7 @@ char *SkypeRcv(char *what, DWORD maxwait)
return SkypeRcvTime(what, 0, maxwait);
}
-char *SkypeRcvMsg(char *what, time_t st, HCONTACT hContact, DWORD maxwait)
+char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait)
{
char *msg, msgid[32]={0}, *pMsg, *pCurMsg;
struct MsgQueue *ptr;
@@ -612,10 +612,10 @@ INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam) {
char *msg=0;
int res;
- if (!db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
res = -1; // no direct return, because dbv needs to be freed
} else {
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
msg=(char *)malloc(strlen(dbv.pszVal)+6);
strcpy(msg, "CALL ");
strcat(msg, dbv.pszVal);
@@ -644,13 +644,13 @@ INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam)
char *msg=0;
int res = -1;
- if (!db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
msg=(char *)malloc(strlen(dbv.pszVal)+21);
sprintf(msg, "SET %s STATUS FINISHED", dbv.pszVal);
//sprintf(msg, "ALTER CALL %s HANGUP", dbv.pszVal);
res=SkypeSend(msg);
#if _DEBUG
- db_unset((HCONTACT)wParam, SKYPE_PROTONAME, "CallId");
+ db_unset((MCONTACT)wParam, SKYPE_PROTONAME, "CallId");
#endif
//} else {
// if (db_get((HANDLE)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
@@ -686,14 +686,14 @@ static void FixNumber(char *p) {
* Purpose: Dialog procedure for the Dial-Dialog
*/
static INT_PTR CALLBACK DialDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
- static HCONTACT hContact;
+ static MCONTACT hContact;
static unsigned int entries=0;
BOOL TempAdded=FALSE;
char number[64], *msg, *ptr=NULL;
switch (uMsg){
case WM_INITDIALOG:
- hContact=(HCONTACT)lParam;
+ hContact=(MCONTACT)lParam;
Utils_RestoreWindowPosition(hwndDlg, NULL, SKYPE_PROTONAME, "DIALdlg");
TranslateDialogDefault(hwndDlg);
@@ -810,14 +810,14 @@ static INT_PTR CALLBACK CallstatDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
switch (uMsg){
case WM_INITDIALOG:
{
- HCONTACT hContact;
+ MCONTACT hContact;
- if (!db_get_s((HCONTACT)lParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get_s((MCONTACT)lParam, SKYPE_PROTONAME, "CallId", &dbv)) {
// Check, if another call is in progress
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (HCONTACT)lParam &&
+ if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0 &&
!db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv2))
{
@@ -927,7 +927,7 @@ INT_PTR SkypeOutCall(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
int res = -1;
- if (wParam && !db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (wParam && !db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
res=SkypeSend("SET %s STATUS FINISHED", dbv.pszVal);
pthread_create(( pThreadFunc )SkypeOutCallErrorCheck, _strdup(dbv.pszVal));
db_free(&dbv);
@@ -947,10 +947,10 @@ INT_PTR SkypeHoldCall(WPARAM wParam, LPARAM lParam) {
int retval;
LOG(("SkypeHoldCall started"));
- if (!wParam || db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv))
+ if (!wParam || db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv))
return -1;
retval = SkypeSend ("SET %s STATUS %s", dbv.pszVal,
- db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0)?"INPROGRESS":"ONHOLD");
+ db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0)?"INPROGRESS":"ONHOLD");
db_free(&dbv);
return retval;
}
@@ -1145,7 +1145,7 @@ INT_PTR SkypeSendFile(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
int retval;
- if (!wParam || db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ if (!wParam || db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
return -1;
retval=SkypeSend("OPEN FILETRANSFER %s", dbv.pszVal);
db_free(&dbv);
@@ -1162,7 +1162,7 @@ INT_PTR SkypeSendFile(WPARAM wParam, LPARAM lParam) {
*/
INT_PTR SkypeChatCreate(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
- HCONTACT hContact=(HCONTACT)wParam;
+ MCONTACT hContact=(MCONTACT)wParam;
char *ptr, *ptr2;
if (!hContact || db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
diff --git a/protocols/SkypeClassic/src/skypeapi.h b/protocols/SkypeClassic/src/skypeapi.h
index 0d3f661dcb..aaff523921 100644
--- a/protocols/SkypeClassic/src/skypeapi.h
+++ b/protocols/SkypeClassic/src/skypeapi.h
@@ -28,7 +28,7 @@ char *SkypeMsgGet(void);
int SkypeSend(char*, ...);
char *SkypeRcv(char *what, DWORD maxwait);
char *SkypeRcvTime(char *what, time_t st, DWORD maxwait);
-char *SkypeRcvMsg(char *what, time_t st, HCONTACT hContact, DWORD maxwait);
+char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait);
INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeOutCall(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp
index 8b90c78780..42e4f79423 100644
--- a/protocols/SkypeClassic/src/skypeopt.cpp
+++ b/protocols/SkypeClassic/src/skypeopt.cpp
@@ -159,7 +159,7 @@ INT_PTR CALLBACK OptPopupDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
{
case IDC_PREVIEW:
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR * lpzContactName;
hContact = db_find_first();
@@ -750,7 +750,7 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
int OnDetailsInit( WPARAM wParam, LPARAM lParam )
{
OPTIONSDIALOGPAGE odp = {0};
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
odp.cbSize = sizeof(odp);
odp.hIcon = NULL;
diff --git a/protocols/SkypeClassic/src/voiceservice.cpp b/protocols/SkypeClassic/src/voiceservice.cpp
index 93181d0d4c..f5e97f3a53 100644
--- a/protocols/SkypeClassic/src/voiceservice.cpp
+++ b/protocols/SkypeClassic/src/voiceservice.cpp
@@ -20,7 +20,7 @@ BOOL HasVoiceService()
return has_voice_service;
}
-void NofifyVoiceService(HCONTACT hContact, char *callId, int state)
+void NofifyVoiceService(MCONTACT hContact, char *callId, int state)
{
VOICE_CALL vc = {0};
vc.cbSize = sizeof(vc);
@@ -40,9 +40,9 @@ static INT_PTR VoiceGetInfo(WPARAM wParam, LPARAM lParam)
return VOICE_SUPPORTED | VOICE_CALL_CONTACT | VOICE_CAN_HOLD;
}
-static HCONTACT FindContactByCallId(char *callId)
+static MCONTACT FindContactByCallId(char *callId)
{
- HCONTACT hContact;
+ MCONTACT hContact;
int iCmpRes;
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
char *szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
@@ -71,7 +71,7 @@ static INT_PTR VoiceCall(WPARAM wParam, LPARAM lParam)
if (!wParam) return -1;
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
return -1;
SkypeSend("CALL %s", dbv.pszVal);
diff --git a/protocols/SkypeClassic/src/voiceservice.h b/protocols/SkypeClassic/src/voiceservice.h
index fce03545d2..df1a016100 100644
--- a/protocols/SkypeClassic/src/voiceservice.h
+++ b/protocols/SkypeClassic/src/voiceservice.h
@@ -10,7 +10,7 @@ BOOL HasVoiceService();
void VoiceServiceInit();
void VoiceServiceExit();
void VoiceServiceModulesLoaded();
-void NofifyVoiceService(HCONTACT hContact, char *callId, int state) ;
+void NofifyVoiceService(MCONTACT hContact, char *callId, int state) ;