| // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "remoting/jingle_glue/iq_request.h" |
| |
| #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" |
| #include "third_party/libjingle/source/talk/xmpp/constants.h" |
| |
| namespace remoting { |
| |
| // static |
| buzz::XmlElement* IqRequest::MakeIqStanza(const std::string& type, |
| const std::string& addressee, |
| buzz::XmlElement* iq_body, |
| const std::string& id) { |
| buzz::XmlElement* stanza = new buzz::XmlElement(buzz::QN_IQ); |
| stanza->AddAttr(buzz::QN_TYPE, type); |
| if (!addressee.empty()) |
| stanza->AddAttr(buzz::QN_TO, addressee); |
| stanza->AddAttr(buzz::QN_ID, id); |
| stanza->AddElement(iq_body); |
| return stanza; |
| } |
| |
| } // namespace remoting |