diff options
Diffstat (limited to 'protocols/JabberG/src')
79 files changed, 294 insertions, 217 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 180eae9895..466f9098cf 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -234,7 +235,7 @@ extern "C" int __declspec(dllexport) Load() mir_sntprintf(szCoreVersion, SIZEOF(szCoreVersion), _T("%d.%d.%d.%d"), v[0], v[1], v[2], v[3]);
CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries);
-
+
setlocale(LC_ALL, "");
pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)hInst);
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index 4d72915a4a..36787c6fdb 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 95f54ab015..9e84e281e4 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -2,8 +2,9 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
-Copyright (C) 2007 Artem Shpynov
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2007 Artem Shpynov
+Copyright (C) 2012-13 Miranda NG Project
Module implements an XMPP protocol extension for reporting and executing ad-hoc,
human-oriented commands according to XEP-0050: Ad-Hoc Commands
diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp index 62343fd63a..70f9b97506 100644 --- a/protocols/JabberG/src/jabber_agent.cpp +++ b/protocols/JabberG/src/jabber_agent.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -31,7 +32,7 @@ class CAgentRegProgressDlg : public CJabberDlgBase {
CCtrlButton m_ok;
-public:
+public:
CAgentRegProgressDlg(CJabberProto* _ppro, HWND _owner) :
CJabberDlgBase(_ppro, IDD_OPT_REGISTER, _owner, false),
m_ok(this, IDOK)
@@ -141,7 +142,7 @@ public: if ((queryNode = xmlGetChild(m_agentRegIqNode , "query")) == NULL) return TRUE;
RECT rect;
-
+
m_curPos = 0;
GetClientRect(GetDlgItem(m_hwnd, IDC_FRAME), &(m_frameRect));
GetClientRect(GetDlgItem(m_hwnd, IDC_VSCROLL), &rect);
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index 74ef786e00..74aaa227b8 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -83,7 +84,7 @@ void CJabberProto::OnIqResultGetCollectionList(HXML iqNode) int iqId = SerialNext();
IqAdd(iqId, IQ_PROC_NONE, &CJabberProto::OnIqResultGetCollection);
- m_ThreadInfo->send(
+ m_ThreadInfo->send(
XmlNodeIq(_T("get"), iqId)
<< XCHILDNS( _T("retrieve"), _T(JABBER_FEAT_ARCHIVE)) << XATTR(_T("with"), with) << XATTR(_T("start"), start));
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 79e105b679..9441426bf8 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -2,6 +2,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2007 Michael Stepura, George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -272,7 +273,7 @@ void CJabberDlgBookmarks::UpdateData() int iqId = m_proto->SerialNext();
m_proto->IqAdd(iqId, IQ_PROC_DISCOBOOKMARKS, &CJabberProto::OnIqResultDiscoBookmarks);
- m_proto->m_ThreadInfo->send( XmlNodeIq(_T("get"), iqId) << XQUERY(_T(JABBER_FEAT_PRIVATE_STORAGE))
+ m_proto->m_ThreadInfo->send( XmlNodeIq(_T("get"), iqId) << XQUERY(_T(JABBER_FEAT_PRIVATE_STORAGE))
<< XCHILDNS(_T("storage"), _T("storage:bookmarks")));
}
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index e3809ee27c..dc1e7f2c08 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -89,7 +90,7 @@ void JabberByteSendConnection(HANDLE hConn, DWORD /*dwRemoteIP*/, void* extra) char* buffer;
int datalen;
- NETLIBCONNINFO connInfo = { sizeof(connInfo) };
+ NETLIBCONNINFO connInfo = { sizeof(connInfo) };
CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConn, (LPARAM)&connInfo);
mir_sntprintf(szPort, SIZEOF(szPort), _T("%u"), connInfo.wPort);
@@ -187,7 +188,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) jbt->ft = NULL;
delete jbt;
return;
- }
+ }
} }
pInfo = m_iqManager.AddHandler(&CJabberProto::ByteInitiateResult, JABBER_IQ_TYPE_SET, jbt->dstJID, 0, -1, jbt);
@@ -585,7 +586,7 @@ int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, ch ListRemove(LIST_FTIQID, listJid);
- if (jbt->bStreamActivated)
+ if (jbt->bStreamActivated)
jbt->state = (this->*jbt->pfnSend)(hConn, jbt->ft) ? JBT_DONE : JBT_ERROR;
else
jbt->state = JBT_ERROR;
diff --git a/protocols/JabberG/src/jabber_byte.h b/protocols/JabberG/src/jabber_byte.h index 99541ac2e5..95f50f40a7 100644 --- a/protocols/JabberG/src/jabber_byte.h +++ b/protocols/JabberG/src/jabber_byte.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 53174f19ff..ac1399cf9a 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index 6a1d8c7a55..b7466cfd91 100644 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp index 0f56ba9894..e36fb56050 100644 --- a/protocols/JabberG/src/jabber_captcha.cpp +++ b/protocols/JabberG/src/jabber_captcha.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -63,7 +64,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, }
return NULL;
- case WM_PAINT:
+ case WM_PAINT:
if (params) {
PAINTSTRUCT ps;
HDC hdc, hdcMem;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 95cb55072b..ad7048fdbf 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -254,7 +255,7 @@ void CJabberProto::GcLogShowInformation(JABBER_LIST_ITEM *item, JABBER_RESOURCE_ case ROLE_PARTICIPANT: name = TranslateT("Participant"); break;
case ROLE_MODERATOR: name = TranslateT("Moderator"); break;
}
-
+
if (name)
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Role of %s was changed to '%s'."), user->resourceName, name);
}
@@ -400,7 +401,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM* item, int code, HXML reason) mir_sntprintf(szPresenceTo, SIZEOF(szPresenceTo), _T("%s/%s"), item->jid, item->nick);
m_ThreadInfo->send(
- XmlNode(_T("presence")) << XATTR(_T("to"), szPresenceTo) << XATTR(_T("type"), _T("unavailable"))
+ XmlNode(_T("presence")) << XATTR(_T("to"), szPresenceTo) << XATTR(_T("type"), _T("unavailable"))
<< XCHILD(_T("status"), szMessage));
ListRemove(LIST_CHATROOM, item->jid);
@@ -443,7 +444,7 @@ static void sttShowGcMenuItems(GCMENUITEMS *items, DWORD *ids, int type) sttShowGcMenuItem(items, *ids, type);
}
-static gc_item sttLogListItems[] =
+static gc_item sttLogListItems[] =
{
{ LPGENT("Change &nickname"), IDM_NICK, MENU_ITEM },
{ LPGENT("&Invite a user"), IDM_INVITE, MENU_ITEM },
@@ -569,7 +570,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) static DWORD sttModeratorItems[] = { IDM_LST_PARTICIPANT, 0 };
static DWORD sttAdminItems[] = { IDM_LST_MODERATOR, IDM_LST_MEMBER, IDM_LST_ADMIN, IDM_LST_OWNER, IDM_LST_BAN, 0 };
static DWORD sttOwnerItems[] = { IDM_CONFIG, IDM_DESTROY, 0 };
-
+
sttSetupGcMenuItem(gcmi, 0, FALSE);
int idx = IDM_LINK0;
@@ -598,7 +599,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) if (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)
sttSetupGcMenuItem(gcmi, IDM_BOOKMARKS, FALSE);
}
- }
+ }
else if (gcmi->Type == MENU_ON_NICKLIST) {
gcmi->nItems = SIZEOF(sttListItems);
gcmi->Item = sttListItems;
@@ -642,14 +643,14 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) gcmi->Item[3].uType = MENU_HMENU;
gcmi->Item[3].dwID = CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
sttShowGcMenuItems(gcmi, sttRJidItems, 0);
- }
+ }
else {
gcmi->Item[3].uType = MENU_NEWPOPUP;
sttShowGcMenuItems(gcmi, sttRJidItems, MENU_POPUPITEM);
}
sttSetupGcMenuItem(gcmi, IDM_CPY_RJID, FALSE);
- }
+ }
else {
gcmi->Item[3].uType = 0;
sttShowGcMenuItems(gcmi, sttRJidItems, 0);
@@ -665,7 +666,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) (me->affiliation == AFFILIATION_ADMIN) && (me->affiliation <= him->affiliation))
sttSetupGcMenuItem(gcmi, IDM_SET_BAN, TRUE);
}
- }
+ }
else {
sttSetupGcMenuItem(gcmi, 0, TRUE);
gcmi->Item[2].uType = 0;
@@ -709,7 +710,7 @@ class CGroupchatInviteDlg : public CJabberDlgBase if (HANDLE hItem = m_clc.FindContact(hContact))
m_clc.DeleteItem(hItem);
} }
-
+
void ResetListOptions(CCtrlClc *)
{
m_clc.SetBkBitmap(0, NULL);
@@ -975,7 +976,7 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam JabberStripJid(dat->him->szRealJid, szBareJid, SIZEOF(szBareJid));
switch (value) {
- case AFFILIATION_NONE:
+ case AFFILIATION_NONE:
if (dat->him->szRealJid)
dat->ppro->AdminSet(dat->item->jid, xmlnsAdmin, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
else
@@ -1086,7 +1087,7 @@ static void sttNickListHook(CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK* if (TCHAR *p = _tcsstr(szMessage, _T("%s"))) {
*p = 0;
mir_sntprintf(buf, SIZEOF(buf), _T("%s%s%s"), szMessage, him->resourceName, p+2);
- }
+ }
else lstrcpyn(buf, szMessage, SIZEOF(buf));
UnEscapeChatTags(buf);
@@ -1105,7 +1106,7 @@ static void sttNickListHook(CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK* JABBER_SEARCH_RESULT jsr = {0};
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s/%s"), item->jid, him->resourceName);
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
-
+
JABBER_LIST_ITEM* item = ppro->ListAdd(LIST_VCARD_TEMP, jsr.jid);
item->bUseResource = TRUE;
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->status, him->statusMessage, him->priority);
@@ -1289,7 +1290,7 @@ static void sttNickListHook(CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK* jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s"), him->szRealJid);
if (TCHAR *tmp = _tcschr(jsr.jid, _T('/'))) *tmp = 0;
-
+
JABBER_LIST_ITEM* item = ppro->ListAdd(LIST_VCARD_TEMP, jsr.jid);
item->bUseResource = TRUE;
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->status, him->statusMessage, him->priority);
@@ -1392,7 +1393,7 @@ static void sttLogListHook(CJabberProto* ppro, JABBER_LIST_ITEM* item, GCHOOK* g {
CGroupchatInviteDlg *dlg = new CGroupchatInviteDlg(ppro, gch->pDest->ptszID);
dlg->Show();
- break;
+ break;
}
case IDM_CONFIG:
@@ -1550,7 +1551,7 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////////////
void CJabberProto::AddMucListItem(JABBER_MUC_JIDLIST_INFO* jidListInfo, TCHAR* str , TCHAR* rsn)
-{
+{
const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str,'@')) ? _T("jid") : _T("nick");
TCHAR* roomJid = jidListInfo->roomJid;
if (jidListInfo->type == MUC_BANLIST) {
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 38ee266f3f..fa7174a4ec 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2007 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -403,7 +404,7 @@ void CJabberDlgConsole::OnInitDialog() {IDC_BTN_FILTER, "Filter mode", "sd_filter_apply", true, FALSE},
{IDC_BTN_FILTER_REFRESH, "Refresh list", "sd_nav_refresh", false, FALSE},
};
-
+
int i;
for (i = 0; i < SIZEOF(buttons); i++) {
SendDlgItemMessage(m_hwnd, buttons[i].idc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(buttons[i].icon));
@@ -419,7 +420,7 @@ void CJabberDlgConsole::OnInitDialog() SendDlgItemMessage(m_hwnd, IDC_BTN_FILTER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(filter_modes[i].icon));
break;
}
-
+
EnableWindow(GetDlgItem(m_hwnd, IDC_CB_FILTER), (m_proto->m_filterInfo.type == TFilterInfo::T_OFF) ? FALSE : TRUE);
EnableWindow(GetDlgItem(m_hwnd, IDC_BTN_FILTER_REFRESH), (m_proto->m_filterInfo.type == TFilterInfo::T_OFF) ? FALSE : TRUE);
diff --git a/protocols/JabberG/src/jabber_db_utils.h b/protocols/JabberG/src/jabber_db_utils.h index 349416839a..d5a74d22b0 100644 --- a/protocols/JabberG/src/jabber_db_utils.h +++ b/protocols/JabberG/src/jabber_db_utils.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 21c8d75f3c..d47e416d85 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -291,7 +292,7 @@ void CJabberProto::OnIqResultServiceDiscoveryRootItems(HXML iqNode, CJabberIqInf CJabberIqInfo* pNewInfo = m_iqManager.AddHandler(&CJabberProto::OnIqResultServiceDiscoveryRootInfo, JABBER_IQ_TYPE_GET, szJid);
pNewInfo->m_pUserData = pInfo->m_pUserData;
pNewInfo->SetTimeout(30000);
-
+
XmlNodeIq iq(pNewInfo);
iq << XQUERY(_T(JABBER_FEAT_DISCO_INFO)) << XATTR(_T("node"), szNode);
xmlAddChild(packet, iq);
@@ -387,7 +388,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) szJid[ 0 ] = 0;
if ( !GetDlgItemText(hwndDlg, IDC_COMBO_NODE, szNode, SIZEOF(szNode)))
szNode[ 0 ] = 0;
-
+
ComboAddRecentString(hwndDlg, IDC_COMBO_JID, "discoWnd_rcJid", szJid);
ComboAddRecentString(hwndDlg, IDC_COMBO_NODE, "discoWnd_rcNode", szNode);
@@ -870,7 +871,7 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) mir_snprintf(setting, sizeof(setting), "discoWnd_favNode_%d", res);
if ( !m_proto->JGetStringT(NULL, setting, &dbv)) SetDlgItemText(m_hwnd, IDC_COMBO_NODE, dbv.ptszVal);
db_free(&dbv);
-
+
PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0);
}
} else
@@ -973,8 +974,8 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (GetTickCount() - m_proto->m_dwSDLastRefresh < REFRESH_TIMEOUT) {
SetTimer(m_hwnd, REFRESH_TIMER, REFRESH_TIMEOUT, NULL);
return TRUE;
- }
-
+ }
+
wParam = REFRESH_TIMER;
// fall through
@@ -1098,7 +1099,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) XmlNode packet(NULL);
CJabberSDNode* pNode;
pNode = (CJabberSDNode*)TreeList_GetData(hItem);
- if (pNode)
+ if (pNode)
{
m_proto->SendBothRequests(pNode, packet);
TreeList_MakeFakeParent(hItem, FALSE);
@@ -1312,7 +1313,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM {
m_SDManager.Lock();
XmlNode packet(NULL);
- if (pNode)
+ if (pNode)
{
TreeList_ResetItem(GetDlgItem(m_pDlgServiceDiscovery->GetHwnd(), IDC_TREE_DISCO), hItem);
pNode->ResetInfo();
@@ -1442,7 +1443,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM {
TCHAR * jid = pNode->GetJid();
HANDLE hContact = HContactFromJID(pNode->GetJid());
- if ( !hContact) {
+ if ( !hContact) {
JABBER_SEARCH_RESULT jsr={0};
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s"), jid);
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
@@ -1474,8 +1475,8 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_UNREGISTER:
m_ThreadInfo->send( XmlNodeIq(_T("set"), SerialNext(), pNode->GetJid()) << XQUERY(_T(JABBER_FEAT_REGISTER)) << XCHILD(_T("remove")));
-
- m_ThreadInfo->send( XmlNodeIq(_T("set"), SerialNext()) << XQUERY(_T(JABBER_FEAT_IQ_ROSTER))
+
+ m_ThreadInfo->send( XmlNodeIq(_T("set"), SerialNext()) << XQUERY(_T(JABBER_FEAT_IQ_ROSTER))
<< XCHILD(_T("item")) << XATTR(_T("jid"), pNode->GetJid()) << XATTR(_T("subscription"), _T("remove")));
break;
diff --git a/protocols/JabberG/src/jabber_disco.h b/protocols/JabberG/src/jabber_disco.h index 5bd2ab3f3a..efd9d453bf 100644 --- a/protocols/JabberG/src/jabber_disco.h +++ b/protocols/JabberG/src/jabber_disco.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2005-07 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 2562e0c5f0..290b756e71 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 3c53957be8..3a0c5cdb06 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -193,7 +194,7 @@ void JabberFileServerConnection(JABBER_SOCKET hConnection, DWORD /*dwRemoteIP*/, {
CJabberProto* ppro = (CJabberProto*)extra;
- NETLIBCONNINFO connInfo = { sizeof(connInfo) };
+ NETLIBCONNINFO connInfo = { sizeof(connInfo) };
CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConnection, (LPARAM)&connInfo);
TCHAR szPort[10];
@@ -406,7 +407,7 @@ int CJabberProto::FileSendParse(JABBER_SOCKET s, filetransfer *ft, char* buffer, num += 2;
currentFile = ft->std.currentFileNumber;
- TCHAR* t = _tcsrchr(ft->std.ptszFiles[ currentFile ], '\\');
+ TCHAR* t = _tcsrchr(ft->std.ptszFiles[ currentFile ], '\\');
if (t != NULL)
t++;
else
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 550de8fa58..41f3eb8de4 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -798,9 +799,9 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, {
return (INT_PTR)GetStockObject(WHITE_BRUSH);
}
-
+
return NULL;
-
+
case WM_MOUSEWHEEL:
{
int zDelta = GET_WHEEL_DELTA_WPARAM(wParam);
diff --git a/protocols/JabberG/src/jabber_form2.cpp b/protocols/JabberG/src/jabber_form2.cpp index f1936c9e73..79314edba9 100644 --- a/protocols/JabberG/src/jabber_form2.cpp +++ b/protocols/JabberG/src/jabber_form2.cpp @@ -1,10 +1,11 @@ /*
Jabber Protocol Plugin for Miranda IM
-Copyright ( C ) 2002-04 Santithorn Bunchua
-Copyright ( C ) 2005-12 George Hazan
-Copyright ( C ) 2007-09 Maxim Mluhov
-Copyright ( C ) 2007-09 Victor Pavlychko
+Copyright (C) 2002-04 Santithorn Bunchua
+Copyright (C) 2005-12 George Hazan
+Copyright (C) 2007-09 Maxim Mluhov
+Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -240,7 +241,7 @@ namespace NSJabberRegistry { _T("urn:xmpp:receipts"), JDFT_BOOLEAN, _T("Whether to enable Message Receipts per XEP-0184") },
};
- TJabberDataFormRegisry_Form form_types[] =
+ TJabberDataFormRegisry_Form form_types[] =
{
/*0157*/ { _T("http://jabber.org/network/serverinfo"), form_type_serverinfo, SIZEOF(form_type_serverinfo) },
/*0133*/ { _T("http://jabber.org/protocol/admin"), form_type_admin, SIZEOF(form_type_admin) },
@@ -534,7 +535,7 @@ int CFormCtrlBase::Layout(HDWP hdwp, int x, int y, int w) h = GetHeight(w);
DeferWindowPos(hdwp, m_hwnd, NULL, x, y, w, h, SWP_NOZORDER|SWP_SHOWWINDOW);
}
-
+
return h;
}
diff --git a/protocols/JabberG/src/jabber_form2.h b/protocols/JabberG/src/jabber_form2.h index 051eb8571f..524455f2b9 100644 --- a/protocols/JabberG/src/jabber_form2.h +++ b/protocols/JabberG/src/jabber_form2.h @@ -1,10 +1,11 @@ /*
Jabber Protocol Plugin for Miranda IM
-Copyright ( C ) 2002-04 Santithorn Bunchua
-Copyright ( C ) 2005-12 George Hazan
-Copyright ( C ) 2007-09 Maxim Mluhov
-Copyright ( C ) 2007-09 Victor Pavlychko
+Copyright (C) 2002-04 Santithorn Bunchua
+Copyright (C) 2005-12 George Hazan
+Copyright (C) 2007-09 Maxim Mluhov
+Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index c4f263e52e..2ef1a2e487 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index b9a354713a..07abacdf60 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -105,18 +106,18 @@ void CJabberProto::FtInitiate(TCHAR* jid, filetransfer *ft) mir_sntprintf(tszJid, SIZEOF(tszJid), _T("%s/%s"), jid, rs);
XmlNodeIq iq(m_iqManager.AddHandler(&CJabberProto::OnFtSiResult, JABBER_IQ_TYPE_SET, tszJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO, -1, ft));
- HXML si = iq << XCHILDNS(_T("si"), _T(JABBER_FEAT_SI)) << XATTR(_T("id"), sid)
+ HXML si = iq << XCHILDNS(_T("si"), _T(JABBER_FEAT_SI)) << XATTR(_T("id"), sid)
<< XATTR(_T("mime-type"), _T("binary/octet-stream")) << XATTR(_T("profile"), _T(JABBER_FEAT_SI_FT));
- si << XCHILDNS(_T("file"), _T(JABBER_FEAT_SI_FT)) << XATTR(_T("name"), filename)
+ si << XCHILDNS(_T("file"), _T(JABBER_FEAT_SI_FT)) << XATTR(_T("name"), filename)
<< XATTRI64(_T("size"), ft->fileSize[ ft->std.currentFileNumber ]) << XCHILD(_T("desc"), ft->szDescription);
-
+
HXML field = si << XCHILDNS(_T("feature"), _T(JABBER_FEAT_FEATURE_NEG))
<< XCHILDNS(_T("x"), _T(JABBER_FEAT_DATA_FORMS)) << XATTR(_T("type"), _T("form"))
<< XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method")) << XATTR(_T("type"), _T("list-single"));
BOOL bDirect = m_options.BsDirect;
BOOL bProxy = m_options.BsProxyManual;
-
+
// bytestreams support?
if (bDirect || bProxy)
field << XCHILD(_T("option")) << XCHILD(_T("value"), _T(JABBER_FEAT_BYTESTREAMS));
@@ -327,7 +328,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) optionNode = xmlGetChild(fieldNode ,i);
if ( !optionNode)
break;
-
+
if ( !lstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
if ( !_tcscmp(xmlGetText(n), _T(JABBER_FEAT_BYTESTREAMS))) {
@@ -501,7 +502,7 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
return FALSE;
}
-
+
// close event && stream already open
if (item->jibb && item->jibb->hEvent) {
item->jibb->bStreamClosed = TRUE;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index fed73bbbd7..3b6ab621d1 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -202,7 +203,7 @@ private: JABBER_RESOURCE_STATUS* CJabberProto::GcFindResource(JABBER_LIST_ITEM *item, const TCHAR *resource)
{
JABBER_RESOURCE_STATUS *res = NULL;
-
+
EnterCriticalSection(&m_csLists);
JABBER_RESOURCE_STATUS *r = item->resource;
for (int i=0; i<item->resourceCount; i++) {
@@ -1049,7 +1050,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (str = xmlGetAttrValue(itemNode, _T("jid")))
replaceStrT(r->szRealJid, str);
- }
+ }
}
if (sttGetStatusCode(xNode) == 201)
@@ -1091,7 +1092,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) mir_free(room);
}
-
+
// leaving room
else if ( !_tcscmp(type, _T("unavailable"))) {
const TCHAR *str = 0;
@@ -1136,7 +1137,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (hContact != NULL)
JSetWord(hContact, "Status", ID_STATUS_OFFLINE);
}
-
+
// processing room errors
else if ( !_tcscmp(type, _T("error"))) {
int errorCode = 0;
@@ -1191,7 +1192,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) resource = _tcschr(from, '/');
if (resource != NULL && *++resource == '\0')
resource = NULL;
-
+
if ((n = xmlGetChild(node , "subject")) != NULL) {
msgText = xmlGetText(n);
@@ -1204,7 +1205,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) const TCHAR *tmpnick = xmlGetText(m);
if (tmpnick == NULL || *tmpnick == 0)
return;
-
+
const TCHAR *tmptr = _tcsstr(tmpnick, _T("has set the subject to:")); //ejabberd
if (tmptr == NULL)
tmptr = _tcsstr(tmpnick, TranslateT("has set the subject to:")); //ejabberd
diff --git a/protocols/JabberG/src/jabber_ibb.cpp b/protocols/JabberG/src/jabber_ibb.cpp index dc66ce2196..b079e01b46 100644 --- a/protocols/JabberG/src/jabber_ibb.cpp +++ b/protocols/JabberG/src/jabber_ibb.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -59,7 +60,7 @@ BOOL CJabberProto::OnFtHandleIbbIq(HXML iqNode, CJabberIqInfo* pInfo) m_ThreadInfo->send( XmlNodeIq(_T("result"), pInfo));
else
m_ThreadInfo->send(
- XmlNodeIq(_T("error"), pInfo)
+ XmlNodeIq(_T("error"), pInfo)
<< XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
<< XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
}
@@ -87,7 +88,7 @@ void CJabberProto::OnIbbCloseResult(HXML, CJabberIqInfo* pInfo) void CJabberProto::IbbSendThread(JABBER_IBB_TRANSFER *jibb)
{
Log("Thread started: type=ibb_send");
-
+
jibb->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
jibb->bStreamInitialized = FALSE;
jibb->bStreamClosed = FALSE;
diff --git a/protocols/JabberG/src/jabber_ibb.h b/protocols/JabberG/src/jabber_ibb.h index b73d83c71e..8cd33ddc1c 100644 --- a/protocols/JabberG/src/jabber_ibb.h +++ b/protocols/JabberG/src/jabber_ibb.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index e68d467793..94748a39d9 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
Idea & portions of code by Artem Shpynov
@@ -60,7 +61,7 @@ static CTransportProtoTableItem TransportProtoTable[] = { _T("tv*"), "TV" },
{ _T("dict*"), "Dictionary" },
{ _T("weather*"), "Weather" },
- { _T("skype*"), "Skype" },
+ { _T("skype*"), "Skype" },
{ _T("sms*"), "SMS" },
{ _T("smtp*"), "SMTP" },
//j2j
diff --git a/protocols/JabberG/src/jabber_icolib.h b/protocols/JabberG/src/jabber_icolib.h index a91c13742c..398969767d 100644 --- a/protocols/JabberG/src/jabber_icolib.h +++ b/protocols/JabberG/src/jabber_icolib.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index ca6adcc25d..a92ba930fe 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -125,7 +126,7 @@ BOOL CJabberIqManager::FillPermanentHandlers() {
// Google Shared Status (http://code.google.com/apis/talk/jep_extensions/shared_status.html)
AddPermanentHandler(&CJabberProto::OnIqSetGoogleSharedStatus, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR, _T("google:shared-status"), FALSE, _T("query"));
-
+
// version requests (XEP-0092)
AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, _T(JABBER_FEAT_VERSION), FALSE, _T("query"));
@@ -173,7 +174,7 @@ BOOL CJabberIqManager::FillPermanentHandlers() // http auth (XEP-0070)
AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, _T(JABBER_FEAT_HTTP_AUTH), FALSE, _T("confirm"));
-
+
return TRUE;
}
@@ -225,7 +226,7 @@ void CJabberIqManager::ExpireInfo(CJabberIqInfo* pInfo, void*) {
if ( !pInfo)
return;
-
+
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_FROM)
pInfo->m_szFrom = pInfo->m_szReceiver;
if ((pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (pInfo->m_szFrom))
@@ -286,7 +287,7 @@ BOOL CJabberIqManager::HandleIq(int nIqId, HXML pNode) if (nIqType == JABBER_IQ_TYPE_RESULT) {
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_NODE)
pInfo->m_pChildNode = xmlGetChild(pNode , 0);
-
+
if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_NAME))
pInfo->m_szChildTagName = (TCHAR*)xmlGetName(pInfo->m_pChildNode);
if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_XMLNS))
@@ -321,7 +322,7 @@ BOOL CJabberIqManager::HandleIqPermanent(HXML pNode) const TCHAR *szType = xmlGetAttrValue(pNode, _T("type"));
if ( !szType)
break;
-
+
CJabberIqInfo iqInfo;
iqInfo.m_nIqType = JABBER_IQ_TYPE_FAIL;
@@ -337,7 +338,7 @@ BOOL CJabberIqManager::HandleIqPermanent(HXML pNode) HXML pFirstChild = xmlGetChild(pNode , 0);
if ( !pFirstChild || !xmlGetName(pFirstChild))
break;
-
+
const TCHAR *szTagName = xmlGetName(pFirstChild);
const TCHAR *szXmlns = xmlGetAttrValue(pFirstChild, _T("xmlns"));
diff --git a/protocols/JabberG/src/jabber_iq.h b/protocols/JabberG/src/jabber_iq.h index b44d4997b0..24077444ab 100644 --- a/protocols/JabberG/src/jabber_iq.h +++ b/protocols/JabberG/src/jabber_iq.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 8458d833b6..459f917fbe 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -112,7 +113,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PRODUCT_CORE 0x00000065
#define PRODUCT_PROFESSIONAL_WMC 0x00000067
#define PRODUCT_UNLICENSED 0xABCDABCD
-#endif
+#endif
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
@@ -128,7 +129,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE) SYSTEM_INFO si;
PGNSI pGNSI;
PGPI pGPI;
-
+
DWORD dwType;
ZeroMemory(&si, sizeof(SYSTEM_INFO));
@@ -140,7 +141,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE) if ( !bOsVersionInfoEx)
{
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- if ( !GetVersionEx((OSVERSIONINFO*)&osvi))
+ if ( !GetVersionEx((OSVERSIONINFO*)&osvi))
return FALSE;
}
@@ -165,21 +166,21 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE) case 0:
if (osvi.wProductType == VER_NT_WORKSTATION)
StringCchCat(pszOS, BUFSIZE, TEXT("Windows Vista "));
- else
+ else
StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 "));
break;
case 1:
if (osvi.wProductType == VER_NT_WORKSTATION)
StringCchCat(pszOS, BUFSIZE, TEXT("Windows 7 "));
- else
+ else
StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 R2 "));
break;
case 2:
if (osvi.wProductType == VER_NT_WORKSTATION)
StringCchCat(pszOS, BUFSIZE, TEXT("Windows 8 "));
- else
+ else
StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2012 "));
break;
}
@@ -320,7 +321,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE) {
StringCchCat(pszOS, BUFSIZE, TEXT("Professional"));
}
- else
+ else
{
if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
StringCchCat(pszOS, BUFSIZE, TEXT("Datacenter Server"));
@@ -343,10 +344,10 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE) StringCchPrintf(buf, 80, TEXT(" (build %d)"), osvi.dwBuildNumber);
StringCchCat(pszOS, BUFSIZE, buf);
- return TRUE;
+ return TRUE;
}
else
- {
+ {
return FALSE;
}
}
@@ -519,7 +520,7 @@ BOOL CJabberProto::OnSiRequest(HXML node, CJabberIqInfo *pInfo) XmlNodeIq iq(_T("error"), pInfo);
HXML error = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel"));
error << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
- error << XCHILD(_T("bad-profile"));
+ error << XCHILD(_T("bad-profile"));
m_ThreadInfo->send(iq);
}
return TRUE;
@@ -618,7 +619,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) JabberContactListCreateGroup(item->group);
db_set_ts(hContact, "CList", "Group", item->group);
}
- else
+ else
db_unset(hContact, "CList", "Group");
}
}
@@ -669,7 +670,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) TCHAR text[ 1024 ];
TCHAR *str, *p, *q;
-
+
str = (TCHAR*)xmlGetText(n); // URL of the file to get
filetransfer *ft = new filetransfer(this);
ft->std.totalFiles = 1;
@@ -720,7 +721,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) pre.ptszFiles = &str2;
pre.fileCount = 1;
pre.lParam = (LPARAM)ft;
- ProtoChainRecvFile(ft->std.hContact, &pre);
+ ProtoChainRecvFile(ft->std.hContact, &pre);
mir_free(str2);
}
else {
@@ -772,7 +773,7 @@ BOOL CJabberProto::OnHandleDiscoItemsRequest(HXML iqNode, CJabberIqInfo* pInfo) xmlAddAttr(resultQuery, _T("node"), szNode);
if ( !szNode && m_options.EnableRemoteControl)
- resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), m_ThreadInfo->fullJID)
+ resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), m_ThreadInfo->fullJID)
<< XATTR(_T("node"), _T(JABBER_FEAT_COMMANDS)) << XATTR(_T("name"), _T("Ad-hoc commands"));
m_ThreadInfo->send(iq);
@@ -792,7 +793,7 @@ BOOL CJabberProto::AddClistHttpAuthEvent(CJabberHttpAuthParams *pParams) cle.pszService = szService;
cle.ptszTooltip = TranslateT("Http authentication request received");
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
-
+
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 74f8333634..628c9018d0 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -55,8 +56,8 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode) RebuildInfoFrame();
}
else if (identityCategory && identityType && identityName &&
- !_tcscmp(identityCategory, _T("server")) &&
- !_tcscmp(identityType, _T("im")) &&
+ !_tcscmp(identityCategory, _T("server")) &&
+ !_tcscmp(identityType, _T("im")) &&
!_tcscmp(identityName, _T("Google Talk"))) {
m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PING;
m_bGoogleTalk = true;
@@ -79,7 +80,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode) if ( !_tcscmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
m_ThreadInfo->jabberServerCaps |= g_JabberFeatCapPairs[j].jcbCap;
break;
- }
+ }
}
}
@@ -495,7 +496,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo* pInfo) {
UpdateSubscriptionInfo(hContact, item);
}
-
+
if ( !m_options.IgnoreRosterGroups) {
if (item->group != NULL) {
JabberContactListCreateGroup(item->group);
@@ -509,7 +510,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo* pInfo) }
else db_set_ts(hContact, "CList", "Group", item->group);
}
- else
+ else
db_unset(hContact, "CList", "Group");
}
@@ -677,7 +678,7 @@ LBL_Ret: const TCHAR *tszType = xmlGetText(m);
if ( !_tcscmp(tszType, _T("image/jpeg")) ||
!_tcscmp(tszType, _T("image/png")) ||
- !_tcscmp(tszType, _T("image/gif")) ||
+ !_tcscmp(tszType, _T("image/gif")) ||
!_tcscmp(tszType, _T("image/bmp")))
szPicType = tszType;
else
@@ -1085,7 +1086,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode) else if ( !lstrcmp(xmlGetName(n), _T("PHOTO")))
OnIqResultGetVcardPhoto(jid, n, hContact, hasPhoto);
} }
-
+
if (hasFn && !hasNick) {
TCHAR *name = JGetStringT(hContact, "FullName");
TCHAR *nick = JGetStringT(hContact, "Nick");
@@ -1406,7 +1407,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode) const TCHAR *mimeType = NULL;
if (typeNode != NULL) mimeType = xmlGetText(typeNode);
HXML n = xmlGetChild(vCard , "BINVAL");
- if (n == NULL)
+ if (n == NULL)
return;
JSetByte(hContact, "AvatarXVcard", 1);
@@ -1509,7 +1510,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode) }
-void CJabberProto::OnIqResultGotAvatar(HANDLE hContact, HXML n, const TCHAR *mimeType)
+void CJabberProto::OnIqResultGotAvatar(HANDLE hContact, HXML n, const TCHAR *mimeType)
{
int resultLen = 0;
char* body = JabberBase64DecodeT(xmlGetText(n), &resultLen);
@@ -1740,7 +1741,7 @@ void CJabberProto::OnIqResultEntityTime(HXML pIqNode, CJabberIqInfo* pInfo) if (JGetWord(pInfo->m_hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
return;
}
-
+
JDeleteSetting(pInfo->m_hContact, "Timezone");
JDeleteSetting(pInfo->m_hContact, "TzName");
}
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 6532cea953..91ff9c8bc9 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_libstr.cpp b/protocols/JabberG/src/jabber_libstr.cpp index 58e1107051..accda7725a 100644 --- a/protocols/JabberG/src/jabber_libstr.cpp +++ b/protocols/JabberG/src/jabber_libstr.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp index 25f69bebed..5f9c11c6ae 100644 --- a/protocols/JabberG/src/jabber_list.cpp +++ b/protocols/JabberG/src/jabber_list.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -54,7 +55,7 @@ static void JabberListFreeItemInternal(JABBER_LIST_ITEM *item) JabberListFreeResourceInternal(r);
JabberListFreeResourceInternal(&item->itemResource);
-
+
if (item->photoFileName) {
if (item->list == LIST_VCARD_TEMP)
DeleteFile(item->photoFileName);
@@ -101,11 +102,11 @@ int CJabberProto::ListExist(JABBER_LIST list, const TCHAR *jid) {
tmp.list = LIST_CHATROOM;
int id = m_lstRoster.getIndex(&tmp);
- if (id != -1)
+ if (id != -1)
tmp.bUseResource = TRUE;
tmp.list = list;
}
-
+
int idx = m_lstRoster.getIndex(&tmp);
if (idx == -1) {
@@ -131,7 +132,7 @@ JABBER_LIST_ITEM *CJabberProto::ListAdd(JABBER_LIST list, const TCHAR *jid) TCHAR *q = NULL;
// strip resource name if any
//fyr
- if ( !((list== LIST_ROSTER) && ListExist(LIST_CHATROOM, jid))) { // but only if it is not chat room contact
+ if ( !((list== LIST_ROSTER) && ListExist(LIST_CHATROOM, jid))) { // but only if it is not chat room contact
if (list != LIST_VCARD_TEMP) {
TCHAR *p;
if ((p = _tcschr(s, '@')) != NULL)
@@ -141,7 +142,7 @@ JABBER_LIST_ITEM *CJabberProto::ListAdd(JABBER_LIST list, const TCHAR *jid) } else {
bUseResource=TRUE;
}
-
+
if ( !bUseResource && list== LIST_ROSTER)
{
//if it is a chat room keep resource and made it resource sensitive
@@ -151,7 +152,7 @@ JABBER_LIST_ITEM *CJabberProto::ListAdd(JABBER_LIST list, const TCHAR *jid) bUseResource=TRUE;
}
}
-
+
item = (JABBER_LIST_ITEM*)mir_calloc(sizeof(JABBER_LIST_ITEM));
item->list = list;
item->jid = s;
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index 7c7d3d2014..e79da7d995 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index f43f4ab012..3ec7c0b4b3 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -885,7 +886,7 @@ void CJabberProto::UpdatePriorityMenu(short priority) TCHAR szName[128];
mir_sntprintf(szName, SIZEOF(szName), TranslateT("Resource priority [%d]"), (int)priority);
-
+
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_TCHAR | CMIM_NAME;
mi.ptszName = szName;
@@ -1238,7 +1239,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM l JABBER_LIST_ITEM* item = ListGetItemPtr(LIST_CHATROOM, dbv.ptszVal);
if ( !item) return 0;
-
+
mir_sntprintf(text, SIZEOF(text), _T("%s/%s"), item->jid, item->nick);
jid = text;
}
diff --git a/protocols/JabberG/src/jabber_message_handlers.cpp b/protocols/JabberG/src/jabber_message_handlers.cpp index 0edae4975c..414e5a5d12 100644 --- a/protocols/JabberG/src/jabber_message_handlers.cpp +++ b/protocols/JabberG/src/jabber_message_handlers.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index 0c7ad7f6d9..2f7b6ab035 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -68,7 +69,7 @@ BOOL CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea for (i = xmlGetChildCount(node) - 1; i >= 0; i--) {
// enumerate all children and see whether this node suits handler criteria
HXML child = xmlGetChild(node, i);
-
+
LPCTSTR szTagName = xmlGetName(child);
LPCTSTR szXmlns = xmlGetAttrValue(child, _T("xmlns"));
diff --git a/protocols/JabberG/src/jabber_message_manager.h b/protocols/JabberG/src/jabber_message_manager.h index f45a3227b3..5f4b6f6412 100644 --- a/protocols/JabberG/src/jabber_message_manager.h +++ b/protocols/JabberG/src/jabber_message_manager.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -55,7 +56,7 @@ public: LPCTSTR m_szChildTagXmlns;
LPCTSTR m_szChildTagName;
HXML m_hChildNode;
- HANDLE m_hContact;
+ HANDLE m_hContact;
LPCTSTR m_szTo;
LPCTSTR m_szId;
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 237c844001..7ddace9373 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index dfc991e622..0a0ac98132 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -34,7 +35,7 @@ static TCHAR *StrTrimCopy(TCHAR *str) if ( !str) return 0;
while (*str && _istspace(*str)) ++str;
if ( !*str) return mir_tstrdup(str);
-
+
TCHAR *res = mir_tstrdup(str);
for (TCHAR *p = res + lstrlen(res) - 1; p >= res; --p)
{
@@ -49,18 +50,18 @@ static TCHAR *StrTrimCopy(TCHAR *str) CNoteItem::CNoteItem()
{
- m_szTitle =
- m_szFrom =
- m_szText =
+ m_szTitle =
+ m_szFrom =
+ m_szText =
m_szTags =
m_szTagsStr = NULL;
}
CNoteItem::CNoteItem(HXML hXml, TCHAR *szFrom)
{
- m_szTitle =
- m_szFrom =
- m_szText =
+ m_szTitle =
+ m_szFrom =
+ m_szText =
m_szTags =
m_szTagsStr = NULL;
@@ -103,7 +104,7 @@ void CNoteItem::SetData(TCHAR *title, TCHAR *from, TCHAR *text, TCHAR *tags) if (*szTags == _T(','))
{
*q++ = _T(',');
- *p++ = 0;
+ *p++ = 0;
continue;
}
@@ -531,11 +532,11 @@ private: tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.itemex.mask = TVIF_TEXT|TVIF_PARAM|TVIF_STATE;
- tvis.itemex.stateMask =
+ tvis.itemex.stateMask =
tvis.itemex.state = TVIS_BOLD|TVIS_EXPANDED;
tvis.itemex.pszText = TranslateT("All tags");
tvis.itemex.lParam = NULL;
-
+
PopulateTags(m_tvFilter.InsertItem(&tvis), szActiveTag);
mir_free(szActiveTag);
@@ -762,7 +763,7 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok) }
TCHAR buf[1024];
- mir_sntprintf(buf, SIZEOF(buf), _T("Incoming note: %s\n\n%s\nTags: %s"),
+ mir_sntprintf(buf, SIZEOF(buf), _T("Incoming note: %s\n\n%s\nTags: %s"),
pNote->GetTitle(), pNote->GetText(), pNote->GetTagsStr());
JabberCapsBits jcb = GetResourceCapabilites(pNote->GetFrom(), TRUE);
@@ -824,7 +825,7 @@ bool CJabberProto::OnIncomingNote(const TCHAR *szFrom, HXML hXml) cle.pszService = szService;
cle.ptszTooltip = TranslateT("Incoming note");
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
-
+
return true;
}
diff --git a/protocols/JabberG/src/jabber_notes.h b/protocols/JabberG/src/jabber_notes.h index 1750489458..d580acf345 100644 --- a/protocols/JabberG/src/jabber_notes.h +++ b/protocols/JabberG/src/jabber_notes.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -70,7 +71,7 @@ public: m_bIsModified = true;
OBJLIST<CNoteItem>::remove(p);
}
-
+
void AddNote(HXML hXml, TCHAR *szFrom = 0);
void LoadXml(HXML hXml);
void SaveXml(HXML hXmlParent);
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 2a157dd128..00d19a2b14 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -783,7 +784,7 @@ private: bIsError = false;
}
mir_free(buf);
- }
+ }
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)result);
}
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp index 717ecd5d5f..3217669caa 100644 --- a/protocols/JabberG/src/jabber_opttree.cpp +++ b/protocols/JabberG/src/jabber_opttree.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2007 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -69,7 +70,7 @@ BOOL CCtrlTreeOpts::OnNotify(int idCtrl, NMHDR *pnmh) ProcessItemClick(hti.hItem);
break;
}
-
+
case TVN_ITEMEXPANDEDW:
{
LPNMTREEVIEWW lpnmtv = (LPNMTREEVIEWW)pnmh;
@@ -81,7 +82,7 @@ BOOL CCtrlTreeOpts::OnNotify(int idCtrl, NMHDR *pnmh) SendMessageW(pnmh->hwndFrom, TVM_SETITEMW, 0, (LPARAM)&tvi);
break;
}
-
+
case TVN_ITEMEXPANDEDA:
{
LPNMTREEVIEWA lpnmtv = (LPNMTREEVIEWA)pnmh;
diff --git a/protocols/JabberG/src/jabber_opttree.h b/protocols/JabberG/src/jabber_opttree.h index ec70d5001e..2b9425c952 100644 --- a/protocols/JabberG/src/jabber_opttree.h +++ b/protocols/JabberG/src/jabber_opttree.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2007 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp index 56ea34e48e..341788cf29 100644 --- a/protocols/JabberG/src/jabber_password.cpp +++ b/protocols/JabberG/src/jabber_password.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_presence_manager.cpp b/protocols/JabberG/src/jabber_presence_manager.cpp index b7e4e26376..78fefd1c96 100644 --- a/protocols/JabberG/src/jabber_presence_manager.cpp +++ b/protocols/JabberG/src/jabber_presence_manager.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_presence_manager.h b/protocols/JabberG/src/jabber_presence_manager.h index 6e82542fd4..888426cf5b 100644 --- a/protocols/JabberG/src/jabber_presence_manager.h +++ b/protocols/JabberG/src/jabber_presence_manager.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index f6cddcd8a9..ded0441250 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h index 398a3fbc9e..4a1ed9e32e 100644 --- a/protocols/JabberG/src/jabber_privacy.h +++ b/protocols/JabberG/src/jabber_privacy.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -215,7 +216,7 @@ public: {
if ( !m_pRules)
return FALSE;
-
+
if (m_pRules == pRuleToRemove) {
m_pRules = m_pRules->GetNext();
pRuleToRemove->SetNext(NULL);
@@ -252,7 +253,7 @@ public: dwCount++;
pRule = pRule->GetNext();
}
-
+
// create pointer array for sort procedure
CPrivacyListRule **pRules = (CPrivacyListRule **)mir_alloc(dwCount * sizeof(CPrivacyListRule *));
if ( !pRules)
@@ -263,7 +264,7 @@ public: pRules[dwPos++] = pRule;
pRule = pRule->GetNext();
}
-
+
// sort array of pointers, slow, but working :)
DWORD i, j;
CPrivacyListRule *pTmp;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index c389dab12b..9ad0e24675 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 7b0970ef86..799f97a90e 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_proxy.cpp b/protocols/JabberG/src/jabber_proxy.cpp index e36558e94f..50e5f4eca3 100644 --- a/protocols/JabberG/src/jabber_proxy.cpp +++ b/protocols/JabberG/src/jabber_proxy.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -103,7 +104,7 @@ int JabberHttpGatewayWrapSend(HANDLE hConn, PBYTE buf, int len, int flags, MIRAN TCHAR sid[25] = _T("");
unsigned __int64 rid = 0;
- XmlNode hPayLoad(strb);
+ XmlNode hPayLoad(strb);
XmlNode body(_T("body"));
HXML hBody = body << XATTRI64(_T("rid"), rid++) << XATTR(_T("sid"), sid) <<
XATTR(_T("xmlns"), _T("http://jabber.org/protocol/httpbind"));
diff --git a/protocols/JabberG/src/jabber_proxy.h b/protocols/JabberG/src/jabber_proxy.h index b9bc03c73e..8f2b05646b 100644 --- a/protocols/JabberG/src/jabber_proxy.h +++ b/protocols/JabberG/src/jabber_proxy.h @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index aeb7ef9bc4..6a49f9e718 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
XEP-0146 support for Miranda IM
@@ -82,7 +83,7 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo* pInfo, const T if ( !szJid)
szJid = m_pProto->m_ThreadInfo->fullJID;
- resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), szJid)
+ resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), szJid)
<< XATTR(_T("node"), pNode->GetNode()) << XATTR(_T("name"), pNode->GetName());
pNode = pNode->GetNext();
@@ -259,7 +260,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhoc pSession->SetStage(1);
XmlNodeIq iq(_T("result"), pInfo);
- HXML xNode = iq
+ HXML xNode = iq
<< XCHILDNS(_T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR(_T("node"), _T(JABBER_FEAT_RC_SET_STATUS))
<< XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
<< XCHILDNS(_T("x"), _T(JABBER_FEAT_DATA_FORMS)) << XATTR(_T("type"), _T("form"));
@@ -267,12 +268,12 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhoc xNode << XCHILD(_T("title"), TranslateT("Change Status"));
xNode << XCHILD(_T("instructions"), TranslateT("Choose the status and status message"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
+ xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
<< XATTR(_T("value"), _T(JABBER_FEAT_RC));
- HXML fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status"))
+ HXML fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status"))
<< XATTR(_T("type"), _T("list-single")) << XATTR(_T("var"), _T("status"));
-
+
fieldNode << XCHILD(_T("required"));
int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
@@ -318,7 +319,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhoc // status message text
xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status message"))
<< XATTR(_T("type"), _T("text-multi")) << XATTR(_T("var"), _T("status-message"));
-
+
// global status
fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Change global status"))
<< XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("status-global"));
@@ -383,7 +384,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhoc db_set_b(NULL, "SRAway", StatusModeToDbSetting(status, "NoDlg"), 1);
db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), szStatusMessage ? szStatusMessage : _T(""));
-
+
fieldNode = xmlGetChildByTag(xNode, "field", "var", _T("status-global"));
if (fieldNode && (valueNode = xmlGetChild(fieldNode , "value"))) {
if (xmlGetText(valueNode) && _ttoi(xmlGetText(valueNode)))
@@ -408,7 +409,7 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe pSession->SetStage(1);
XmlNodeIq iq(_T("result"), pInfo);
- HXML xNode = iq
+ HXML xNode = iq
<< XCHILDNS(_T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR(_T("node"), _T(JABBER_FEAT_RC_SET_OPTIONS))
<< XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
<< XCHILDNS(_T("x"), _T(JABBER_FEAT_DATA_FORMS)) << XATTR(_T("type"), _T("form"));
@@ -416,7 +417,7 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe xNode << XCHILD(_T("title"), TranslateT("Set Options"));
xNode << XCHILD(_T("instructions"), TranslateT("Set the desired options"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
+ xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
<< XATTR(_T("value"), _T(JABBER_FEAT_RC));
// Automatically Accept File Transfers
@@ -522,7 +523,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe << XCHILDNS(_T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR(_T("node"), _T(JABBER_FEAT_RC_FORWARD))
<< XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed"))
<< XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info")));
-
+
return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION;
}
@@ -530,7 +531,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe pSession->SetStage(1);
XmlNodeIq iq(_T("result"), pInfo);
- HXML xNode = iq
+ HXML xNode = iq
<< XCHILDNS(_T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR(_T("node"), _T(JABBER_FEAT_RC_FORWARD))
<< XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
<< XCHILDNS(_T("x"), _T(JABBER_FEAT_DATA_FORMS)) << XATTR(_T("type"), _T("form"));
@@ -551,7 +552,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
}
-
+
if (pSession->GetStage() == 1) {
// result form here
HXML commandNode = pInfo->GetChildNode();
@@ -579,7 +580,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo* pInfo, CJabberAdhocSe if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
DBVARIANT dbv;
if ( !JGetStringT(hContact, "jid", &dbv)) {
-
+
HANDLE hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0);
while (hDbEvent) {
DBEVENTINFO dbei = { 0 };
@@ -689,7 +690,7 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo* pInfo, CJabberAdh pSession->SetStage(1);
XmlNodeIq iq(_T("result"), pInfo);
- HXML xNode = iq
+ HXML xNode = iq
<< XCHILDNS(_T("command"), _T(JABBER_FEAT_COMMANDS)) << XATTR(_T("node"), _T(JABBER_FEAT_RC_QUIT_MIRANDA))
<< XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
<< XCHILDNS(_T("x"), _T(JABBER_FEAT_DATA_FORMS)) << XATTR(_T("type"), _T("form"));
@@ -697,7 +698,7 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo* pInfo, CJabberAdh xNode << XCHILD(_T("title"), TranslateT("Confirmation needed"));
xNode << XCHILD(_T("instructions"), TranslateT("Please confirm Miranda NG shutdown"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
+ xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
<< XCHILD(_T("value"), _T(JABBER_FEAT_RC));
// I Agree checkbox
@@ -707,7 +708,7 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo* pInfo, CJabberAdh m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
}
-
+
if (pSession->GetStage() == 1) {
// result form here
HXML commandNode = pInfo->GetChildNode();
@@ -768,7 +769,7 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo* pInfo, CJabbe xNode << XCHILD(_T("title"), TranslateT("Leave groupchats"));
xNode << XCHILD(_T("instructions"), TranslateT("Choose the groupchats you want to leave"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
+ xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
<< XATTR(_T("value"), _T(JABBER_FEAT_RC));
// Groupchats
@@ -787,7 +788,7 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo* pInfo, CJabbe m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
}
-
+
if (pSession->GetStage() == 1) {
// result form here
HXML commandNode = pInfo->GetChildNode();
diff --git a/protocols/JabberG/src/jabber_rc.h b/protocols/JabberG/src/jabber_rc.h index dd9078e67b..a06b633457 100644 --- a/protocols/JabberG/src/jabber_rc.h +++ b/protocols/JabberG/src/jabber_rc.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
XEP-0146 support for Miranda IM
@@ -118,7 +119,7 @@ public: }
~CJabberAdhocNode()
{
- if (m_szJid)
+ if (m_szJid)
mir_free(m_szJid);
if (m_szNode)
mir_free(m_szNode);
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 4e65cda1a2..89949345da 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Artem Shpynov
+Copyright (C) 2012-13 Miranda NG Project
Module implements a search according to XEP-0055: Jabber Search
http://www.xmpp.org/extensions/xep-0055.html
@@ -257,10 +258,10 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M TCHAR* value = pmUserData->operator [](var);
Results.pszFields[j] = value ? value : (TCHAR *)_T(" ");
if ( !_tcsicmp(var,_T("jid")) && value)
- _tcsncpy(Results.jsr.jid, value, SIZEOF(Results.jsr.jid));
+ _tcsncpy(Results.jsr.jid, value, SIZEOF(Results.jsr.jid));
}
{
- TCHAR * nickfields[]={ _T("nick"), _T("nickname"),
+ TCHAR * nickfields[]={ _T("nick"), _T("nickname"),
_T("fullname"), _T("name"),
_T("given"), _T("first"),
_T("jid"), NULL };
@@ -343,7 +344,7 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode) int i=1;
while (HXML itemNode = xmlGetNthChild(queryNode, _T("item"), i++)) {
U_TCHAR_MAP *pUserColumn=new U_TCHAR_MAP(10);
-
+
TCHAR *jid = (TCHAR*)xmlGetAttrValue(itemNode, _T("jid"));
TCHAR* keyReturned;
mColumnsNames.insertCopyKey(_T("jid"),_T("jid"),&keyReturned, CopyKey, DestroyKey);
@@ -417,7 +418,7 @@ static void JabberSearchFreeData(HWND hwndDlg, JabberSearchData * dat) free(dat->pJSInf);
dat->pJSInf=NULL;
}
- else EnumChildWindows(GetDlgItem(hwndDlg,IDC_FRAME),DeleteChildWindowsProc,0);
+ else EnumChildWindows(GetDlgItem(hwndDlg,IDC_FRAME),DeleteChildWindowsProc,0);
if (dat->xNode)
xi.destroyNode(dat->xNode);
@@ -629,11 +630,11 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR mir_free(MyDat->defValue);
free(MyDat);
}
- else
+ else
{
JabberSearchRefreshFrameScroll(hwndDlg,dat);
ScrollWindow(GetDlgItem(hwndDlg, IDC_FRAME), 0, dat->curPos - 0, NULL, &(dat->frameRect));
- SetScrollPos(GetDlgItem(hwndDlg, IDC_VSCROLL), SB_CTL, 0, FALSE);
+ SetScrollPos(GetDlgItem(hwndDlg, IDC_VSCROLL), SB_CTL, 0, FALSE);
dat->curPos=0;
}
return TRUE;
@@ -735,7 +736,7 @@ HWND __cdecl CJabberProto::SearchAdvanced(HWND hwndDlg) int iqId = SerialNext();
XmlNodeIq iq(_T("set"), iqId, szServerName);
HXML query = iq << XQUERY(_T("jabber:iq:search"));
-
+
if (m_tszSelectedLang)
iq << XATTR(_T("xml:lang"), m_tszSelectedLang); // i'm sure :)
diff --git a/protocols/JabberG/src/jabber_search.h b/protocols/JabberG/src/jabber_search.h index 52406d974e..dd2aaf7465 100644 --- a/protocols/JabberG/src/jabber_search.h +++ b/protocols/JabberG/src/jabber_search.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Artem Shpynov
+Copyright (C) 2012-13 Miranda NG Project
Module implements a search according to XEP-0055: Jabber Search
http://www.xmpp.org/extensions/xep-0055.html
@@ -44,7 +45,7 @@ typedef struct _tagJabberSearchData int frameHeight;
RECT frameRect;
BOOL fSearchRequestIsXForm;
-
+
}JabberSearchData;
typedef struct tag_Data
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 37c515943f..e15e7eb1a9 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -72,7 +73,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) if ( !hDll)
return false;
- GetUserNameExType myGetUserNameEx =
+ GetUserNameExType myGetUserNameEx =
(GetUserNameExType)GetProcAddress(hDll, "GetUserNameExW");
if ( !myGetUserNameEx) return false;
@@ -80,14 +81,14 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) TCHAR szFullUserName[128] = _T("");
ULONG szFullUserNameLen = SIZEOF(szFullUserName);
if ( !myGetUserNameEx(12, szFullUserName, &szFullUserNameLen)) {
- szFullUserName[ 0 ] = 0;
+ szFullUserName[ 0 ] = 0;
szFullUserNameLen = SIZEOF(szFullUserName);
myGetUserNameEx(2, szFullUserName, &szFullUserNameLen);
}
TCHAR* name = _tcsrchr(szFullUserName, '\\');
if (name) *name = 0;
- else return false;
+ else return false;
if (szHostName && szHostName[0]) {
TCHAR *szFullUserNameU = _tcsupr(mir_tstrdup(szFullUserName));
@@ -100,7 +101,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) // Convert host name to FQDN
// PHOSTENT host = (ip == INADDR_NONE) ? gethostbyname(szHost) : gethostbyaddr((char*)&ip, 4, AF_INET);
PHOSTENT host = (ip == INADDR_NONE) ? NULL : gethostbyaddr((char*)&ip, 4, AF_INET);
- if (host && host->h_name)
+ if (host && host->h_name)
connectHost = host->h_name;
TCHAR *connectHostT = mir_a2t(connectHost);
@@ -123,7 +124,7 @@ char* TNtlmAuth::getInitialRequest() char* result;
if (info->password[0] != 0)
result = Netlib_NtlmCreateResponse2(hProvider, "", info->username, info->password, &complete);
- else
+ else
result = Netlib_NtlmCreateResponse2(hProvider, "", NULL, NULL, &complete);
return result;
@@ -137,9 +138,9 @@ char* TNtlmAuth::getChallenge(const TCHAR *challenge) char *text = (!lstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge), *result;
if (info->password[0] != 0)
result = Netlib_NtlmCreateResponse2(hProvider, text, info->username, info->password, &complete);
- else
+ else
result = Netlib_NtlmCreateResponse2(hProvider, text, NULL, NULL, &complete);
-
+
mir_free(text);
return result;
}
@@ -178,8 +179,8 @@ char* TMD5Auth::getChallenge(const TCHAR *challenge) CallService(MS_UTILS_GETRANDOM, sizeof(digest), (LPARAM)digest);
sprintf(cnonce, "%08x%08x%08x%08x", htonl(digest[0]), htonl(digest[1]), htonl(digest[2]), htonl(digest[3]));
- char *uname = mir_utf8encodeT(info->username),
- *passw = mir_utf8encodeT(info->password),
+ char *uname = mir_utf8encodeT(info->username),
+ *passw = mir_utf8encodeT(info->password),
*serv = mir_utf8encode(info->server);
mir_md5_init(&ctx);
@@ -197,7 +198,7 @@ char* TMD5Auth::getChallenge(const TCHAR *challenge) mir_md5_append(&ctx, (BYTE*)":", 1);
mir_md5_append(&ctx, (BYTE*)cnonce, (int)strlen(cnonce));
mir_md5_finish(&ctx, (BYTE*)hash1);
-
+
mir_md5_init(&ctx);
mir_md5_append(&ctx, (BYTE*)"AUTHENTICATE:xmpp/", 18);
mir_md5_append(&ctx, (BYTE*)serv, (int)strlen(serv));
@@ -217,7 +218,7 @@ char* TMD5Auth::getChallenge(const TCHAR *challenge) mir_md5_finish(&ctx, (BYTE*)digest);
char* buf = (char*)alloca(8000);
- int cbLen = mir_snprintf(buf, 8000,
+ int cbLen = mir_snprintf(buf, 8000,
"username=\"%s\",realm=\"%s\",nonce=\"%s\",cnonce=\"%s\",nc=%08d,"
"qop=auth,digest-uri=\"xmpp/%s\",charset=utf-8,response=%08x%08x%08x%08x",
uname, realm, nonce, cnonce, iCallCount, serv,
@@ -243,7 +244,7 @@ void hmac_sha1(mir_sha1_byte_t *md, mir_sha1_byte_t *key, size_t keylen, mir_sha unsigned char k_ipad[SHA_BLOCKSIZE], k_opad[SHA_BLOCKSIZE];
mir_sha1_ctx ctx;
- if (keylen > SHA_BLOCKSIZE)
+ if (keylen > SHA_BLOCKSIZE)
{
mir_sha1_init(&ctx);
mir_sha1_append(&ctx, key, (int)keylen);
@@ -257,7 +258,7 @@ void hmac_sha1(mir_sha1_byte_t *md, mir_sha1_byte_t *key, size_t keylen, mir_sha memset(k_ipad+keylen, 0x36, SHA_BLOCKSIZE - keylen);
memset(k_opad+keylen, 0x5c, SHA_BLOCKSIZE - keylen);
- for (unsigned i = 0; i < keylen; i++)
+ for (unsigned i = 0; i < keylen; i++)
{
k_ipad[i] ^= 0x36;
k_opad[i] ^= 0x5c;
@@ -310,7 +311,7 @@ char* TScramAuth::getChallenge(const TCHAR *challenge) char *chl = JabberBase64DecodeT(challenge, &chlLen);
char *r = strstr(chl, "r="); if ( !r) { mir_free(chl); return NULL; }
- char *e = strchr(r, ','); if (e) *e = 0;
+ char *e = strchr(r, ','); if (e) *e = 0;
char *snonce = mir_strdup(r + 2);
if (e) *e = ',';
@@ -337,10 +338,10 @@ char* TScramAuth::getChallenge(const TCHAR *challenge) char *passw = mir_utf8encodeT(info->password);
size_t passwLen = strlen(passw);
-
+
mir_sha1_byte_t saltedPassw[ MIR_SHA1_HASH_SIZE ];
Hi(saltedPassw, passw, passwLen, salt, saltLen, ind);
-
+
mir_free(salt);
mir_free(passw);
@@ -428,8 +429,8 @@ TPlainAuth::~TPlainAuth() char* TPlainAuth::getInitialRequest()
{
- char *uname = mir_utf8encodeT(info->username),
- *passw = mir_utf8encodeT(info->password);
+ char *uname = mir_utf8encodeT(info->username),
+ *passw = mir_utf8encodeT(info->password);
size_t size = 2 * strlen(uname) + strlen(passw) + strlen(info->server) + 4;
char *toEncode = (char*)alloca(size);
@@ -437,7 +438,7 @@ char* TPlainAuth::getInitialRequest() size = mir_snprintf(toEncode, size, "%s@%s%c%s%c%s", uname, info->server, 0, uname, 0, passw);
else
size = mir_snprintf(toEncode, size, "%c%s%c%s", 0, uname, 0, passw);
-
+
mir_free(uname);
mir_free(passw);
@@ -472,4 +473,3 @@ bool TJabberAuth::validateLogin(const TCHAR*) {
return true;
}
-
diff --git a/protocols/JabberG/src/jabber_secur.h b/protocols/JabberG/src/jabber_secur.h index 41dfc3eafe..18afe89dfa 100644 --- a/protocols/JabberG/src/jabber_secur.h +++ b/protocols/JabberG/src/jabber_secur.h @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -71,7 +72,7 @@ class TMD5Auth : public TJabberAuth typedef TJabberAuth CSuper;
int iCallCount;
-public:
+public:
TMD5Auth(ThreadData*);
virtual ~TMD5Auth();
@@ -83,14 +84,14 @@ class TScramAuth : public TJabberAuth typedef TJabberAuth CSuper;
char *cnonce, *msg1, *serverSignature;
-public:
+public:
TScramAuth(ThreadData*);
virtual ~TScramAuth();
virtual char* getInitialRequest();
virtual char* getChallenge(const TCHAR *challenge);
virtual bool validateLogin(const TCHAR *challenge);
-
+
void Hi(mir_sha1_byte_t* res , char* passw, size_t passwLen, char* salt, size_t saltLen, int ind);
};
@@ -102,7 +103,7 @@ class TNtlmAuth : public TJabberAuth HANDLE hProvider;
const TCHAR *szHostName;
-public:
+public:
TNtlmAuth(ThreadData*, const char* mechanism, const TCHAR *hostname = NULL);
virtual ~TNtlmAuth();
diff --git a/protocols/JabberG/src/jabber_send_manager.cpp b/protocols/JabberG/src/jabber_send_manager.cpp index 6f9ee3760e..919f09b2b0 100644 --- a/protocols/JabberG/src/jabber_send_manager.cpp +++ b/protocols/JabberG/src/jabber_send_manager.cpp @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_send_manager.h b/protocols/JabberG/src/jabber_send_manager.h index 79cdf24522..d3ad28c668 100644 --- a/protocols/JabberG/src/jabber_send_manager.h +++ b/protocols/JabberG/src/jabber_send_manager.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-08 George Hazan
Copyright (C) 2007 Maxim Mluhov
Copyright (C) 2008-09 Dmitriy Chervov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_std.cpp b/protocols/JabberG/src/jabber_std.cpp index 8c0a8ac683..5aacd4cc11 100644 --- a/protocols/JabberG/src/jabber_std.cpp +++ b/protocols/JabberG/src/jabber_std.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -209,7 +210,7 @@ char* __fastcall JTranslate(const char* str) // save/load crypted strings
void __forceinline sttCryptString(char *str)
{
- for (;*str; ++str)
+ for (;*str; ++str)
{
const char c = *str ^ 0xc3;
if (c) *str = c;
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index ab3f20627e..b9bde4c8bb 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 7ab9d74d72..bea9519b96 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_treelist.cpp b/protocols/JabberG/src/jabber_treelist.cpp index 97ceec54aa..c34810c9da 100644 --- a/protocols/JabberG/src/jabber_treelist.cpp +++ b/protocols/JabberG/src/jabber_treelist.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -315,7 +316,7 @@ void TreeList_Update(HWND hwnd) for (int j = 1; j < ptli->text.getCount(); ++j)
ListView_SetItemText(hwnd, i, j, ptli->text[j]);
}
- }
+ }
else ListView_DeleteItem(hwnd, i);
}
if (data->mode == TLM_TREE)
@@ -357,7 +358,7 @@ BOOL TreeList_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, UINT id lvi.mask = LVIF_PARAM;
lvi.iItem = lpnmia->iItem;
ListView_GetItem(lpnmia->hdr.hwndFrom, &lvi);
-
+
HTREELISTITEM hItem = (lvi.iItem < 0) ? data-> root : (HTREELISTITEM)lvi.lParam;
if ( !hItem->subItems.getCount() && !(hItem->flags & TLIF_FAKEPARENT)) break;
data->hItemSelected = hItem;
@@ -396,7 +397,7 @@ BOOL TreeList_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, UINT id hItem->flags &= ~TLIF_EXPANDED;
hItem->flags |= TLIF_MODIFIED;
TreeList_Update(lpnmlvk->hdr.hwndFrom);
- }
+ }
else if (hItem->indent && (lpnmlvk->wVKey != VK_SUBTRACT)) {
for (int i = lvi.iItem; i--;) {
lvi.mask = LVIF_INDENT;
@@ -572,7 +573,7 @@ static void sttTreeList_CreateItems_List(HTREELISTITEM hItem, LPARAM data) static int CALLBACK sttTreeList_SortFunc(LPARAM lParam1, LPARAM lParam2, LPARAM)
{
- HTREELISTITEM p1 = (HTREELISTITEM)lParam1, p2 = (HTREELISTITEM)lParam2;
+ HTREELISTITEM p1 = (HTREELISTITEM)lParam1, p2 = (HTREELISTITEM)lParam2;
if (p1->sortIndex < p2->sortIndex)
return -1;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index c84ebf81a3..2e1a142191 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -197,7 +198,7 @@ static HTREEITEM sttFillInfoLine(HWND hwndTree, HTREEITEM htiRoot, HICON hIcon, tvis.itemex.mask |= TVIF_HANDLE;
tvis.itemex.hItem = hti;
TreeView_SetItem(hwndTree, &tvis.itemex);
- }
+ }
else {
tvis.itemex.mask |= TVIF_STATE;
tvis.itemex.stateMask = TVIS_EXPANDED;
@@ -215,7 +216,7 @@ static void sttFillResourceInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM hti JABBER_RESOURCE_STATUS *res = resource ? &item->resource[resource-1] : &item->itemResource;
if (res->resourceName && *res->resourceName)
- htiResource = sttFillInfoLine(hwndTree, htiRoot, LoadSkinnedProtoIcon(ppro->m_szModuleName, res->status),
+ htiResource = sttFillInfoLine(hwndTree, htiRoot, LoadSkinnedProtoIcon(ppro->m_szModuleName, res->status),
TranslateT("Resource"), res->resourceName, sttInfoLineId(resource, INFOLINE_NAME), true);
// StatusMsg
@@ -258,7 +259,7 @@ static void sttFillResourceInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM hti lstrcpyn(buf, _tctime(&res->idleStartTime), SIZEOF(buf));
int len = lstrlen(buf);
if (len > 0) buf[len-1] = 0;
- }
+ }
else if ( !res->idleStartTime)
lstrcpyn(buf, TranslateT("unknown"), SIZEOF(buf));
else
@@ -273,7 +274,7 @@ static void sttFillResourceInfo(CJabberProto* ppro, HWND hwndTree, HTREEITEM hti if ( !(jcb & JABBER_RESOURCE_CAPS_ERROR)) {
HTREEITEM htiCaps = sttFillInfoLine(hwndTree, htiResource, ppro->LoadIconEx("main"), NULL, TranslateT("Client capabilities"), sttInfoLineId(resource, INFOLINE_CAPS));
int i;
- for (i = 0; g_JabberFeatCapPairs[i].szFeature; i++)
+ for (i = 0; g_JabberFeatCapPairs[i].szFeature; i++)
if (jcb & g_JabberFeatCapPairs[i].jcbCap) {
TCHAR szDescription[ 1024 ];
if (g_JabberFeatCapPairs[i].tszDescription)
@@ -398,7 +399,7 @@ static void sttFillUserInfo(CJabberProto* ppro, HWND hwndTree, JABBER_LIST_ITEM if (item->resourceCount) {
for (int i = 0; i < item->resourceCount; i++)
sttFillResourceInfo(ppro, hwndTree, htiRoot, item, i+1);
- }
+ }
else if ( !_tcschr(item->jid, _T('@')) || (item->itemResource.status != ID_STATUS_OFFLINE))
sttFillResourceInfo(ppro, hwndTree, htiRoot, item, 0);
@@ -454,7 +455,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa dat->hContact = NULL;
dat->item = (JABBER_LIST_ITEM *)lParam;
}
-
+
{
RECT rc; GetClientRect(hwndDlg, &rc);
MoveWindow(GetDlgItem(hwndDlg, IDC_TV_INFO), 5, 5, rc.right-10, rc.bottom-10, TRUE);
@@ -484,7 +485,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa HWND hwndTree = GetDlgItem(hwndDlg, IDC_TV_INFO);
TreeView_DeleteAllItems(hwndTree);
HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, dat->ppro->LoadIconEx("main"), _T("JID"), dbv.ptszVal, sttInfoLineId(0, INFOLINE_NAME), true);
- sttFillInfoLine(hwndTree, htiRoot, dat->ppro->LoadIconEx("vcard"), NULL,
+ sttFillInfoLine(hwndTree, htiRoot, dat->ppro->LoadIconEx("vcard"), NULL,
TranslateT("Please switch online to see more details."));
db_free(&dbv);
@@ -570,7 +571,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa DBVARIANT dbv = {0};
if (dat->ppro->JGetStringT(dat->hContact, "jid", &dbv))
break;
-
+
if ( !(dat->item = dat->ppro->ListGetItemPtr(LIST_VCARD_TEMP, dbv.ptszVal)))
dat->item = dat->ppro->ListGetItemPtr(LIST_ROSTER, dbv.ptszVal);
db_free(&dbv);
@@ -585,7 +586,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa case WM_DESTROY:
WindowList_Remove(hUserInfoList, hwndDlg);
- if (dat) {
+ if (dat) {
mir_free(dat);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
}
@@ -803,7 +804,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP if (JabberIsThemeActive && JabberDrawThemeParentBackground && JabberIsThemeActive()) {
RECT rc; GetClientRect(hwndCanvas, &rc);
JabberDrawThemeParentBackground(hwndCanvas, hdcCanvas, &rc);
- }
+ }
else {
RECT rc; GetClientRect(hwndCanvas, &rc);
FillRect(hdcCanvas, &rc, (HBRUSH)GetSysColorBrush(COLOR_BTNFACE));
@@ -846,7 +847,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) return 0;
HANDLE hContact = (HANDLE)lParam;
- if (hContact == NULL) {
+ if (hContact == NULL) {
// Show our vcard
OnUserInfoInit_VCard(wParam, lParam);
return 0;
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 4790bde7e1..2a365c562e 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -72,7 +73,7 @@ HANDLE CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid) {
if (jid == NULL)
return (HANDLE)NULL;
-
+
HANDLE hContactMatched = NULL;
HANDLE hContact = (HANDLE)db_find_first();
while (hContact != NULL) {
@@ -81,7 +82,7 @@ HANDLE CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid) DBVARIANT dbv;
int result = JGetStringT(hContact, "ChatRoomID", &dbv);
if (result)
- result = JGetStringT(hContact, "jid", &dbv);
+ result = JGetStringT(hContact, "jid", &dbv);
if ( !result) {
int result;
@@ -328,8 +329,8 @@ char* __stdcall JabberUrlEncode(const char* str) *q = '?';
}
}
- else *q = *p;
- q++;
+ else *q = *p;
+ q++;
break;
}
}
@@ -361,9 +362,9 @@ void __stdcall JabberUtfToTchar(const char* pszValue, size_t cbLen, LPTSTR& dest JabberUrlDecode(pszCopy);
-
+
mir_utf8decode(pszCopy, &dest);
-
+
if (bNeedsFree)
free(pszCopy);
@@ -819,7 +820,7 @@ void CJabberProto::SendPresenceTo(int status, TCHAR* to, HXML extra, const TCHAR xmlAddChild(p, extra);
// XEP-0115:Entity Capabilities
- HXML c = p << XCHILDNS(_T("c"), _T(JABBER_FEAT_ENTITY_CAPS)) << XATTR(_T("node"), _T(JABBER_CAPS_MIRANDA_NODE))
+ HXML c = p << XCHILDNS(_T("c"), _T(JABBER_FEAT_ENTITY_CAPS)) << XATTR(_T("node"), _T(JABBER_CAPS_MIRANDA_NODE))
<< XATTR(_T("ver"), szCoreVersion);
TCHAR szExtCaps[ 512 ] = _T("");
@@ -940,7 +941,7 @@ void CJabberProto::SendPresenceTo(int status, TCHAR* to, HXML extra, const TCHAR // Should not reach here
break;
}
-
+
if (msg)
p << XCHILD(_T("status"), msg);
@@ -978,8 +979,8 @@ void CJabberProto::OnIqResultGoogleSharedStatus(HXML iqNode, CJabberIqInfo* pInf BOOL CJabberProto::OnIqSetGoogleSharedStatus(HXML iqNode, CJabberIqInfo* pInfo) {
if (JABBER_IQ_TYPE_SET != pInfo->GetIqType()) return FALSE;
if (m_bGoogleSharedStatusLock) return TRUE;
-
- int status;
+
+ int status;
HXML query = xmlGetChild(iqNode, _T("query"));
HXML node = xmlGetChild(query, _T("invisible"));
if (0 == _tcsicmp(_T("true"), xmlGetAttrValue(node, _T("value"))))
@@ -993,9 +994,9 @@ BOOL CJabberProto::OnIqSetGoogleSharedStatus(HXML iqNode, CJabberIqInfo* pInfo) else
status = m_iStatus;
}
-
+
if (status != m_iStatus) SetStatus(status);
-
+
return TRUE;
}
@@ -1084,7 +1085,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR* dest, size_t destLen) if (LI && LI->resourceCount == 1 && LI->resource[ 0 ].szCapsNode &&
_tcsicmp(LI->resource[ 0 ].szCapsNode, _T("http://talk.google.com/xmpp/bot/caps")) == 0)
{
- if (p) *p = 0;
+ if (p) *p = 0;
return dest;
}
@@ -1292,7 +1293,7 @@ void CJabberProto::RebuildInfoFrame() TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen)
{
struct tm* T = localtime(&_time);
- mir_sntprintf(buf, bufLen, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
+ mir_sntprintf(buf, bufLen, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
T->tm_year+1900, T->tm_mon+1, T->tm_mday, T->tm_hour, T->tm_min, T->tm_sec);
return buf;
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 2e6570dd3f..4835b87245 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -1057,7 +1058,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) for (i=0;;i++) {
wsprintfA(idstr, "e-mail%d", i);
- if ( DBGetContactSettingTString(NULL, m_szModuleName, idstr, &dbv))
+ if ( DBGetContactSettingTString(NULL, m_szModuleName, idstr, &dbv))
break;
HXML e = v << XCHILD(_T("EMAIL"), dbv.ptszVal);
@@ -1097,7 +1098,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) n = v << XCHILD(_T("ORG"));
AppendVcardFromDB(n, "ORGNAME", "Company");
AppendVcardFromDB(n, "ORGUNIT", "CompanyDepartment");
-
+
AppendVcardFromDB(v, "TITLE", "CompanyPosition");
AppendVcardFromDB(v, "ROLE", "Role");
AppendVcardFromDB(v, "URL", "Homepage");
@@ -1180,7 +1181,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) for (int j=0; j<MIR_SHA1_HASH_SIZE; j++)
sprintf(buf+(j<<1), "%02x", digest[j]);
- m_options.AvatarType = JabberGetPictureType(buffer);
+ m_options.AvatarType = JabberGetPictureType(buffer);
if (bPhotoChanged) {
DeleteFile(szAvatarName);
diff --git a/protocols/JabberG/src/jabber_ws.cpp b/protocols/JabberG/src/jabber_ws.cpp index b9b7ecd4bd..f7519dd7e6 100644 --- a/protocols/JabberG/src/jabber_ws.cpp +++ b/protocols/JabberG/src/jabber_ws.cpp @@ -3,6 +3,7 @@ Jabber Protocol Plugin for Miranda IM
Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 7c7317bfcc..89dc4f9838 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -26,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TAG_MAX_LEN 128
#define ATTR_MAX_LEN 8192
-#define T2UTF(A) A
+#define T2UTF(A) A
/////////////////////////////////////////////////////////////////////////////////////////
// XmlNodeIq class members
@@ -97,7 +98,7 @@ XmlNode::XmlNode(const XmlNode& n) }
XmlNode& XmlNode::operator =(const XmlNode& n)
-{
+{
if (m_hXml)
xi.destroyNode(m_hXml);
m_hXml = xi.copyNode(n);
diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h index c034e001cb..3622707db5 100644 --- a/protocols/JabberG/src/jabber_xml.h +++ b/protocols/JabberG/src/jabber_xml.h @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 3d7e7b09eb..d05f7bb49f 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -4,6 +4,7 @@ Jabber Protocol Plugin for Miranda IM Copyright (C) 2002-04 Santithorn Bunchua
Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -1443,7 +1444,7 @@ INT_PTR __cdecl CJabberProto::OnSetXStatusEx(WPARAM wParam, LPARAM lParam) pepMood->LaunchSetGui(1);
return 0;
}
-
+
return 1;
}
diff --git a/protocols/JabberG/src/jabber_xstatus.h b/protocols/JabberG/src/jabber_xstatus.h index c9ffc03edd..dbbd95c678 100644 --- a/protocols/JabberG/src/jabber_xstatus.h +++ b/protocols/JabberG/src/jabber_xstatus.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/jabber_zstream.cpp b/protocols/JabberG/src/jabber_zstream.cpp index f5417b2470..e033be3785 100644 --- a/protocols/JabberG/src/jabber_zstream.cpp +++ b/protocols/JabberG/src/jabber_zstream.cpp @@ -5,6 +5,7 @@ XEP-0138 (Stream Compression) implementation Copyright (C) 2005-12 George Hazan
Copyright (C) 2007 Kostya Chukavin, Taras Zackrepa
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -120,7 +121,7 @@ retry: proto->Log("(ZLIB) Data received\n%s\n===IN: %d(%d) bytes", szLogBuffer, len, zRecvDatalen);
}
- if (len == 0)
+ if (len == 0)
goto retry;
zRecvReady = (zStreamIn.avail_out != 0);
diff --git a/protocols/JabberG/src/stdafx.cpp b/protocols/JabberG/src/stdafx.cpp index b019bed7ab..044195e26b 100644 --- a/protocols/JabberG/src/stdafx.cpp +++ b/protocols/JabberG/src/stdafx.cpp @@ -1,5 +1,5 @@ /*
-Copyright (C) 2012 Miranda NG team (http://miranda-ng.org)
+Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp index 6bf22f9f30..584c3cf081 100644 --- a/protocols/JabberG/src/ui_utils.cpp +++ b/protocols/JabberG/src/ui_utils.cpp @@ -2,6 +2,7 @@ Object UI extensions
Copyright (C) 2008 Victor Pavlychko, George Hazan
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/protocols/JabberG/src/ui_utils.h b/protocols/JabberG/src/ui_utils.h index a5aa1674f8..64e33bf1c7 100644 --- a/protocols/JabberG/src/ui_utils.h +++ b/protocols/JabberG/src/ui_utils.h @@ -5,6 +5,7 @@ Copyright (C) 2002-04 Santithorn Bunchua Copyright (C) 2005-12 George Hazan
Copyright (C) 2007-09 Maxim Mluhov
Copyright (C) 2007-09 Victor Pavlychko
+Copyright (C) 2012-13 Miranda NG Project
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -78,7 +79,7 @@ typedef struct tagLVTILEINFO UINT cColumns;
PUINT puColumns;
} LVTILEINFO, *PLVTILEINFO;
-typedef struct
+typedef struct
{
UINT cbSize;
DWORD dwFlags;
|