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

Side by Side Diff: webrtc/libjingle/session/transportparser.cc

Issue 1175243003: Remove webrtc/libjingle/{examples,session}. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/libjingle/session/transportparser.h"
12
13 #include "webrtc/libjingle/session/parsing.h"
14 #include "webrtc/libjingle/xmllite/xmlelement.h"
15 #include "webrtc/libjingle/xmpp/constants.h"
16
17 namespace cricket {
18
19 bool TransportParser::ParseAddress(const buzz::XmlElement* elem,
20 const buzz::QName& address_name,
21 const buzz::QName& port_name,
22 rtc::SocketAddress* address,
23 ParseError* error) {
24 if (!elem->HasAttr(address_name))
25 return BadParse("address does not have " + address_name.LocalPart(), error);
26 if (!elem->HasAttr(port_name))
27 return BadParse("address does not have " + port_name.LocalPart(), error);
28
29 address->SetIP(elem->Attr(address_name));
30 std::istringstream ist(elem->Attr(port_name));
31 int port = 0;
32 ist >> port;
33 address->SetPort(port);
34
35 return true;
36 }
37
38 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/libjingle/session/transportparser.h ('k') | webrtc/libjingle/session/transportparser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698