diff options
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 8 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_avatars.cpp | 10 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 16 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 44 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 48 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 10 |
6 files changed, 68 insertions, 68 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index a0d8a7abc8..b36ea81976 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -25,7 +25,7 @@ TCHAR* CVkProto::GetUserStoredPassword() void CVkProto::SetAllContactStatuses(int iStatus)
{
- for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
SetChatStatus(hContact, iStatus);
else if (getWord(hContact, "Status", 0) != iStatus)
@@ -33,9 +33,9 @@ void CVkProto::SetAllContactStatuses(int iStatus) }
}
-HANDLE CVkProto::FindUser(LONG dwUserid, bool bCreate)
+HCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate)
{
- for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
LONG dbUserid = getDword(hContact, "ID", -1);
if (dbUserid == -1)
continue;
@@ -47,7 +47,7 @@ HANDLE CVkProto::FindUser(LONG dwUserid, bool bCreate) if (!bCreate)
return NULL;
- HANDLE hNewContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ HCONTACT hNewContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hNewContact, (LPARAM)m_szModuleName);
setDword(hNewContact, "ID", dwUserid);
db_set_ts(hNewContact, "CList", "Group", m_defaultGroup);
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index 3784b08b8c..15c56ba41a 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -23,18 +23,18 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest* pReq) return;
PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
- GetAvatarFileName(pReq->pUserInfo, AI.filename, SIZEOF(AI.filename));
+ GetAvatarFileName((HCONTACT)pReq->pUserInfo, AI.filename, SIZEOF(AI.filename));
AI.format = ProtoGetBufferFormat(reply->pData);
FILE *out = _tfopen(AI.filename, _T("wb"));
if (out == NULL) {
- ProtoBroadcastAck(pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_FAILED, &AI, 0);
+ ProtoBroadcastAck((HCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_FAILED, &AI, 0);
return;
}
fwrite(reply->pData, 1, reply->dataLength, out);
fclose(out);
- ProtoBroadcastAck(pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
+ ProtoBroadcastAck((HCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
}
INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
@@ -93,7 +93,7 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM wParam, LPARAM lParam) return GAIR_NOAVATAR;
}
-void CVkProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen)
+void CVkProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
@@ -115,7 +115,7 @@ void CVkProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen) mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%d%s"), id, szFileType);
}
-void CVkProto::SetAvatarUrl(HANDLE hContact, LPCTSTR ptszUrl)
+void CVkProto::SetAvatarUrl(HCONTACT hContact, LPCTSTR ptszUrl)
{
ptrT oldUrl( getTStringA(hContact, "AvatarUrl"));
if (!lstrcmp(ptszUrl, oldUrl))
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 686c3f667c..31b583c62c 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -55,7 +55,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, JSONNODE *pDlg) GC_INFO gci = { 0 };
gci.pszModule = m_szModuleName;
gci.pszID = sid;
- gci.Flags = BYID | HCONTACT;
+ gci.Flags = GCF_BYID | GCF_HCONTACT;
CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci);
c->m_hContact = gci.hContact;
@@ -287,7 +287,7 @@ CVkChatUser* CVkChatInfo::GetUserById(LPCTSTR ptszId) /////////////////////////////////////////////////////////////////////////////////////////
-void CVkProto::SetChatStatus(HANDLE hContact, int iStatus)
+void CVkProto::SetChatStatus(HCONTACT hContact, int iStatus)
{
ptrT tszChatID(getTStringA(hContact, "ChatRoomID"));
if (tszChatID == NULL)
@@ -372,7 +372,7 @@ static INT_PTR CALLBACK InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA {
CVkProto *ppro = (CVkProto*)lParam;
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_CONTACT);
- for (HANDLE hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
TCHAR *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
int idx = SendMessage(hwndCombo, CB_ADDSTRING, 0, LPARAM(ptszNick));
SendMessage(hwndCombo, CB_SETITEMDATA, idx, (LPARAM)hContact);
@@ -413,7 +413,7 @@ LPTSTR CVkProto::ChangeChatTopic(CVkChatInfo *cc) void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch)
{
- HANDLE hContact;
+ HCONTACT hContact;
switch (gch->dwData) {
case IDM_TOPIC:
@@ -425,7 +425,7 @@ void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch) break;
case IDM_INVITE:
- hContact = (HANDLE)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INVITE), NULL, InviteDlgProc, (LPARAM)this);
+ hContact = (HCONTACT)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INVITE), NULL, InviteDlgProc, (LPARAM)this);
if (hContact != NULL) {
int uid = getDword(hContact, "ID", -1);
if (uid != -1)
@@ -474,7 +474,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) switch (gch->dwData) {
case IDM_INFO:
- if (HANDLE hContact = FindUser(cu->m_uid))
+ if (HCONTACT hContact = FindUser(cu->m_uid))
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
@@ -527,7 +527,7 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam) static void FilterContacts(HWND hwndDlg, CVkProto *ppro)
{
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (lstrcmpA(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, (WPARAM)hContact, 0))
@@ -585,7 +585,7 @@ static INT_PTR CALLBACK GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDOK:
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
CMStringA uids;
- for (HANDLE hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
if (ppro->isChatRoom(hContact))
continue;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 8c1baa072c..2a0bfb0a90 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -103,7 +103,7 @@ int CVkProto::OnPreShutdown(WPARAM wParam, LPARAM lParam) //////////////////////////////////////////////////////////////////////////////
-DWORD_PTR CVkProto::GetCaps(int type, HANDLE hContact)
+DWORD_PTR CVkProto::GetCaps(int type, HCONTACT hContact)
{
switch(type) {
case PFLAGNUM_1:
@@ -135,7 +135,7 @@ DWORD_PTR CVkProto::GetCaps(int type, HANDLE hContact) //////////////////////////////////////////////////////////////////////////////
-int CVkProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
+int CVkProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
{
Proto_RecvMessage(hContact, pre);
return 0;
@@ -145,11 +145,11 @@ int CVkProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre) struct TFakeAckParams
{
- __inline TFakeAckParams(HANDLE _hContact, int _msgid) :
+ __inline TFakeAckParams(HCONTACT _hContact, int _msgid) :
hContact(_hContact), msgid(_msgid)
{}
- HANDLE hContact;
+ HCONTACT hContact;
int msgid;
};
@@ -161,7 +161,7 @@ void CVkProto::SendMsgAck(void *param) delete ack;
}
-int CVkProto::SendMsg(HANDLE hContact, int flags, const char *msg)
+int CVkProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
{
LONG userID = getDword(hContact, "ID", -1);
if (userID == -1)
@@ -202,7 +202,7 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) }
if (m_bServerDelivery)
- ProtoBroadcastAck(pReq->pData, ACKTYPE_MESSAGE, iResult, pReq->pUserInfo, 0);
+ ProtoBroadcastAck((HCONTACT)pReq->pData, ACKTYPE_MESSAGE, iResult, pReq->pUserInfo, 0);
pReq->pData = NULL;
}
@@ -278,7 +278,7 @@ HANDLE CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return NULL;
}
-int CVkProto::AuthRequest(HANDLE hContact,const PROTOCHAR *message)
+int CVkProto::AuthRequest(HCONTACT hContact,const PROTOCHAR *message)
{
return 0;
}
@@ -295,7 +295,7 @@ int CVkProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) return 1;
}
-int CVkProto::UserIsTyping(HANDLE hContact, int type)
+int CVkProto::UserIsTyping(HCONTACT hContact, int type)
{
return 0;
}
@@ -305,7 +305,7 @@ HANDLE CVkProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent) return NULL;
}
-int CVkProto::AuthRecv(HANDLE hContact,PROTORECVEVENT *)
+int CVkProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
@@ -316,17 +316,17 @@ HANDLE CVkProto::ChangeInfo(int type,void *info_data) return NULL;
}
-HANDLE CVkProto::FileAllow(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *path)
+HANDLE CVkProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
return NULL;
}
-int CVkProto::FileCancel(HANDLE hContact,HANDLE hTransfer)
+int CVkProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int CVkProto::FileDeny(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *reason)
+int CVkProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
return 1;
}
@@ -336,7 +336,7 @@ int CVkProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filename return 1;
}
-int CVkProto::GetInfo(HANDLE hContact, int infoType)
+int CVkProto::GetInfo(HCONTACT hContact, int infoType)
{
// TODO: Most probably some ProtoAck should be here instead
return 1;
@@ -352,47 +352,47 @@ HWND CVkProto::CreateExtendedSearchUI(HWND owner) return NULL;
}
-int CVkProto::RecvContacts(HANDLE hContact,PROTORECVEVENT *)
+int CVkProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::RecvFile(HANDLE hContact,PROTORECVFILET *)
+int CVkProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int CVkProto::RecvUrl(HANDLE hContact,PROTORECVEVENT *)
+int CVkProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::SendContacts(HANDLE hContact,int flags,int nContacts,HANDLE *hContactsList)
+int CVkProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
{
return 1;
}
-HANDLE CVkProto::SendFile(HANDLE hContact,const PROTOCHAR *desc, PROTOCHAR **files)
+HANDLE CVkProto::SendFile(HCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
return NULL;
}
-int CVkProto::SendUrl(HANDLE hContact,int flags,const char *url)
+int CVkProto::SendUrl(HCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int CVkProto::SetApparentMode(HANDLE hContact,int mode)
+int CVkProto::SetApparentMode(HCONTACT hContact,int mode)
{
return 1;
}
-int CVkProto::RecvAwayMsg(HANDLE hContact,int mode,PROTORECVEVENT *evt)
+int CVkProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
-HANDLE CVkProto::GetAwayMsg(HANDLE hContact)
+HANDLE CVkProto::GetAwayMsg(HCONTACT hContact)
{
return 0; // Status messages are disabled
}
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index b4906e97d5..7d247b2776 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -100,7 +100,7 @@ struct CVkChatInfo : public MZeroedObject int m_chatid, m_admin_id;
bool m_bHistoryRead;
ptrT m_tszTopic, m_tszId;
- HANDLE m_hContact;
+ HCONTACT m_hContact;
OBJLIST<CVkChatUser> m_users;
OBJLIST<CVkChatMessage> m_msgs;
@@ -121,18 +121,18 @@ struct CVkProto : public PROTO<CVkProto> virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HANDLE hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HANDLE hContact, const TCHAR *szMessage);
+ virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HANDLE hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HANDLE hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HANDLE hContact, HANDLE hTransfer, const TCHAR *szReason);
+ 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 int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HANDLE hContact = NULL);
- virtual int __cdecl GetInfo(HANDLE hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
@@ -140,24 +140,24 @@ struct CVkProto : public PROTO<CVkProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HANDLE hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HANDLE hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HANDLE hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HANDLE hContact, PROTORECVEVENT*);
+ 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 SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList);
- virtual HANDLE __cdecl SendFile(HANDLE hContact, const TCHAR *szDescription, TCHAR** ppszFiles);
- virtual int __cdecl SendMsg(HANDLE hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HANDLE hContact, int flags, const char* url);
+ 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 SetApparentMode(HANDLE hContact, int mode);
+ virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HANDLE hContact);
- virtual int __cdecl RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HANDLE hContact, int type);
+ virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -259,10 +259,10 @@ private: void OnLoggedOut();
void ShutdownSession();
- void SetAvatarUrl(HANDLE hContact, LPCTSTR ptszUrl);
- void GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen);
+ void SetAvatarUrl(HCONTACT hContact, LPCTSTR ptszUrl);
+ void GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen);
- HANDLE FindUser(LONG userid, bool bCreate = false);
+ HCONTACT FindUser(LONG userid, bool bCreate = false);
void SetAllContactStatuses(int status);
@@ -297,7 +297,7 @@ private: void LogMenuHook(CVkChatInfo*, GCHOOK*);
void NickMenuHook(CVkChatInfo*, GCHOOK*);
LPTSTR ChangeChatTopic(CVkChatInfo*);
- void SetChatStatus(HANDLE hContact, int iStatus);
+ void SetChatStatus(HCONTACT hContact, int iStatus);
CVkChatInfo* GetChatById(LPCTSTR ptszId);
INT_PTR __cdecl SvcCreateChat(WPARAM, LPARAM);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index d51b0e96e5..cac5aee537 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -249,7 +249,7 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (userid == 0)
return;
- HANDLE hContact;
+ HCONTACT hContact;
if (userid == m_myUserId)
hContact = NULL;
else if ((hContact = FindUser(userid, false)) == NULL)
@@ -311,7 +311,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq bool bCleanContacts = getByte("AutoClean", 0) != 0;
LIST<void> arContacts(10, PtrKeySortT);
if (bCleanContacts)
- for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if (!isChatRoom(hContact))
arContacts.insert(hContact);
@@ -321,7 +321,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq continue;
CMString tszNick;
- HANDLE hContact = FindUser(_ttoi(szValue), true);
+ HCONTACT hContact = FindUser(_ttoi(szValue), true);
arContacts.remove(hContact);
szValue = json_as_string(json_get(pInfo, "first_name"));
if (szValue) {
@@ -468,7 +468,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (pAttachments != NULL)
ptszBody = mir_tstrdup(CMString(ptszBody) + GetAttachmentDescr(pAttachments));
- HANDLE hContact = FindUser(uid, true);
+ HCONTACT hContact = FindUser(uid, true);
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_TCHAR;
@@ -523,7 +523,7 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates) CMStringA mids;
int msgid, uid, flags;
- HANDLE hContact;
+ HCONTACT hContact;
JSONNODE *pChild;
for (int i = 0; (pChild = json_at(pUpdates, i)) != NULL; i++) {
|