From 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 20:47:51 +0000 Subject: HCONTACT is not needed anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/src/avatar.cpp | 16 +++++----- protocols/Yahoo/src/chat.cpp | 22 ++++++------- protocols/Yahoo/src/file_transfer.cpp | 14 ++++---- protocols/Yahoo/src/file_transfer.h | 2 +- protocols/Yahoo/src/im.cpp | 14 ++++---- protocols/Yahoo/src/links.cpp | 2 +- protocols/Yahoo/src/proto.cpp | 42 ++++++++++++------------ protocols/Yahoo/src/proto.h | 60 +++++++++++++++++------------------ protocols/Yahoo/src/services.cpp | 10 +++--- protocols/Yahoo/src/user_info.cpp | 4 +-- protocols/Yahoo/src/util.cpp | 12 +++---- protocols/Yahoo/src/yahoo.cpp | 34 ++++++++++---------- 12 files changed, 116 insertions(+), 116 deletions(-) (limited to 'protocols/Yahoo') diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 4eb38181ac..063231212a 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -171,7 +171,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt) LOG(("yahoo_recv_avatarthread who:%s url:%s checksum: %d", avt->who, avt->pic_url, avt->cksum)); - HCONTACT hContact = getbuddyH(avt->who); + MCONTACT hContact = getbuddyH(avt->who); if (!hContact) { LOG(("ERROR: Can't find buddy: %s", avt->who)); @@ -258,7 +258,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt) void CYahooProto::ext_got_picture(const char *me, const char *who, const char *pic_url, int cksum, int type) { - HCONTACT hContact = 0; + MCONTACT hContact = 0; LOG(("[ext_yahoo_got_picture] for %s with url %s (checksum: %d) type: %d", who, pic_url, cksum, type)); @@ -450,7 +450,7 @@ void CYahooProto::ext_got_picture(const char *me, const char *who, const char *p void CYahooProto::ext_got_picture_checksum(const char *me, const char *who, int cksum) { - HCONTACT hContact = 0; + MCONTACT hContact = 0; LOG(("ext_yahoo_got_picture_checksum for %s checksum: %d", who, cksum)); @@ -488,7 +488,7 @@ void CYahooProto::ext_got_picture_checksum(const char *me, const char *who, int void CYahooProto::ext_got_picture_update(const char *me, const char *who, int buddy_icon) { - HCONTACT hContact = 0; + MCONTACT hContact = 0; LOG(("ext_got_picture_update for %s buddy_icon: %d", who, buddy_icon)); @@ -506,7 +506,7 @@ void CYahooProto::ext_got_picture_update(const char *me, const char *who, int bu void CYahooProto::ext_got_picture_status(const char *me, const char *who, int buddy_icon) { - HCONTACT hContact = 0; + MCONTACT hContact = 0; LOG(("ext_yahoo_got_picture_status for %s buddy_icon: %d", who, buddy_icon)); @@ -572,7 +572,7 @@ void CYahooProto::ext_got_avatar_share(int buddy_icon) setByte("ShareAvatar", buddy_icon ); } -void CYahooProto::reset_avatar(HCONTACT hContact) +void CYahooProto::reset_avatar(MCONTACT hContact) { LOG(("[YAHOO_RESET_AVATAR]")); @@ -586,7 +586,7 @@ void CYahooProto::request_avatar(const char* who) return; } - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (!hContact) return; @@ -606,7 +606,7 @@ void CYahooProto::request_avatar(const char* who) else LOG(("Avatar Not Available for: %s Last Check: %ld Current: %ld (Flood Check in Effect)", who, last_chk, cur_time)); } -void CYahooProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, int cbLen, int type) +void CYahooProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen, int type) { int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName); diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 75dbf851ea..1130a248af 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -244,7 +244,7 @@ void CYahooProto::ChatEvent(const char* room, const char* who, int evt, const TC TCHAR* idt = mir_a2t(room); TCHAR* snt = mir_a2t(who); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); TCHAR* nick = hContact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR) : snt; GCDEST gcd = { m_szModuleName, idt, evt }; @@ -395,17 +395,17 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // Invite to chat dialog -static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, YList* &who, char* room, CYahooProto* ppro, TCHAR *msg) +static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, YList* &who, char* room, CYahooProto* ppro, TCHAR *msg) { bool root = !hItem; if (root) - hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0); + hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0); while (hItem) { if (IsHContactGroup(hItem)) { - HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem); + MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem); if (hItemT) clist_chat_invite_send(hItemT, hwndList, who, room, ppro, msg); } @@ -429,7 +429,7 @@ static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, YList* &who, c } } } - hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem); + hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem); } if (root && who) @@ -451,23 +451,23 @@ static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, YList* &who, c } } -static void ClistValidateContact(HCONTACT hItem, HWND hwndList, CYahooProto* ppro) +static void ClistValidateContact(MCONTACT hItem, HWND hwndList, CYahooProto* ppro) { if (!ppro->IsMyContact(hItem) || ppro->isChatRoom(hItem) || ppro->getWord(hItem, "Status", ID_STATUS_OFFLINE) == ID_STATUS_ONTHEPHONE) SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0); } -static void ClistChatPrepare(HCONTACT hItem, HWND hwndList, CYahooProto* ppro) +static void ClistChatPrepare(MCONTACT hItem, HWND hwndList, CYahooProto* ppro) { if (hItem == NULL) - hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0); + hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0); while (hItem) { - HCONTACT hItemN = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem); + MCONTACT hItemN = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem); if (IsHContactGroup(hItem)) { - HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem); + MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem); if (hItemT) ClistChatPrepare(hItemT, hwndList, ppro); } @@ -516,7 +516,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA { case CLN_NEWCONTACT: if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0) - ClistValidateContact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro); + ClistValidateContact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro); break; case CLN_LISTREBUILT: diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index e83f9d3836..4b2497574a 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -19,7 +19,7 @@ YList *file_transfers=NULL; -static y_filetransfer* new_ft(CYahooProto* ppro, int id, HCONTACT hContact, const char *who, const char *msg, +static y_filetransfer* new_ft(CYahooProto* ppro, int id, MCONTACT hContact, const char *who, const char *msg, const char *url, const char *ft_token, int y7, YList *fs, int sending) { yahoo_file_info * fi; @@ -478,7 +478,7 @@ void CYahooProto::ext_got_file(const char *me, const char *who, const char *url, { LOG(("[ext_yahoo_got_file] ident:%s, who: %s, url: %s, expires: %lu, msg: %s, fname: %s, fsize: %lu ftoken: %s y7: %d", me, who, url, expires, msg, fname, fesize, ft_token == NULL ? "NULL" : ft_token, y7)); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (hContact == NULL) hContact = add_buddy(who, who, 0 /* NO FT for other IMs */, PALF_TEMPORARY); @@ -533,7 +533,7 @@ void CYahooProto::ext_got_file(const char *me, const char *who, const char *url, void CYahooProto::ext_got_files(const char *me, const char *who, const char *ft_token, int y7, YList* files) { - HCONTACT hContact; + MCONTACT hContact; y_filetransfer *ft; YList *f; char fn[4096]; @@ -699,7 +699,7 @@ void __cdecl CYahooProto::send_filethread(void *psf) //////////////////////////////////////////////////////////////////////////////////////// // SendFile - sends a file -HANDLE __cdecl CYahooProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles ) +HANDLE __cdecl CYahooProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles ) { DBVARIANT dbv; y_filetransfer *sf; @@ -763,7 +763,7 @@ HANDLE __cdecl CYahooProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescr //////////////////////////////////////////////////////////////////////////////////////// // FileAllow - starts a file transfer -HANDLE __cdecl CYahooProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath) +HANDLE __cdecl CYahooProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath) { y_filetransfer *ft = (y_filetransfer *)hTransfer; size_t len; @@ -792,7 +792,7 @@ HANDLE __cdecl CYahooProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const //////////////////////////////////////////////////////////////////////////////////////// // FileCancel - cancels a file transfer -int __cdecl CYahooProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) +int __cdecl CYahooProto::FileCancel(MCONTACT hContact, HANDLE hTransfer) { debugLogA("[YahooFileCancel]"); @@ -815,7 +815,7 @@ int __cdecl CYahooProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) //////////////////////////////////////////////////////////////////////////////////////// // FileDeny - denies a file transfer -int __cdecl CYahooProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*) +int __cdecl CYahooProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*) { /* deny file receive request.. just ignore it! */ y_filetransfer *ft = (y_filetransfer *)hTransfer; diff --git a/protocols/Yahoo/src/file_transfer.h b/protocols/Yahoo/src/file_transfer.h index cdbacd9c32..b57a56867d 100644 --- a/protocols/Yahoo/src/file_transfer.h +++ b/protocols/Yahoo/src/file_transfer.h @@ -22,7 +22,7 @@ typedef struct { char *msg; char *ftoken; char *relay; - HCONTACT hContact; + MCONTACT hContact; int cancel; char *url; HANDLE hWaitEvent; diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index fc295a4a42..b85ce78357 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -100,7 +100,7 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons /* Need to strip off formatting stuff first. Then do all decoding/converting */ LOG(("%s: %s", who, umsg)); - HCONTACT hContact = add_buddy(who, who, protocol, PALF_TEMPORARY); + MCONTACT hContact = add_buddy(who, who, protocol, PALF_TEMPORARY); //setWord(hContact, "yprotoid", protocol); Set_Protocol(hContact, protocol); @@ -154,24 +154,24 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons void __cdecl CYahooProto::im_sendacksuccess(void *hContact) { - ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)1, 0); + ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)1, 0); } void __cdecl CYahooProto::im_sendackfail(void *hContact) { SleepEx(1000, TRUE); - ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, + ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)Translate("The message send timed out.")); } void __cdecl CYahooProto::im_sendackfail_longmsg(void *hContact) { SleepEx(1000, TRUE); - ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, + ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)Translate("Message is too long: Yahoo messages are limited by 800 UTF8 chars")); } -int __cdecl CYahooProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc) +int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc) { if (!m_bLoggedIn) {/* don't send message if we not connected! */ ForkThread(&CYahooProto::im_sendackfail, (void*)hContact); @@ -207,7 +207,7 @@ int __cdecl CYahooProto::SendMsg(HCONTACT hContact, int flags, const char* pszSr //////////////////////////////////////////////////////////////////////////////////////// // RecvMsg -int __cdecl CYahooProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) +int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) { db_unset(hContact, "CList", "Hidden"); @@ -227,7 +227,7 @@ int __cdecl CYahooProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) INT_PTR __cdecl CYahooProto::SendNudge(WPARAM wParam, LPARAM lParam) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; debugLogA("[YAHOO_SENDNUDGE]"); diff --git a/protocols/Yahoo/src/links.cpp b/protocols/Yahoo/src/links.cpp index d1136a507a..9aef65c76b 100644 --- a/protocols/Yahoo/src/links.cpp +++ b/protocols/Yahoo/src/links.cpp @@ -148,7 +148,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM wParam, LPARAM lParam) if (arg) *arg = 0; } - HCONTACT hContact = proto->add_buddy(id, id, 0, PALF_TEMPORARY); /* ensure contact is on list */ + MCONTACT hContact = proto->add_buddy(id, id, 0, PALF_TEMPORARY); /* ensure contact is on list */ if (hContact) CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, (LPARAM)msg); diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index b607385fa0..4987c50b34 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -99,7 +99,7 @@ int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM) //////////////////////////////////////////////////////////////////////////////////////// // AddToList - adds a contact to the contact list -HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) +MCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) { debugLogA("[YahooAddToList] Flags: %d", flags); @@ -114,7 +114,7 @@ HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) } char *id = psr->flags & PSR_UNICODE ? mir_utf8encodeW((wchar_t*)psr->id) : mir_utf8encode((char*)psr->id); - HCONTACT hContact = getbuddyH(id); + MCONTACT hContact = getbuddyH(id); if (hContact != NULL) { if (db_get_b(hContact, "CList", "NotOnList", 0)) { debugLogA("[YahooAddToList] Temporary Buddy:%s already on our buddy list", id); @@ -137,7 +137,7 @@ HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) return hContact; } -HCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent ) +MCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent ) { debugLogA("[YahooAddToListByEvent]"); if (!m_bLoggedIn) @@ -166,7 +166,7 @@ HCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HAN return 0; } - HCONTACT hContact = DbGetAuthEventContact(&dbei); + MCONTACT hContact = DbGetAuthEventContact(&dbei); if (hContact != NULL) debugLogA("Temp Buddy found at: %p ", hContact); else @@ -201,7 +201,7 @@ int CYahooProto::Authorize( HANDLE hdbe ) return 1; /* Need to remove the buddy from our Miranda Lists */ - HCONTACT hContact = DbGetAuthEventContact(&dbei); + MCONTACT hContact = DbGetAuthEventContact(&dbei); if (hContact != NULL) { ptrA who( getStringA(hContact, YAHOO_LOGINID)); if (who) { @@ -246,7 +246,7 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) } /* Need to remove the buddy from our Miranda Lists */ - HCONTACT hContact = DbGetAuthEventContact(&dbei); + MCONTACT hContact = DbGetAuthEventContact(&dbei); if (hContact != NULL) { ptrA who( getStringA(hContact, YAHOO_LOGINID)); if (who) { @@ -264,7 +264,7 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) //////////////////////////////////////////////////////////////////////////////////////// // PSR_AUTH -int __cdecl CYahooProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) +int __cdecl CYahooProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre) { debugLogA("[YahooRecvAuth] "); db_unset(hContact,"CList","Hidden"); @@ -276,7 +276,7 @@ int __cdecl CYahooProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) //////////////////////////////////////////////////////////////////////////////////////// // PSS_AUTHREQUEST -int __cdecl CYahooProto::AuthRequest(HCONTACT hContact, const TCHAR* msg ) +int __cdecl CYahooProto::AuthRequest(MCONTACT hContact, const TCHAR* msg ) { debugLogA("[YahooSendAuthRequest]"); @@ -299,7 +299,7 @@ HANDLE __cdecl CYahooProto::ChangeInfo( int /*iInfoType*/, void* ) //////////////////////////////////////////////////////////////////////////////////////// // GetCaps - return protocol capabilities bits -DWORD_PTR __cdecl CYahooProto::GetCaps(int type, HCONTACT hContact) +DWORD_PTR __cdecl CYahooProto::GetCaps(int type, MCONTACT hContact) { switch ( type ) { case PFLAGNUM_1: @@ -334,10 +334,10 @@ DWORD_PTR __cdecl CYahooProto::GetCaps(int type, HCONTACT hContact) void __cdecl CYahooProto::get_info_thread(void *hContact) { SleepEx(500, TRUE); - ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0); + ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0); } -int __cdecl CYahooProto::GetInfo(HCONTACT hContact, int /*infoType*/ ) +int __cdecl CYahooProto::GetInfo(MCONTACT hContact, int /*infoType*/ ) { ForkThread(&CYahooProto::get_info_thread, (void*)hContact); return 0; @@ -362,7 +362,7 @@ HANDLE __cdecl CYahooProto::SearchByName( const PROTOCHAR* nick, const PROTOCHAR //////////////////////////////////////////////////////////////////////////////////////// // RecvContacts -int __cdecl CYahooProto::RecvContacts(HCONTACT/*hContact*/, PROTORECVEVENT*) +int __cdecl CYahooProto::RecvContacts(MCONTACT/*hContact*/, PROTORECVEVENT*) { return 1; } @@ -370,7 +370,7 @@ int __cdecl CYahooProto::RecvContacts(HCONTACT/*hContact*/, PROTORECVEVENT*) //////////////////////////////////////////////////////////////////////////////////////// // RecvFile -int __cdecl CYahooProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt) +int __cdecl CYahooProto::RecvFile(MCONTACT hContact, PROTORECVFILET* evt) { db_unset(hContact, "CList", "Hidden"); @@ -380,7 +380,7 @@ int __cdecl CYahooProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt) //////////////////////////////////////////////////////////////////////////////////////// // RecvUrl -int __cdecl CYahooProto::RecvUrl(HCONTACT/*hContact*/, PROTORECVEVENT*) +int __cdecl CYahooProto::RecvUrl(MCONTACT/*hContact*/, PROTORECVEVENT*) { return 1; } @@ -388,7 +388,7 @@ int __cdecl CYahooProto::RecvUrl(HCONTACT/*hContact*/, PROTORECVEVENT*) //////////////////////////////////////////////////////////////////////////////////////// // SendContacts -int __cdecl CYahooProto::SendContacts(HCONTACT/*hContact*/, int /*flags*/, int /*nContacts*/, HCONTACT* /*hContactsList*/) +int __cdecl CYahooProto::SendContacts(MCONTACT/*hContact*/, int /*flags*/, int /*nContacts*/, MCONTACT* /*hContactsList*/) { return 1; } @@ -396,7 +396,7 @@ int __cdecl CYahooProto::SendContacts(HCONTACT/*hContact*/, int /*flags*/, int / //////////////////////////////////////////////////////////////////////////////////////// // SendUrl -int __cdecl CYahooProto::SendUrl(HCONTACT/*hContact*/, int /*flags*/, const char* /*url*/) +int __cdecl CYahooProto::SendUrl(MCONTACT/*hContact*/, int /*flags*/, const char* /*url*/) { return 1; } @@ -404,7 +404,7 @@ int __cdecl CYahooProto::SendUrl(HCONTACT/*hContact*/, int /*flags*/, const char //////////////////////////////////////////////////////////////////////////////////////// // SetApparentMode - sets the visibility status -int __cdecl CYahooProto::SetApparentMode(HCONTACT hContact, int mode) +int __cdecl CYahooProto::SetApparentMode(MCONTACT hContact, int mode) { if (mode && mode != ID_STATUS_OFFLINE) return 1; @@ -524,7 +524,7 @@ void __cdecl CYahooProto::get_status_thread(void *param) int l; DBVARIANT dbv; char *gm = NULL, *sm = NULL, *fm; - HCONTACT hContact = (HCONTACT)param; + MCONTACT hContact = (MCONTACT)param; Sleep(150); @@ -583,7 +583,7 @@ void __cdecl CYahooProto::get_status_thread(void *param) ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)(TCHAR*)_A2T(fm)); } -HANDLE __cdecl CYahooProto::GetAwayMsg(HCONTACT hContact) +HANDLE __cdecl CYahooProto::GetAwayMsg(MCONTACT hContact) { debugLogA("[YahooGetAwayMessage] "); @@ -601,7 +601,7 @@ HANDLE __cdecl CYahooProto::GetAwayMsg(HCONTACT hContact) //////////////////////////////////////////////////////////////////////////////////////// // PSR_AWAYMSG -int __cdecl CYahooProto::RecvAwayMsg(HCONTACT/*hContact*/, int /*statusMode*/, PROTORECVEVENT*) +int __cdecl CYahooProto::RecvAwayMsg(MCONTACT/*hContact*/, int /*statusMode*/, PROTORECVEVENT*) { return 1; } @@ -674,7 +674,7 @@ INT_PTR __cdecl CYahooProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // UserIsTyping - sends a UTN notification -int __cdecl CYahooProto::UserIsTyping(HCONTACT hContact, int type) +int __cdecl CYahooProto::UserIsTyping(MCONTACT hContact, int type) { if (!m_bLoggedIn) return 0; diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index 667473292b..d01daf5144 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -25,23 +25,23 @@ struct CYahooProto : public PROTO // PROTO_INTERFACE //==================================================================================== - virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr ); - virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent ); + virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr ); + virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent ); virtual int __cdecl Authorize( HANDLE hDbEvent ); virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason ); - virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* ); - virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage ); + virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* ); + virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage ); virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData ); - virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const 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 ); @@ -49,25 +49,25 @@ struct CYahooProto : public PROTO virtual HWND __cdecl SearchAdvanced( HWND owner ); virtual HWND __cdecl CreateExtendedSearchUI( HWND owner ); - virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*); - virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*); - virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*); - virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*); + virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*); + virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*); + virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*); + virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*); - virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList); - virtual HANDLE __cdecl SendFile(HCONTACT hContact, const 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 m_iStatus, const PROTOCHAR *msg); virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam); - virtual int __cdecl UserIsTyping(HCONTACT hContact, int type); + virtual int __cdecl UserIsTyping(MCONTACT hContact, int type); virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam); @@ -152,11 +152,11 @@ struct CYahooProto : public PROTO void ext_got_picture_upload(const char *me, const char *url, unsigned int ts); void ext_got_avatar_share(int buddy_icon); - void reset_avatar(HCONTACT hContact); + void reset_avatar(MCONTACT hContact); void request_avatar(const char* who); void SendAvatar(const TCHAR *szFile); - void GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, int cbLen, int type); + void GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen, int type); //====| chat.cpp |==================================================================== void ChatRegister(void); @@ -223,20 +223,20 @@ struct CYahooProto : public PROTO int __cdecl OnUserInfoInit( WPARAM wParam, LPARAM lParam ); //====| util.cpp |==================================================================== - int GetStringUtf(HCONTACT hContact, const char* name, DBVARIANT* ); - DWORD SetStringUtf(HCONTACT hContact, const char* valueName, const char* parValue ); + int GetStringUtf(MCONTACT hContact, const char* name, DBVARIANT* ); + DWORD SetStringUtf(MCONTACT hContact, const char* valueName, const char* parValue ); - DWORD Set_Protocol(HCONTACT hContact, int protocol ); + DWORD Set_Protocol(MCONTACT hContact, int protocol ); int ShowNotification(const TCHAR *title, const TCHAR *info, DWORD flags); void ShowError(const TCHAR *title, const TCHAR *buff); int ShowPopup( const TCHAR* nickname, const TCHAR* msg, const char *szURL ); - bool IsMyContact(HCONTACT hContact); + bool IsMyContact(MCONTACT hContact); //====| yahoo.cpp |=================================================================== - HCONTACT add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags); + MCONTACT add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags); const char *find_buddy( const char *yahoo_id); - HCONTACT getbuddyH(const char *yahoo_id); + MCONTACT getbuddyH(const char *yahoo_id); void remove_buddy(const char *who, int protocol); void logout(); @@ -272,7 +272,7 @@ struct CYahooProto : public PROTO void ext_login_response(int succ, const char *url); void ext_login(enum yahoo_status login_mode); - void AddBuddy(HCONTACT hContact, const char *group, const TCHAR *msg); + void AddBuddy(MCONTACT hContact, const char *group, const TCHAR *msg); void YAHOO_utils_logversion(); diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index ebf142a7ab..dc28575a65 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -31,7 +31,7 @@ void CYahooProto::logoff_buddies() { //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)) { setWord( hContact, "Status", ID_STATUS_OFFLINE ); setDword(hContact, "IdleTS", 0); setDword(hContact, "PictLastCheck", 0); @@ -83,7 +83,7 @@ void CYahooProto::BroadcastStatus(int s) int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; debugLogA("[YahooContactDeleted]"); @@ -254,11 +254,11 @@ INT_PTR __cdecl CYahooProto::OnShowProfileCommand(WPARAM wParam, LPARAM lParam) /** * We don't show profile for users using other IM clients through the IM server bridge */ - if (getWord((HCONTACT)wParam, "yprotoid", 0) != 0) { + if (getWord((MCONTACT)wParam, "yprotoid", 0) != 0) { return 0; } - if (getString((HCONTACT)wParam, YAHOO_LOGINID, &dbv)) + if (getString((MCONTACT)wParam, YAHOO_LOGINID, &dbv)) return 0; mir_snprintf(tUrl, sizeof(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal); @@ -497,7 +497,7 @@ void CYahooProto::MenuUninit( void ) int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) { - const HCONTACT hContact = (HCONTACT)wParam; + const MCONTACT hContact = (MCONTACT)wParam; if (!IsMyContact(hContact)) { debugLogA("[OnPrebuildContactMenu] Not a Yahoo Contact!!!"); return 0; diff --git a/protocols/Yahoo/src/user_info.cpp b/protocols/Yahoo/src/user_info.cpp index 79a2c77c64..0f020adbd7 100644 --- a/protocols/Yahoo/src/user_info.cpp +++ b/protocols/Yahoo/src/user_info.cpp @@ -47,7 +47,7 @@ static INT_PTR CALLBACK YahooUserInfoDlgProc( HWND hwndDlg, UINT msg, WPARAM wPa break; char* szProto; - HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam; + MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam; if (hContact == NULL) { szProto = ppro->m_szModuleName; @@ -118,7 +118,7 @@ int __cdecl CYahooProto::OnUserInfoInit( WPARAM wParam, LPARAM lParam ) odp.dwInitParam = (LPARAM)this; odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE; - HCONTACT hContact = (HCONTACT)lParam; + MCONTACT hContact = (MCONTACT)lParam; if ( IsMyContact(hContact)) { odp.pfnDlgProc = YahooUserInfoDlgProc; odp.position = -1900000000; diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 2cad148fb1..9550adf4d4 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -39,7 +39,7 @@ int debugLogA( const char *fmt, ... ) return CallService(MS_NETLIB_LOG, (WPARAM)g_hNetlibUser, (LPARAM)str); } -DWORD CYahooProto::Set_Protocol(HCONTACT hContact, int protocol ) +DWORD CYahooProto::Set_Protocol(MCONTACT hContact, int protocol ) { char *s=NULL; @@ -59,11 +59,11 @@ DWORD CYahooProto::Set_Protocol(HCONTACT hContact, int protocol ) return 0; } -int CYahooProto::GetStringUtf(HCONTACT hContact, const char* name, DBVARIANT* result) +int CYahooProto::GetStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result) { return db_get_utf(hContact, m_szModuleName, name, result); } -DWORD CYahooProto::SetStringUtf(HCONTACT hContact, const char* valueName, const char* parValue) +DWORD CYahooProto::SetStringUtf(MCONTACT hContact, const char* valueName, const char* parValue) { return db_set_utf(hContact, m_szModuleName, valueName, parValue); } @@ -162,8 +162,8 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam) debugLogA("DB Setting changed. YAHOO user's visible setting changed."); DBVARIANT dbv; - if (!getString((HCONTACT)wParam, YAHOO_LOGINID, &dbv)) { - int iAdd = (ID_STATUS_OFFLINE == getWord((HCONTACT)wParam, "ApparentMode", 0)); + if (!getString((MCONTACT)wParam, YAHOO_LOGINID, &dbv)) { + int iAdd = (ID_STATUS_OFFLINE == getWord((MCONTACT)wParam, "ApparentMode", 0)); stealth(dbv.pszVal, iAdd); db_free(&dbv); } @@ -171,7 +171,7 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam) return 0; } -bool CYahooProto::IsMyContact(HCONTACT hContact) +bool CYahooProto::IsMyContact(MCONTACT hContact) { if (!hContact) return false; diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index ef7fcfb7c0..fc4debb1f5 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -228,7 +228,7 @@ void CYahooProto::logout() poll_loop = 0; } -void CYahooProto::AddBuddy(HCONTACT hContact, const char *group, const TCHAR *msg) +void CYahooProto::AddBuddy(MCONTACT hContact, const char *group, const TCHAR *msg) { DBVARIANT dbv; char *fname=NULL, *lname=NULL, *ident=NULL, *who, *u_msg; @@ -282,9 +282,9 @@ void CYahooProto::AddBuddy(HCONTACT hContact, const char *group, const TCHAR *ms mir_free(u_msg); } -HCONTACT CYahooProto::getbuddyH(const char *yahoo_id) +MCONTACT CYahooProto::getbuddyH(const char *yahoo_id) { - 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)) { DBVARIANT dbv; if (getString(hContact, YAHOO_LOGINID, &dbv)) continue; @@ -300,12 +300,12 @@ HCONTACT CYahooProto::getbuddyH(const char *yahoo_id) return NULL; } -HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags) +MCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags) { char *yid = NEWSTR_ALLOCA(yahoo_id); strlwr(yid); - HCONTACT hContact = getbuddyH(yid); + MCONTACT hContact = getbuddyH(yid); if (hContact != NULL) { LOG(("[add_buddy] Found buddy id: %s, handle: %p", yid, hContact)); if ( !(flags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 1)) { @@ -319,7 +319,7 @@ HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in //not already there: add LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags)); - 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)m_szModuleName); setString( hContact, YAHOO_LOGINID, yid ); Set_Protocol( hContact, protocol ); @@ -340,7 +340,7 @@ HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in const char* CYahooProto::find_buddy( const char *yahoo_id) { static char nick[128]; - HCONTACT hContact; + MCONTACT hContact; DBVARIANT dbv; hContact = getbuddyH(yahoo_id); @@ -371,7 +371,7 @@ void CYahooProto::ext_status_changed(const char *who, int protocol, int stat, co away, idle); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (hContact == NULL) { debugLogA("Buddy Not Found. Adding..."); hContact = add_buddy(who, who, protocol, 0); @@ -426,7 +426,7 @@ void CYahooProto::ext_status_logon(const char *who, int protocol, int stat, cons ext_status_changed(who, protocol, stat, msg, away, idle, mobile, utf8); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (hContact == NULL) { debugLogA("[ext_status_logon] Can't find handle for %s??? PANIC!!!", who); return; @@ -569,7 +569,7 @@ void CYahooProto::ext_got_audible(const char *me, const char *who, const char *a LOG(("ext_got_audible for %s aud: %s msg:'%s' hash: %s", who, aud, msg, aud_hash)); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (hContact == NULL) { LOG(("Buddy Not Found. Skipping avatar update")); return; @@ -600,7 +600,7 @@ void CYahooProto::ext_got_stealth(char *stealthlist) if (stealthlist) stealth = y_strsplit(stealthlist, ",", -1); - 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)) { DBVARIANT dbv; if (getString( hContact, YAHOO_LOGINID, &dbv)) continue; @@ -645,7 +645,7 @@ void CYahooProto::ext_got_buddies(YList * buds) debugLogA(("[ext_got_buddies] Walking buddy list...")); for (; buds; buds = buds->next) { - HCONTACT hContact; + MCONTACT hContact; yahoo_buddy *bud = ( yahoo_buddy* )buds->data; if (bud == NULL) { @@ -719,7 +719,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg) { LOG(("[ext_rejected] who: %s msg: %s", who, msg)); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (hContact != NULL) { /* * Make sure the contact is temporary so we could delete it w/o extra traffic @@ -739,7 +739,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg) void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status, int auth) { - HCONTACT hContact=getbuddyH(who); + MCONTACT hContact=getbuddyH(who); LOG(("[ext_buddy_added] %s authorized you as %s group: %s status: %d auth: %d", who, myid, group, status, auth)); @@ -778,7 +778,7 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha { char nick[128]; BYTE *pCurBlob; - HCONTACT hContact = NULL; + MCONTACT hContact = NULL; PROTORECVEVENT pre = { 0 }; /* NOTE: Msg is actually in UTF8 unless stated otherwise!! */ @@ -869,7 +869,7 @@ void CYahooProto::ext_typing_notify(const char *me, const char *who, int protoco { LOG(("[ext_typing_notify] me: '%s' who: '%s' protocol: %d stat: %d ", me, who, protocol, stat)); - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (hContact) CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)stat?10:0); @@ -904,7 +904,7 @@ void CYahooProto::ext_game_notify(const char *me, const char *who, int stat, con LOG(("[ext_game_notify] me: %s, who: %s, stat: %d, msg: %s", me, who, stat, msg)); /* FIXME - Not Implemented - this informs you someone else is playing on Yahoo! Games */ /* Also Stubbed in Sample Client */ - HCONTACT hContact = getbuddyH(who); + MCONTACT hContact = getbuddyH(who); if (!hContact) return; -- cgit v1.2.3