Index: webrtc/api/ortc/mediadescription.h |
diff --git a/webrtc/api/ortc/mediadescription.h b/webrtc/api/ortc/mediadescription.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ac246cf8098bf461a6144542c3cca3cd06886284 |
--- /dev/null |
+++ b/webrtc/api/ortc/mediadescription.h |
@@ -0,0 +1,36 @@ |
+/* |
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_API_ORTC_MEDIADESCRIPTION_H_ |
+#define WEBRTC_API_ORTC_MEDIADESCRIPTION_H_ |
+ |
+#include <string> |
+ |
+#include "webrtc/base/optional.h" |
+ |
+namespace webrtc { |
+ |
+// 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.
|
+class MediaDescription { |
+ public: |
+ 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.
|
+ |
+ ~MediaDescription() {} |
+ |
+ 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.
|
+ 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
|
+ |
+ private: |
+ rtc::Optional<std::string> mid_; |
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_API_ORTC_MEDIADESCRIPTION_H_ |