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_MEDIADESCRIPTION_H_ | |
| 12 #define WEBRTC_API_ORTC_MEDIADESCRIPTION_H_ | |
| 13 | |
| 14 #include <string> | |
| 15 | |
| 16 #include "webrtc/base/optional.h" | |
| 17 | |
| 18 namespace webrtc { | |
| 19 | |
| 20 // A structured representation of a media description within an SDP message. | |
|
Taylor Brandstetter
2017/03/11 00:24:29
nit: I'd say "session description" instead of "mes
Zhi Huang
2017/03/11 01:20:38
Done.
| |
| 21 class MediaDescription { | |
| 22 public: | |
| 23 explicit MediaDescription(std::string mid) : mid_(mid) {} | |
|
Taylor Brandstetter
2017/03/11 00:24:29
Should be mid_(std::move(mid)) to ensure an extra
Zhi Huang
2017/03/11 01:20:39
Oh, I missed this one.
| |
| 24 | |
| 25 ~MediaDescription() {} | |
| 26 | |
| 27 rtc::Optional<std::string> mid() const { return mid_; } | |
|
Taylor Brandstetter
2017/03/11 00:24:29
Could add a comment that this is the "mid" attribu
Zhi Huang
2017/03/11 01:20:39
Done.
| |
| 28 void set_mid(const rtc::Optional<std::string>& mid) { mid_ = mid; } | |
|
Taylor Brandstetter
2017/03/11 00:24:29
Same comment as in previous CL: I think this metho
Zhi Huang
2017/03/11 01:20:38
Both ways sound good to me. Maybe it would make it
Taylor Brandstetter
2017/03/11 01:37:06
That's a good argument. I could go either way. Mig
| |
| 29 | |
| 30 private: | |
| 31 rtc::Optional<std::string> mid_; | |
| 32 }; | |
| 33 | |
| 34 } // namespace webrtc | |
| 35 | |
| 36 #endif // WEBRTC_API_ORTC_MEDIADESCRIPTION_H_ | |
| OLD | NEW |