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

Unified Diff: webrtc/p2p/base/sessiondescription.h

Issue 2562183002: Implement parsing/serialization of a=bundle-only. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/sessiondescription.h
diff --git a/webrtc/p2p/base/sessiondescription.h b/webrtc/p2p/base/sessiondescription.h
index 788016756948c1f298a17cbb87d7fb5d39cd7b3e..a20f7b71321a9b0cfd395bcd55c701775879a200 100644
--- a/webrtc/p2p/base/sessiondescription.h
+++ b/webrtc/p2p/base/sessiondescription.h
@@ -32,20 +32,31 @@ class ContentDescription {
// name = name of <content name="...">
// type = xmlns of <content>
struct ContentInfo {
- ContentInfo() : description(NULL) {}
+ ContentInfo() {}
ContentInfo(const std::string& name,
const std::string& type,
- ContentDescription* description) :
- name(name), type(type), rejected(false), description(description) {}
+ ContentDescription* description)
+ : name(name), type(type), description(description) {}
ContentInfo(const std::string& name,
const std::string& type,
bool rejected,
ContentDescription* description) :
name(name), type(type), rejected(rejected), description(description) {}
+ ContentInfo(const std::string& name,
+ const std::string& type,
+ bool rejected,
+ bool bundle_only,
+ ContentDescription* description)
+ : name(name),
+ type(type),
+ rejected(rejected),
+ bundle_only(bundle_only),
+ description(description) {}
std::string name;
std::string type;
- bool rejected;
- ContentDescription* description;
+ bool rejected = false;
+ bool bundle_only = false;
+ ContentDescription* description = nullptr;
};
typedef std::vector<std::string> ContentNames;
@@ -127,6 +138,11 @@ class SessionDescription {
const std::string& type,
bool rejected,
ContentDescription* description);
+ void AddContent(const std::string& name,
+ const std::string& type,
+ bool rejected,
+ bool bundle_only,
+ ContentDescription* description);
bool RemoveContentByName(const std::string& name);
// Transport accessors.

Powered by Google App Engine
This is Rietveld 408576698