Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2017 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 #ifndef WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_ | |
| 12 #define WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_ | |
| 13 | |
| 14 #include <string> | |
| 15 #include <utility> | |
| 16 | |
| 17 namespace webrtc { | |
| 18 | |
| 19 // A structured representation of an SDP session description. | |
| 20 class SessionDescription { | |
| 21 public: | |
| 22 SessionDescription(std::string session_id, std::string session_version) | |
| 23 : session_id_(std::move(session_id)), | |
| 24 session_version_(std::move(session_version)) {} | |
| 25 | |
| 26 // https://tools.ietf.org/html/rfc4566#section-5.2 | |
| 27 // o=<username> <sess-id> <sess-version> <nettype> <addrtype> | |
| 28 // <unicast-address> | |
| 29 // session_id_ is the "sess-id" field. | |
| 30 // session_version_ is the "sess-version" field. | |
| 31 const std::string& session_id() const { return session_id_; } | |
|
Taylor Brandstetter
2017/03/11 02:19:56
Something I realized a little late: The session id
Taylor Brandstetter
2017/03/11 02:20:59
Meant to say "64-bit signed integer".
| |
| 32 void set_session_id(std::string session_id) { | |
| 33 session_id_ = std::move(session_id); | |
| 34 } | |
| 35 | |
| 36 const std::string& session_version() const { return session_version_; } | |
| 37 void set_session_version(std::string session_version) { | |
| 38 session_version_ = std::move(session_version); | |
| 39 } | |
| 40 | |
| 41 private: | |
| 42 std::string session_id_; | |
| 43 std::string session_version_; | |
| 44 }; | |
| 45 | |
| 46 } // namespace webrtc | |
| 47 | |
| 48 #endif // WEBRTC_API_ORTC_SESSIONDESCRIPTION_H_ | |
| OLD | NEW |