From 245d244aace5447e09c132e3efac4846ba48e95a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Jul 2014 16:02:38 +0000 Subject: useless junk removed git-svn-id: http://svn.miranda-ng.org/main/trunk@9811 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_icq.inc | 28 ---------------------------- include/m_icq.h | 8 -------- protocols/IcqOscarJ/src/icq_opts.cpp | 31 +++++++++++++------------------ protocols/IcqOscarJ/src/icq_proto.cpp | 6 +++--- protocols/IcqOscarJ/src/icq_proto.h | 2 -- protocols/IcqOscarJ/src/icqosc_svcs.cpp | 25 ------------------------- protocols/IcqOscarJ/src/utilities.cpp | 3 +-- 7 files changed, 17 insertions(+), 86 deletions(-) diff --git a/include/delphi/m_icq.inc b/include/delphi/m_icq.inc index 1076f9990a..cb7e1d78ee 100644 --- a/include/delphi/m_icq.inc +++ b/include/delphi/m_icq.inc @@ -219,18 +219,6 @@ an XML parser in the protocol module. Here's one I got: //wParam=operationType PS_CHANGEINFOEX = '/ChangeInfoEx'; -{ - Change nickname in White pages - lParam=(LPARAM)(const AnsiChar*)szNewNickName -} - PS_SET_NICKNAME = '/SetNickname'; - -{ - Set password for current session - lParam=(LPARAM)(const AnsiChar*)szPassword -} - PS_ICQ_SETPASSWORD = '/SetPassword'; - { miranda/icqoscar/statusmsgreq event called when our status message is requested @@ -241,22 +229,6 @@ an XML parser in the protocol module. Here's one I got: } ME_ICQ_STATUSMSGREQ = '/StatusMsgReq'; -{ - set owner avatar - wParam=0 - lParam=(const AnsiChar *)Avatar file name - return=0 for sucess -} - PS_ICQ_SETMYAVATAR = '/SetMyAvatar'; - -{ - get current owner avatar - wParam=(AnsiChar *)Buffer to file name - lParam=(int)Buffer size - return=0 for sucess -} - PS_ICQ_GETMYAVATAR = '/GetMyAvatar'; - { get size limit for avatar image wParam=(int *)max width of avatar - will be set diff --git a/include/m_icq.h b/include/m_icq.h index a3b5855619..dd4d61eff0 100644 --- a/include/m_icq.h +++ b/include/m_icq.h @@ -162,14 +162,6 @@ typedef struct { //wParam = operationType #define PS_CHANGEINFOEX "/ChangeInfoEx" -//Change nickname in White pages -//lParam = (LPARAM)(const char*)szNewNickName -#define PS_SET_NICKNAME "/SetNickname" - -//Set password for current session -//lParam = (LPARAM)(const char*)szPassword -#define PS_ICQ_SETPASSWORD "/SetPassword" - //miranda/icqoscar/statusmsgreq event //called when our status message is requested //wParam = (BYTE)msgType diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp index 9d64470802..be0a3b5ed5 100644 --- a/protocols/IcqOscarJ/src/icq_opts.cpp +++ b/protocols/IcqOscarJ/src/icq_opts.cpp @@ -149,7 +149,7 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, sizeof(ppro->m_szPassword)); if (strlennull(str)) { strcpy(ppro->m_szPassword, str); - ppro->m_bRememberPwd = TRUE; + ppro->m_bRememberPwd = true; } else ppro->m_bRememberPwd = ppro->getByte("RememberPass", 0); ppro->setString("Password", str); @@ -165,7 +165,7 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP StoreDBCheckState(ppro, hwndDlg, IDC_LEGACY, "LegacyFix"); StoreDBCheckState(ppro, hwndDlg, IDC_NOERRMULTI, "IgnoreMultiErrorBox"); ppro->setByte("ShowLogLevel", (BYTE)(4 - SendDlgItemMessage(hwndDlg, IDC_LOGLEVEL, TBM_GETPOS, 0, 0))); - return TRUE; + return true; } break; } @@ -270,19 +270,17 @@ static INT_PTR CALLBACK DlgProcIcqPrivacyOpts(HWND hwndDlg, UINT msg, WPARAM wPa SAFE_FREE((void**)&buf); // Send a status packet to notify the server about the webaware setting - { - WORD wStatus = MirandaStatusToIcq(ppro->m_iStatus); + WORD wStatus = MirandaStatusToIcq(ppro->m_iStatus); - if (ppro->m_iStatus == ID_STATUS_INVISIBLE) { - if (ppro->m_bSsiEnabled) - ppro->updateServVisibilityCode(3); - ppro->icq_setstatus(wStatus, NULL); - } - else { - ppro->icq_setstatus(wStatus, NULL); - if (ppro->m_bSsiEnabled) - ppro->updateServVisibilityCode(4); - } + if (ppro->m_iStatus == ID_STATUS_INVISIBLE) { + if (ppro->m_bSsiEnabled) + ppro->updateServVisibilityCode(3); + ppro->icq_setstatus(wStatus, NULL); + } + else { + ppro->icq_setstatus(wStatus, NULL); + if (ppro->m_bSsiEnabled) + ppro->updateServVisibilityCode(4); } } return TRUE; @@ -323,10 +321,7 @@ struct CPTABLE cpTable[] = { static BOOL CALLBACK FillCpCombo(LPSTR str) { - int i; - UINT cp; - - cp = atoi(str); + UINT i, cp = atoi(str); for (i = 0; cpTable[i].cpName != NULL && cpTable[i].cpId != cp; i++); if (cpTable[i].cpName) ComboBoxAddStringUtf(hCpCombo, cpTable[i].cpName, cpTable[i].cpId); diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 1b639c526f..c62740e397 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -125,22 +125,22 @@ CIcqProto::CIcqProto(const char* aProtoName, const TCHAR* aUserName) : // Setup services CreateProtoService(PS_CREATEACCMGRUI, &CIcqProto::OnCreateAccMgrUI); CreateProtoService(MS_ICQ_SENDSMS, &CIcqProto::SendSms); - CreateProtoService(PS_SET_NICKNAME, &CIcqProto::SetNickName); CreateProtoService(PS_GETMYAWAYMSG, &CIcqProto::GetMyAwayMsg); CreateProtoService(PS_GETINFOSETTING, &CIcqProto::GetInfoSetting); CreateProtoService(PSS_ADDED, &CIcqProto::SendYouWereAdded); - // Session password API - CreateProtoService(PS_ICQ_SETPASSWORD, &CIcqProto::SetPassword); + // ChangeInfo API CreateProtoService(PS_CHANGEINFOEX, &CIcqProto::ChangeInfoEx); + // Avatar API CreateProtoService(PS_GETAVATARINFOT, &CIcqProto::GetAvatarInfo); CreateProtoService(PS_GETAVATARCAPS, &CIcqProto::GetAvatarCaps); CreateProtoService(PS_GETMYAVATART, &CIcqProto::GetMyAvatar); CreateProtoService(PS_SETMYAVATART, &CIcqProto::SetMyAvatar); + // Custom Status API CreateProtoService(PS_SETCUSTOMSTATUSEX, &CIcqProto::SetXStatusEx); CreateProtoService(PS_GETCUSTOMSTATUSEX, &CIcqProto::GetXStatusEx); diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h index 82d10ebc20..a41760eda2 100644 --- a/protocols/IcqOscarJ/src/icq_proto.h +++ b/protocols/IcqOscarJ/src/icq_proto.h @@ -117,8 +117,6 @@ struct CIcqProto : public PROTO INT_PTR __cdecl SendSms(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl SendYouWereAdded(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl SetMyAvatar(WPARAM wParam, LPARAM lParam); - INT_PTR __cdecl SetNickName(WPARAM wParam, LPARAM lParam); - INT_PTR __cdecl SetPassword(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl SetXStatusEx(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl ShowXStatusDetails(WPARAM wParam, LPARAM lParam); diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index 1d6069dd13..2a8282501b 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -540,31 +540,6 @@ INT_PTR CIcqProto::SetMyAvatar(WPARAM wParam, LPARAM lParam) return iRet; } -INT_PTR CIcqProto::SetNickName(WPARAM wParam, LPARAM lParam) -{ - if (!icqOnline()) - return 0; // failure - - if (wParam & SMNN_UNICODE) - setTString("Nick", (WCHAR*)lParam); - else - setString("Nick", (char*)lParam); - - return ChangeInfoEx(CIXT_BASIC, 0); -} - -INT_PTR CIcqProto::SetPassword(WPARAM wParam, LPARAM lParam) -{ - char *pwd = (char*)lParam; - int len = strlennull(pwd); - - if (len && len < PASSWORDMAXLEN) { - strcpy(m_szPassword, pwd); - m_bRememberPwd = TRUE; - } - return 0; -} - // TODO: Adding needs some more work in general MCONTACT CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags) diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index 9a53b20726..f97e185b1d 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -1668,8 +1668,7 @@ char* CIcqProto::GetUserPassword(BOOL bAlways) return m_szPassword; if (GetUserStoredPassword(m_szPassword, sizeof(m_szPassword))) { - m_bRememberPwd = TRUE; - + m_bRememberPwd = true; return m_szPassword; } -- cgit v1.2.3