summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_archive.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_archive.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_archive.cpp')
-rw-r--r--protocols/JabberG/src/jabber_archive.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp
index 5359f67e51..57700a86a5 100644
--- a/protocols/JabberG/src/jabber_archive.cpp
+++ b/protocols/JabberG/src/jabber_archive.cpp
@@ -38,8 +38,7 @@ void CJabberProto::RetrieveMessageArchive(HANDLE hContact, JABBER_LIST_ITEM *pIt
pItem->bHistoryRead = TRUE;
- int iqId = SerialNext();
- XmlNodeIq iq(_T("get"), iqId);
+ XmlNodeIq iq( AddIQ(&CJabberProto::OnIqResultGetCollectionList, JABBER_IQ_TYPE_GET));
HXML list = iq << XCHILDNS( _T("list"), JABBER_FEAT_ARCHIVE) << XATTR(_T("with"), pItem->jid);
time_t tmLast = getDword(hContact, "LastCollection", 0);
@@ -47,12 +46,10 @@ void CJabberProto::RetrieveMessageArchive(HANDLE hContact, JABBER_LIST_ITEM *pIt
TCHAR buf[40];
list << XATTR(_T("start"), time2str(tmLast, buf, SIZEOF(buf)));
}
-
- IqAdd(iqId, IQ_PROC_NONE, &CJabberProto::OnIqResultGetCollectionList);
m_ThreadInfo->send(iq);
}
-void CJabberProto::OnIqResultGetCollectionList(HXML iqNode)
+void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*)
{
const TCHAR *to = xmlGetAttrValue(iqNode, _T("to"));
if (to == NULL || lstrcmp( xmlGetAttrValue(iqNode, _T("type")), _T("result")))
@@ -82,10 +79,8 @@ void CJabberProto::OnIqResultGetCollectionList(HXML iqNode)
tmLast = getDword(hContact, "LastCollection", 0);
}
- int iqId = SerialNext();
- IqAdd(iqId, IQ_PROC_NONE, &CJabberProto::OnIqResultGetCollection);
m_ThreadInfo->send(
- XmlNodeIq(_T("get"), iqId)
+ XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetCollection, JABBER_IQ_TYPE_GET))
<< XCHILDNS( _T("retrieve"), JABBER_FEAT_ARCHIVE) << XATTR(_T("with"), with) << XATTR(_T("start"), start));
time_t tmThis = str2time(start);
@@ -248,7 +243,7 @@ BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO& dbei)
return FALSE;
}
-void CJabberProto::OnIqResultGetCollection(HXML iqNode)
+void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*)
{
if ( lstrcmp( xmlGetAttrValue(iqNode, _T("type")), _T("result")))
return;