summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_opt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-02 19:38:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-02 19:38:44 +0000
commit8fecb411c56387ef6db40abe96b8c935fddc6083 (patch)
tree3aee9abef3610ab248bba34af1bd4878038d130f /protocols/JabberG/src/jabber_opt.cpp
parentf7e58cf1bf50928ae22ffbdd9de99844407d5780 (diff)
atavism extincted: old nasty IQ handler mechanism
git-svn-id: http://svn.miranda-ng.org/main/trunk@6312 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index e4b36f2c73..8e3abd8694 100644
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -1030,7 +1030,7 @@ static void _RosterListClear(HWND hwndDlg)
ListView_SetColumnWidth(hList,3,width*10/100);
}
-void CJabberProto::_RosterHandleGetRequest(HXML node)
+void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*)
{
HWND hList=GetDlgItem(rrud.hwndDlg, IDC_ROSTER);
if (rrud.bRRAction==RRA_FILLLIST)
@@ -1101,18 +1101,13 @@ void CJabberProto::_RosterHandleGetRequest(HXML node)
if ( !queryRoster)
return;
- int iqId = SerialNext();
- IqAdd(iqId, IQ_PROC_NONE, &CJabberProto::_RosterHandleGetRequest);
-
- XmlNode iq(_T("iq"));
- xmlAddAttr(iq, _T("type"), _T("set"));
- iq << XATTRID(iqId);
+ XmlNodeIq iq( AddIQ(&CJabberProto::_RosterHandleGetRequest, JABBER_IQ_TYPE_SET));
HXML query = iq << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER);
int itemCount=0;
int ListItemCount=ListView_GetItemCount(hList);
- for (int index=0; index<ListItemCount; index++)
+ for (int index=0; index < ListItemCount; index++)
{
TCHAR jid[JABBER_MAX_JID_LEN]=_T("");
TCHAR name[260]=_T("");
@@ -1179,12 +1174,12 @@ void CJabberProto::_RosterHandleGetRequest(HXML node)
void CJabberProto::_RosterSendRequest(HWND hwndDlg, BYTE rrAction)
{
- rrud.bRRAction=rrAction;
- rrud.hwndDlg=hwndDlg;
-
- int iqId = SerialNext();
- IqAdd(iqId, IQ_PROC_NONE, &CJabberProto::_RosterHandleGetRequest);
- m_ThreadInfo->send(XmlNode(_T("iq")) << XATTR(_T("type"), _T("get")) << XATTRID(iqId) << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER));
+ rrud.bRRAction = rrAction;
+ rrud.hwndDlg = hwndDlg;
+
+ m_ThreadInfo->send(
+ XmlNodeIq( AddIQ(&CJabberProto::_RosterHandleGetRequest, JABBER_IQ_TYPE_GET))
+ << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER));
}
static void _RosterItemEditEnd(HWND hEditor, ROSTEREDITDAT * edat, BOOL bCancel)