summaryrefslogtreecommitdiff
path: root/protocols/Tlen
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/Tlen
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/Tlen')
-rw-r--r--protocols/Tlen/src/tlen.cpp10
-rw-r--r--protocols/Tlen/src/tlen.h54
-rw-r--r--protocols/Tlen/src/tlen_avatar.cpp14
-rw-r--r--protocols/Tlen/src/tlen_avatar.h2
-rw-r--r--protocols/Tlen/src/tlen_iqid.cpp14
-rw-r--r--protocols/Tlen/src/tlen_misc.cpp18
-rw-r--r--protocols/Tlen/src/tlen_muc.cpp12
-rw-r--r--protocols/Tlen/src/tlen_picture.cpp2
-rw-r--r--protocols/Tlen/src/tlen_picture.h2
-rw-r--r--protocols/Tlen/src/tlen_presence.cpp4
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp70
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp10
-rw-r--r--protocols/Tlen/src/tlen_userinfo.cpp8
-rw-r--r--protocols/Tlen/src/tlen_util.cpp2
-rw-r--r--protocols/Tlen/src/tlen_voice.cpp6
15 files changed, 114 insertions, 114 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 377d52f43c..bc9cde59f4 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -114,7 +114,7 @@ static void TlenRegisterIcons()
int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -140,7 +140,7 @@ int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -153,7 +153,7 @@ INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -166,7 +166,7 @@ INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline)
SendPicture(this, hContact);
@@ -241,7 +241,7 @@ int TlenProtocol::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
char str[128];
/* Set all contacts to 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))
if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/Tlen/src/tlen.h b/protocols/Tlen/src/tlen.h
index 1096210110..b914fbc6f3 100644
--- a/protocols/Tlen/src/tlen.h
+++ b/protocols/Tlen/src/tlen.h
@@ -218,23 +218,23 @@ struct TlenProtocol : public PROTO<TlenProtocol>
// 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 PROTOCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** 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 PROTOCHAR* id);
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
@@ -242,24 +242,24 @@ struct TlenProtocol : public PROTO<TlenProtocol>
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, PROTOFILEEVENT*);
- 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, PROTOFILEEVENT*);
+ 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 PROTOCHAR* szDescription, PROTOCHAR** 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 PROTOCHAR* szDescription, PROTOCHAR** 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 iStatus, const PROTOCHAR* msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam);
@@ -381,7 +381,7 @@ typedef struct ThreadDataStruct{
typedef enum { FT_CONNECTING, FT_INITIALIZING, FT_RECEIVING, FT_DONE, FT_ERROR, FT_DENIED, FT_SWITCH } TLEN_FILE_STATE;
typedef enum { FT_RECV, FT_SEND} TLEN_FILE_MODE;
typedef struct TLEN_FILE_TRANSFER_STRUCT{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE s;
NETLIBNEWCONNECTIONPROC_V2 pfnNewConnectionV2;
TLEN_FILE_STATE state;
@@ -466,8 +466,8 @@ void TlenSerialInit(TlenProtocol *proto);
void TlenSerialUninit(TlenProtocol *proto);
unsigned int TlenSerialNext(TlenProtocol *proto);
int TlenSend(TlenProtocol *proto, const char *fmt, ...);
-HCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid);
-char *TlenJIDFromHContact(TlenProtocol *proto, HCONTACT hContact);
+MCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid);
+char *TlenJIDFromHContact(TlenProtocol *proto, MCONTACT hContact);
char *TlenLoginFromJID(const char *jid);
char *TlenResourceFromJID(const char *jid);
char *TlenNickFromJID(const char *jid);
@@ -481,7 +481,7 @@ void TlenUrlDecode(char *str);
char *TlenUrlEncode(const char *str);
char *TlenTextEncode(const char *str);
char *TlenTextDecode(const char *str);
-void TlenLogMessage(TlenProtocol *proto, HCONTACT hContact, DWORD flags, const char *message);
+void TlenLogMessage(TlenProtocol *proto, MCONTACT hContact, DWORD flags, const char *message);
BOOL IsAuthorized(TlenProtocol *proto, const char *jid);
//char *TlenGetVersionText();
time_t TlenIsoToUnixTime(char *stamp);
@@ -490,9 +490,9 @@ void TlenSendPresence(TlenProtocol *proto,int status);
void TlenStringAppend(char **str, int *sizeAlloced, const char *fmt, ...);
//char *TlenGetClientJID(char *jid);
// tlen_misc.cpp
-void TlenDBAddEvent(TlenProtocol *proto, HCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob);
+void TlenDBAddEvent(TlenProtocol *proto, MCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob);
void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick);
-HCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary);
+MCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary);
// tlen_svc.cpp
int TlenRunSearch(TlenProtocol *proto);
// tlen_opt.cpp
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp
index f413b277ec..b75ac787ba 100644
--- a/protocols/Tlen/src/tlen_avatar.cpp
+++ b/protocols/Tlen/src/tlen_avatar.cpp
@@ -64,7 +64,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts
mir_sntprintf(ptszDest + tPathLen, MAX_PATH - tPathLen, TEXT("%S_avatar%s"), proto->m_szModuleName, tszFileType);
}
-static void RemoveAvatar(TlenProtocol *proto, HCONTACT hContact) {
+static void RemoveAvatar(TlenProtocol *proto, MCONTACT hContact) {
TCHAR tFileName[ MAX_PATH ];
if (hContact == NULL) {
proto->threadData->avatarHash[0] = '\0';
@@ -77,7 +77,7 @@ static void RemoveAvatar(TlenProtocol *proto, HCONTACT hContact) {
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
-static void SetAvatar(TlenProtocol *proto, HCONTACT hContact, TLEN_LIST_ITEM *item, char *data, int len, DWORD format) {
+static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *item, char *data, int len, DWORD format) {
TCHAR filename[MAX_PATH];
char md5[33];
mir_md5_state_t ctx;
@@ -123,7 +123,7 @@ int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_IT
XmlNode *aNode;
char *oldHash = NULL;
char *md5 = NULL, *type = NULL;
- HCONTACT hContact;
+ MCONTACT hContact;
hContact = NULL;
if (item != NULL) {
if ((hContact=TlenHContactFromJID(proto, item->jid)) == NULL) return 0;
@@ -165,7 +165,7 @@ int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_IT
}
void TlenProcessPresenceAvatar(TlenProtocol *proto, XmlNode *node, TLEN_LIST_ITEM *item) {
- HCONTACT hContact;
+ MCONTACT hContact;
if ((hContact=TlenHContactFromJID(proto, item->jid)) == NULL) return;
TlenProcessAvatarNode(proto, TlenXmlGetChild(node, "avatar"), item);
}
@@ -225,7 +225,7 @@ static int getAvatarMutex = 0;
typedef struct {
TlenProtocol *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
} TLENGETAVATARTHREADDATA;
static void TlenGetAvatarThread(void *ptr) {
@@ -234,7 +234,7 @@ static void TlenGetAvatarThread(void *ptr) {
NETLIBHTTPREQUEST req;
NETLIBHTTPREQUEST *resp;
TLENGETAVATARTHREADDATA *data = (TLENGETAVATARTHREADDATA *)ptr;
- HCONTACT hContact = data->hContact;
+ MCONTACT hContact = data->hContact;
char *request;
char *login = NULL;
if (hContact != NULL) {
@@ -301,7 +301,7 @@ static void TlenGetAvatarThread(void *ptr) {
mir_free(data);
}
-void TlenGetAvatar(TlenProtocol *proto, HCONTACT hContact) {
+void TlenGetAvatar(TlenProtocol *proto, MCONTACT hContact) {
if (hContact == NULL) {
if (getAvatarMutex != 0) {
return;
diff --git a/protocols/Tlen/src/tlen_avatar.h b/protocols/Tlen/src/tlen_avatar.h
index c0bbfaa086..5de5d482a6 100644
--- a/protocols/Tlen/src/tlen_avatar.h
+++ b/protocols/Tlen/src/tlen_avatar.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void TlenProcessPresenceAvatar(TlenProtocol *proto, XmlNode *node, TLEN_LIST_ITEM *item);
int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_ITEM *item);
void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* psztDest, int cbLen);
-void TlenGetAvatar(TlenProtocol *proto, HCONTACT hContact);
+void TlenGetAvatar(TlenProtocol *proto, MCONTACT hContact);
void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int access);
void TlenRemoveAvatar(TlenProtocol *proto);
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp
index 74181bd9c3..450fc6c4a5 100644
--- a/protocols/Tlen/src/tlen_iqid.cpp
+++ b/protocols/Tlen/src/tlen_iqid.cpp
@@ -65,7 +65,7 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) {
DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
TLEN_LIST_ITEM *item;
- HCONTACT hContact;
+ MCONTACT hContact;
char *jid, *name, *nick;
int i;
char *str;
@@ -165,7 +165,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode)
nick = TlenLocalNickFromJID(jid);
if (nick != NULL) {
- HCONTACT hContact;
+ MCONTACT hContact;
item = TlenListAdd(proto, LIST_ROSTER, jid);
if (item->nick) mir_free(item->nick);
item->nick = nick;
@@ -206,8 +206,8 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode)
// Delete orphaned contacts (if roster sync is enabled)
if (db_get_b(NULL, proto->m_szModuleName, "RosterSync", FALSE) == TRUE) {
- for (HCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; ) {
- HCONTACT hNext = hContact = db_find_next(hContact, proto->m_szModuleName);
+ for (MCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; ) {
+ MCONTACT hNext = hContact = db_find_next(hContact, proto->m_szModuleName);
ptrA jid( db_get_sa(hContact, proto->m_szModuleName, "jid"));
if (jid != NULL) {
if (!TlenListExist(proto, LIST_ROSTER, jid)) {
@@ -241,7 +241,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode)
XmlNode *queryNode, *itemNode, *n;
char *type, *jid;
char text[128];
- HCONTACT hContact;
+ MCONTACT hContact;
char *nText;
// TlenLog("<iq/> iqIdGetVcard (tlen)");
@@ -561,7 +561,7 @@ void TlenIqResultVersion(TlenProtocol *proto, XmlNode *iqNode)
if (( from=TlenXmlGetAttrValue( iqNode, "from" )) != NULL ) {
TLEN_LIST_ITEM *item;
if (( item=TlenListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *n;
if ( item->software ) mir_free( item->software );
if ( item->version ) mir_free( item->version );
@@ -598,7 +598,7 @@ void TlenIqResultInfo(TlenProtocol *proto, XmlNode *iqNode)
if (( from=TlenXmlGetAttrValue( queryNode, "from" )) != NULL ) {
TLEN_LIST_ITEM *item;
if (( item=TlenListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *version = TlenXmlGetChild(queryNode, "version");
item->protocolVersion = TlenTextDecode(version->text);
if (( hContact=TlenHContactFromJID(proto, item->jid )) != NULL ) {
diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp
index 6aed4ecadc..2879edfb82 100644
--- a/protocols/Tlen/src/tlen_misc.cpp
+++ b/protocols/Tlen/src/tlen_misc.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "tlen.h"
#include "tlen_list.h"
-void TlenDBAddEvent(TlenProtocol *proto, HCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob)
+void TlenDBAddEvent(TlenProtocol *proto, MCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = proto->m_szModuleName;
@@ -42,10 +42,10 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick)
PBYTE pCurBlob;
PBYTE pBlob;
DWORD cbBlob;
- HCONTACT hContact;
+ MCONTACT hContact;
if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
- hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
// strip resource if present
s = TlenLoginFromJID(jid);
@@ -72,7 +72,7 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick)
TlenDBAddEvent(proto, NULL, EVENTTYPE_AUTHREQUEST, 0, pBlob, cbBlob);
}
-char *TlenJIDFromHContact(TlenProtocol *proto, HCONTACT hContact)
+char *TlenJIDFromHContact(TlenProtocol *proto, MCONTACT hContact)
{
char *p = NULL;
DBVARIANT dbv;
@@ -83,14 +83,14 @@ char *TlenJIDFromHContact(TlenProtocol *proto, HCONTACT hContact)
return p;
}
-HCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid)
+MCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid)
{
DBVARIANT dbv;
char *p;
if (jid == NULL)
return NULL;
- for (HCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; hContact = db_find_next(hContact, proto->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; hContact = db_find_next(hContact, proto->m_szModuleName)) {
if ( db_get_s(hContact, proto->m_szModuleName, "jid", &dbv))
continue;
@@ -106,14 +106,14 @@ HCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid)
return NULL;
}
-HCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary)
+MCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (jid == NULL || jid[0] == '\0')
return NULL;
if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
- hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
db_set_s(hContact, proto->m_szModuleName, "jid", jid);
if (nick != NULL && nick[0] != '\0')
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp
index 05d609947c..31dc19bb4b 100644
--- a/protocols/Tlen/src/tlen_muc.cpp
+++ b/protocols/Tlen/src/tlen_muc.cpp
@@ -69,7 +69,7 @@ static int stringToHex(const char *str)
static char *getDisplayName(TlenProtocol *proto, const char *id)
{
char jid[256];
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);
@@ -101,7 +101,7 @@ BOOL TlenMUCInit(TlenProtocol *proto)
int TlenProtocol::MUCHandleEvent(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
int id;
MUCCEVENT *mucce=(MUCCEVENT *) lParam;
if (!strcmp(mucce->pszModule, m_szModuleName)) {
@@ -954,7 +954,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr)
queryResult.iItemsNum = 0;
- for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
+ for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
if ( db_get_b(hContact, szProto, "bChat", FALSE))
continue;
@@ -970,7 +970,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr)
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * queryResult.iItemsNum);
queryResult.iItemsNum = 0;
- for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
+ for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
if ( db_get_b(hContact, szProto, "bChat", FALSE))
continue;
@@ -1025,13 +1025,13 @@ INT_PTR TlenProtocol::MUCMenuHandleChats(WPARAM wParam, LPARAM lParam)
INT_PTR TlenProtocol::MUCContactMenuHandleMUC(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
if (!isOnline)
return 1;
- if ((hContact=(HCONTACT)wParam) != NULL && isOnline) {
+ if ((hContact=(MCONTACT)wParam) != NULL && isOnline) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
char serialId[32];
mir_snprintf(serialId, SIZEOF(serialId), TLEN_IQID"%d", TlenSerialNext(this));
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp
index 7f3f769ef2..f97cc1fb78 100644
--- a/protocols/Tlen/src/tlen_picture.cpp
+++ b/protocols/Tlen/src/tlen_picture.cpp
@@ -254,7 +254,7 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) {
mir_free(fromRaw);
}
-BOOL SendPicture(TlenProtocol *proto, HCONTACT hContact) {
+BOOL SendPicture(TlenProtocol *proto, MCONTACT hContact) {
DBVARIANT dbv;
if (!db_get(hContact, proto->m_szModuleName, "jid", &dbv)) {
char *jid = dbv.pszVal;
diff --git a/protocols/Tlen/src/tlen_picture.h b/protocols/Tlen/src/tlen_picture.h
index a15922a5a4..50e3b0b1e6 100644
--- a/protocols/Tlen/src/tlen_picture.h
+++ b/protocols/Tlen/src/tlen_picture.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "tlen.h"
void TlenProcessPic(XmlNode *node, TlenProtocol *proto);
-BOOL SendPicture(TlenProtocol *, HCONTACT hContact);
+BOOL SendPicture(TlenProtocol *, MCONTACT hContact);
#endif /* _TLEN_PICTURE_H */
diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp
index d37c9bcdc6..57bd773bf0 100644
--- a/protocols/Tlen/src/tlen_presence.cpp
+++ b/protocols/Tlen/src/tlen_presence.cpp
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void TlenProcessPresence(XmlNode *node, TlenProtocol *proto)
{
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *showNode, *statusNode;
TLEN_LIST_ITEM *item;
char *from, *type, *nick, *show;
@@ -178,7 +178,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto)
void setOwnStatusOnCList(TlenProtocol *proto, int status, char *statusMsg)
{
ptrA ownJid(db_get_sa(NULL, proto->m_szModuleName, "jid"));
- HCONTACT hContact = TlenHContactFromJID(proto, ownJid);
+ MCONTACT hContact = TlenHContactFromJID(proto, ownJid);
if(hContact){
if (db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != status)
db_set_w(hContact, proto->m_szModuleName, "Status", (WORD)status);
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 479026eb1b..4f996b8a38 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "tlen_avatar.h"
#include "tlen_file.h"
-DWORD_PTR TlenProtocol::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR TlenProtocol::GetCaps(int type, MCONTACT hContact)
{
if (type == PFLAGNUM_1)
return PF1_IM|PF1_AUTHREQ|PF1_SERVERCLIST|PF1_MODEMSG|PF1_BASICSEARCH|PF1_SEARCHBYEMAIL|PF1_EXTSEARCH|PF1_EXTSEARCHUI|PF1_SEARCHBYNAME|PF1_FILE;//|PF1_VISLIST|PF1_INVISLIST;
@@ -175,15 +175,15 @@ HWND TlenProtocol::SearchAdvanced(HWND owner)
}
-static HCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flags)
+static MCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flags)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *jid, *nick;
if ((hContact=TlenHContactFromJID(proto, newJid)) == NULL) {
// not already there: add
jid = mir_strdup(newJid); _strlwr(jid);
- hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
db_set_s(hContact, proto->m_szModuleName, "jid", jid);
if ((nick=TlenNickFromJID(newJid)) == NULL)
@@ -214,9 +214,9 @@ static HCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD fl
return hContact;
}
-HCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
+MCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
- HCONTACT hContact;
+ MCONTACT hContact;
TLEN_SEARCH_RESULT *jsr = (TLEN_SEARCH_RESULT*)psr;
if (jsr->hdr.cbSize != sizeof(TLEN_SEARCH_RESULT))
return NULL;
@@ -224,7 +224,7 @@ HCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
return hContact;
}
-HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
+MCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
{
DBEVENTINFO dbei = { sizeof(dbei) };
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
@@ -257,7 +257,7 @@ HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEven
char *lastName = firstName + strlen(firstName) + 1;
char *jid = lastName + strlen(lastName) + 1;
- HCONTACT hContact = (HCONTACT) AddToListByJID(this, jid, flags);
+ MCONTACT hContact = (MCONTACT) AddToListByJID(this, jid, flags);
mir_free(dbei.pBlob);
return hContact;
}
@@ -294,7 +294,7 @@ int TlenProtocol::Authorize(HANDLE hDbEvent)
// Automatically add this user to my roster if option is enabled
if (db_get_b(NULL, m_szModuleName, "AutoAdd", TRUE) == TRUE) {
- HCONTACT hContact;
+ MCONTACT hContact;
TLEN_LIST_ITEM *item;
if ((item=TlenListGetItemPtr(this, LIST_ROSTER, jid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
@@ -473,7 +473,7 @@ int TlenProtocol::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
return 0;
}
-int TlenProtocol::GetInfo(HCONTACT hContact, int infoType)
+int TlenProtocol::GetInfo(MCONTACT hContact, int infoType)
{
DBVARIANT dbv;
int iqId;
@@ -500,7 +500,7 @@ int TlenProtocol::GetInfo(HCONTACT hContact, int infoType)
return 0;
}
-int TlenProtocol::SetApparentMode(HCONTACT hContact, int mode)
+int TlenProtocol::SetApparentMode(MCONTACT hContact, int mode)
{
DBVARIANT dbv;
int oldMode;
@@ -539,12 +539,12 @@ int TlenProtocol::SetApparentMode(HCONTACT hContact, int mode)
struct SENDACKTHREADDATA
{
- __inline SENDACKTHREADDATA(TlenProtocol *_ppro, HCONTACT _hContact, int _msgid=0) :
+ __inline SENDACKTHREADDATA(TlenProtocol *_ppro, MCONTACT _hContact, int _msgid=0) :
proto(_ppro), hContact(_hContact), msgid(_msgid)
{}
TlenProtocol *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
int msgid;
};
@@ -599,7 +599,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr)
INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
if (isOnline && !db_get(hContact, m_szModuleName, "jid", &dbv)) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
@@ -609,7 +609,7 @@ INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam)
return 0;
}
-int TlenProtocol::SendMsg(HCONTACT hContact, int flags, const char* msgRAW)
+int TlenProtocol::SendMsg(MCONTACT hContact, int flags, const char* msgRAW)
{
DBVARIANT dbv;
char *msgEnc;
@@ -717,19 +717,19 @@ INT_PTR TlenProtocol::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
return GAIR_NOAVATAR;
}
-HANDLE TlenProtocol::GetAwayMsg(HCONTACT hContact)
+HANDLE TlenProtocol::GetAwayMsg(MCONTACT hContact)
{
SENDACKTHREADDATA *tdata = new SENDACKTHREADDATA(this, hContact, 0);
forkthread((void (__cdecl *)(void*))TlenGetAwayMsgThread, 0, (void*)tdata);
return (HANDLE)1;
}
-int TlenProtocol::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt)
+int TlenProtocol::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt)
{
return 0;
}
-HANDLE TlenProtocol::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE TlenProtocol::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
TLEN_FILE_TRANSFER *ft;
TLEN_LIST_ITEM *item;
@@ -752,7 +752,7 @@ HANDLE TlenProtocol::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOC
return (HANDLE)hTransfer;
}
-int TlenProtocol::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int TlenProtocol::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
TLEN_FILE_TRANSFER *ft;
char *nick;
@@ -775,7 +775,7 @@ int TlenProtocol::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** sz
return 0;
}
-int TlenProtocol::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int TlenProtocol::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *) hTransfer;
debugLogA("Invoking FileCancel()");
@@ -794,7 +794,7 @@ int TlenProtocol::FileCancel(HCONTACT hContact, HANDLE hTransfer)
return 0;
}
-HANDLE TlenProtocol::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE TlenProtocol::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
TLEN_FILE_TRANSFER *ft;
int i, j;
@@ -862,25 +862,25 @@ HANDLE TlenProtocol::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription,
return (HANDLE) ft;
}
-int TlenProtocol::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList){
+int TlenProtocol::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList){
return 0;
}
-int TlenProtocol::SendUrl(HCONTACT hContact, int flags, const char* urlt){
+int TlenProtocol::SendUrl(MCONTACT hContact, int flags, const char* urlt){
return 0;
}
-int TlenProtocol::RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt)
+int TlenProtocol::RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt)
{
return Proto_RecvMessage(hContact, evt);
}
-int TlenProtocol::RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt)
+int TlenProtocol::RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
{
return Proto_RecvFile(hContact, evt);
}
-int TlenProtocol::RecvUrl(HCONTACT hContact, PROTORECVEVENT*)
+int TlenProtocol::RecvUrl(MCONTACT hContact, PROTORECVEVENT*)
{
return 0;
}
@@ -904,12 +904,12 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
if (!isConnected) return 0;
if (!strcmp(cws->szModule, "CList")) {
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
char *szProto, *nick, *jid, *group;
- hContact = (HCONTACT) wParam;
+ hContact = (MCONTACT) wParam;
szProto = GetContactProto(hContact);
if (szProto == NULL || strcmp(szProto, m_szModuleName)) return 0;
// A contact's group is changed
@@ -956,7 +956,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam)
else if (!strcmp(cws->szSetting, "MyHandle")) {
char *newNick;
-// hContact = (HCONTACT) wParam;
+// hContact = (MCONTACT) wParam;
// szProto = GetContactProto(hContact);
// if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
@@ -1035,12 +1035,12 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam)
if (!isOnline) // should never happen
return 0;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL || strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
- if (!db_get((HCONTACT)wParam, m_szModuleName, "jid", &dbv)) {
+ if (!db_get((MCONTACT)wParam, m_szModuleName, "jid", &dbv)) {
char *jid, *p, *q;
jid = dbv.pszVal;
@@ -1058,7 +1058,7 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
-int TlenProtocol::UserIsTyping(HCONTACT hContact, int type)
+int TlenProtocol::UserIsTyping(MCONTACT hContact, int type)
{
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
@@ -1200,13 +1200,13 @@ int TlenProtocol::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPara
}
// PSS_ADDED
-int TlenProtocol::AuthRecv(HCONTACT hContact, PROTORECVEVENT* evt)
+int TlenProtocol::AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
{
return 1;
}
// PSS_AUTHREQUEST
-int TlenProtocol::AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage)
+int TlenProtocol::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage)
{
return 1;
}
@@ -1217,7 +1217,7 @@ HANDLE TlenProtocol::ChangeInfo(int iInfoType, void* pInfoData)
}
-int TlenProtocol::RecvContacts(HCONTACT hContact, PROTORECVEVENT* evt)
+int TlenProtocol::RecvContacts(MCONTACT hContact, PROTORECVEVENT* evt)
{
return 1;
}
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index 40ae861fcf..460f3d860f 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -352,7 +352,7 @@ void __cdecl TlenServerThread(ThreadData *info)
ProtoBroadcastAck(szProto, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
// Set all contacts to offline
- for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto))
+ for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto))
if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -595,7 +595,7 @@ static void TlenProcessAvatar(XmlNode* node, ThreadData *info)
static void TlenProcessMessage(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *bodyNode, *subjectNode, *xNode, *n;
char *from, *type, *nick, *p, *localMessage, *idStr;
DWORD msgTime;
@@ -728,7 +728,7 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info)
static void TlenProcessIq(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *queryNode = NULL;
char *type, *jid, *nick;
char *xmlns = NULL;
@@ -960,7 +960,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info)
*/
static void TlenProcessW(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *f, *e, *s, *body;
char *str, *localMessage;
int strSize;
@@ -1007,7 +1007,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info)
*/
static void TlenProcessM(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *f;//, *from;//username
char *tp;//typing start/stop
char *p, *n, *r, *s, *str, *localMessage;
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp
index 22ed3651e7..108214ebf2 100644
--- a/protocols/Tlen/src/tlen_userinfo.cpp
+++ b/protocols/Tlen/src/tlen_userinfo.cpp
@@ -132,7 +132,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam)
if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
return 0;
- HCONTACT hContact = (HCONTACT) lParam;
+ MCONTACT hContact = (MCONTACT) lParam;
char *szProto = GetContactProto(hContact);
if ((szProto != NULL && !strcmp(szProto, m_szModuleName)) || !lParam) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
@@ -155,7 +155,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam)
typedef struct {
TlenProtocol *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
}TLENUSERINFODLGDATA;
@@ -166,7 +166,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
case WM_INITDIALOG:
data = (TLENUSERINFODLGDATA*)mir_alloc(sizeof(TLENUSERINFODLGDATA));
- data->hContact = (HCONTACT) lParam;
+ data->hContact = (MCONTACT) lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data);
// lParam is hContact
TranslateDialogDefault(hwndDlg);
@@ -286,7 +286,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
switch (((LPNMHDR)lParam)->code) {
case PSN_INFOCHANGED:
{
- HCONTACT hContact = (HCONTACT) ((LPPSHNOTIFY) lParam)->lParam;
+ MCONTACT hContact = (MCONTACT) ((LPPSHNOTIFY) lParam)->lParam;
SendMessage(hwndDlg, WM_TLEN_REFRESH, 0, (LPARAM) hContact);
}
break;
diff --git a/protocols/Tlen/src/tlen_util.cpp b/protocols/Tlen/src/tlen_util.cpp
index 8f8837454b..981c6da6fb 100644
--- a/protocols/Tlen/src/tlen_util.cpp
+++ b/protocols/Tlen/src/tlen_util.cpp
@@ -440,7 +440,7 @@ BOOL IsAuthorized(TlenProtocol *proto, const char *jid)
}
-void TlenLogMessage(TlenProtocol *proto, HCONTACT hContact, DWORD flags, const char *message)
+void TlenLogMessage(TlenProtocol *proto, MCONTACT hContact, DWORD flags, const char *message)
{
int size = (int)strlen(message) + 2;
char *localMessage = (char *)mir_alloc(size);
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp
index 57cab89d2a..dca3634307 100644
--- a/protocols/Tlen/src/tlen_voice.cpp
+++ b/protocols/Tlen/src/tlen_voice.cpp
@@ -693,14 +693,14 @@ int TlenVoiceCancelAll(TlenProtocol *proto)
INT_PTR TlenProtocol::VoiceContactMenuHandleVoice(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
TLEN_FILE_TRANSFER *ft;
if (!isOnline)
return 1;
- if ((hContact=(HCONTACT)wParam) != NULL) {
+ if ((hContact=(MCONTACT)wParam) != NULL) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
char serialId[32];
mir_snprintf(serialId, SIZEOF(serialId), "%d", TlenSerialNext(this));
@@ -942,7 +942,7 @@ int TlenVoiceStart(TLEN_FILE_TRANSFER *ft, int mode)
static char *getDisplayName(TlenProtocol *proto, const char *id)
{
char jid[256];
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);