diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /protocols/SkypeClassic/src/skype.cpp | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (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/src/skype.cpp')
-rw-r--r-- | protocols/SkypeClassic/src/skype.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
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..."));
|