Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: remoting/jingle_glue/iq_request.cc

Issue 7809003: Simplify IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/iq_request.h ('k') | remoting/jingle_glue/iq_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/jingle_glue/iq_request.h" 5 #include "remoting/jingle_glue/iq_request.h"
6 6
7 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" 7 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
8 #include "third_party/libjingle/source/talk/xmpp/constants.h" 8 #include "third_party/libjingle/source/talk/xmpp/constants.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 // static 12 // static
13 buzz::XmlElement* IqRequest::MakeIqStanza(const std::string& type, 13 buzz::XmlElement* IqRequest::MakeIqStanza(const std::string& type,
14 const std::string& addressee, 14 const std::string& addressee,
15 buzz::XmlElement* iq_body, 15 buzz::XmlElement* iq_body) {
16 const std::string& id) {
17 buzz::XmlElement* stanza = new buzz::XmlElement(buzz::QN_IQ); 16 buzz::XmlElement* stanza = new buzz::XmlElement(buzz::QN_IQ);
18 stanza->AddAttr(buzz::QN_TYPE, type); 17 stanza->AddAttr(buzz::QN_TYPE, type);
19 if (!addressee.empty()) 18 if (!addressee.empty())
20 stanza->AddAttr(buzz::QN_TO, addressee); 19 stanza->AddAttr(buzz::QN_TO, addressee);
21 stanza->AddAttr(buzz::QN_ID, id);
22 stanza->AddElement(iq_body); 20 stanza->AddElement(iq_body);
23 return stanza; 21 return stanza;
24 } 22 }
25 23
26 } // namespace remoting 24 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/iq_request.h ('k') | remoting/jingle_glue/iq_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698