| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/protocol/jingle_messages.h" | 5 #include "remoting/protocol/jingle_messages.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
| 10 #include "remoting/protocol/content_description.h" | 10 #include "remoting/protocol/content_description.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 { JingleMessage::SESSION_INITIATE, "session-initiate" }, | 37 { JingleMessage::SESSION_INITIATE, "session-initiate" }, |
| 38 { JingleMessage::SESSION_ACCEPT, "session-accept" }, | 38 { JingleMessage::SESSION_ACCEPT, "session-accept" }, |
| 39 { JingleMessage::SESSION_TERMINATE, "session-terminate" }, | 39 { JingleMessage::SESSION_TERMINATE, "session-terminate" }, |
| 40 { JingleMessage::SESSION_INFO, "session-info" }, | 40 { JingleMessage::SESSION_INFO, "session-info" }, |
| 41 { JingleMessage::TRANSPORT_INFO, "transport-info" }, | 41 { JingleMessage::TRANSPORT_INFO, "transport-info" }, |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 const NameMapElement<JingleMessage::Reason> kReasons[] = { | 44 const NameMapElement<JingleMessage::Reason> kReasons[] = { |
| 45 { JingleMessage::SUCCESS, "success" }, | 45 { JingleMessage::SUCCESS, "success" }, |
| 46 { JingleMessage::DECLINE, "decline" }, | 46 { JingleMessage::DECLINE, "decline" }, |
| 47 { JingleMessage::SECURITY_ERROR, "security-error" }, |
| 47 { JingleMessage::CANCEL, "cancel" }, | 48 { JingleMessage::CANCEL, "cancel" }, |
| 48 { JingleMessage::EXPIRED, "expired" }, | 49 { JingleMessage::EXPIRED, "expired" }, |
| 49 { JingleMessage::GENERAL_ERROR, "general-error" }, | 50 { JingleMessage::GENERAL_ERROR, "general-error" }, |
| 50 { JingleMessage::FAILED_APPLICATION, "failed-application" }, | 51 { JingleMessage::FAILED_APPLICATION, "failed-application" }, |
| 51 { JingleMessage::INCOMPATIBLE_PARAMETERS, "incompatible-parameters" }, | 52 { JingleMessage::INCOMPATIBLE_PARAMETERS, "incompatible-parameters" }, |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 bool ParseIceCredentials(const buzz::XmlElement* element, | 55 bool ParseIceCredentials(const buzz::XmlElement* element, |
| 55 IceTransportInfo::IceCredentials* credentials) { | 56 IceTransportInfo::IceCredentials* credentials) { |
| 56 DCHECK(element->Name() == QName(kIceTransportNamespace, "credentials")); | 57 DCHECK(element->Name() == QName(kIceTransportNamespace, "credentials")); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 result->AddElement(FormatIceCredentials(credentials)); | 490 result->AddElement(FormatIceCredentials(credentials)); |
| 490 } | 491 } |
| 491 for (const NamedCandidate& candidate : candidates) { | 492 for (const NamedCandidate& candidate : candidates) { |
| 492 result->AddElement(FormatIceCandidate(candidate)); | 493 result->AddElement(FormatIceCandidate(candidate)); |
| 493 } | 494 } |
| 494 return result; | 495 return result; |
| 495 } | 496 } |
| 496 | 497 |
| 497 } // namespace protocol | 498 } // namespace protocol |
| 498 } // namespace remoting | 499 } // namespace remoting |
| OLD | NEW |