From 3bae1fb76f8d4751ee62717e3f18cee47d1deb90 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 19 Mar 2019 19:47:07 +0000 Subject: Support RatingList. --- src/types.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index a0965e83..7f315e08 100644 --- a/src/types.h +++ b/src/types.h @@ -38,10 +38,15 @@ #ifndef LIBDCP_TYPES_H #define LIBDCP_TYPES_H +#include #include #include #include +namespace xmlpp { + class Element; +} + namespace dcp { @@ -292,6 +297,27 @@ enum Marker { std::string marker_to_string (Marker); Marker marker_from_string (std::string); +class Rating +{ +public: + Rating (std::string agency_, std::string label_) + : agency (agency_) + , label (label_) + {} + + explicit Rating (cxml::ConstNodePtr node); + + void as_xml (xmlpp::Element* parent) const; + + /** URI of the agency issuing the rating */ + std::string agency; + /** Rating (e.g. PG, PG-13, 12A etc) */ + std::string label; +}; + +extern bool operator== (Rating const & a, Rating const & b); +extern std::ostream& operator<< (std::ostream& s, Rating const & r); + } #endif -- cgit v1.2.3