aboutsummaryrefslogtreecommitdiff
path: root/cast
diff options
context:
space:
mode:
Diffstat (limited to 'cast')
-rw-r--r--cast/streaming/offer_messages.cc5
-rw-r--r--cast/streaming/offer_messages.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/cast/streaming/offer_messages.cc b/cast/streaming/offer_messages.cc
index f438d9be..ad88e82e 100644
--- a/cast/streaming/offer_messages.cc
+++ b/cast/streaming/offer_messages.cc
@@ -315,6 +315,11 @@ bool VideoStream::IsValid() const {
}
// static
+Error Offer::Parse(const Json::Value& root, Offer* out) {
+ return TryParse(root, out);
+}
+
+// static
Error Offer::TryParse(const Json::Value& root, Offer* out) {
if (!root.isObject()) {
return Error(Error::Code::kJsonParseError, "null offer");
diff --git a/cast/streaming/offer_messages.h b/cast/streaming/offer_messages.h
index 80458954..30704112 100644
--- a/cast/streaming/offer_messages.h
+++ b/cast/streaming/offer_messages.h
@@ -100,6 +100,8 @@ struct VideoStream {
enum class CastMode : uint8_t { kMirroring, kRemoting };
struct Offer {
+ // TODO(jophba): remove deprecated declaration in a separate patch.
+ static Error Parse(const Json::Value& root, Offer* out);
static Error TryParse(const Json::Value& root, Offer* out);
Json::Value ToJson() const;
bool IsValid() const;