blob: 3ea27262d5532ec267f1ba07d36d1076b67293e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// 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);
stanza->AddAttr(buzz::QN_TO, addressee);
stanza->AddAttr(buzz::QN_ID, id);
stanza->AddElement(iq_body);
return stanza;
}
} // namespace remoting
|