summaryrefslogtreecommitdiffstats
path: root/remoting/jingle_glue/xmpp_iq_request.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 22:50:13 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-06 22:50:13 +0000
commit19d963f72826c669179b9fa2c9c11ad40465a701 (patch)
tree798c0b13524d1fa331e427fd3b64a7e0d3d2798f /remoting/jingle_glue/xmpp_iq_request.cc
parent05932300479fbf56b492155d581c37cd7abea3f0 (diff)
downloadchromium_src-19d963f72826c669179b9fa2c9c11ad40465a701.zip
chromium_src-19d963f72826c669179b9fa2c9c11ad40465a701.tar.gz
chromium_src-19d963f72826c669179b9fa2c9c11ad40465a701.tar.bz2
Simplify IqRequest interface.
This is neccessary to make the interface usable with stanzas generated by JingleMessage::ToXml(). BUG=None TEST=Unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99801 Review URL: http://codereview.chromium.org/7809003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/xmpp_iq_request.cc')
-rw-r--r--remoting/jingle_glue/xmpp_iq_request.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/remoting/jingle_glue/xmpp_iq_request.cc b/remoting/jingle_glue/xmpp_iq_request.cc
index b8057c3..7e07665 100644
--- a/remoting/jingle_glue/xmpp_iq_request.cc
+++ b/remoting/jingle_glue/xmpp_iq_request.cc
@@ -25,20 +25,14 @@ XmppIqRequest::~XmppIqRequest() {
Unregister();
}
-void XmppIqRequest::SendIq(const std::string& type,
- const std::string& addressee,
- buzz::XmlElement* iq_body) {
+void XmppIqRequest::SendIq(buzz::XmlElement* stanza) {
DCHECK_EQ(MessageLoop::current(), message_loop_);
// Unregister the handler if it is already registered.
Unregister();
- DCHECK_GT(type.length(), 0U);
-
- scoped_ptr<buzz::XmlElement> stanza(MakeIqStanza(type, addressee, iq_body,
- xmpp_client_->NextId()));
-
- xmpp_client_->engine()->SendIq(stanza.get(), this, &cookie_);
+ stanza->AddAttr(buzz::QN_ID, xmpp_client_->NextId());
+ xmpp_client_->engine()->SendIq(stanza, this, &cookie_);
}
void XmppIqRequest::set_callback(const ReplyCallback& callback) {