X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftypes.h;h=8297dbcc393d8026892719905b8886bcf2a471ae;hb=990729f84f430dfa2788270474784011dc1f12e1;hp=a0965e8364790fa6129e1cf4a72588ea6116c18f;hpb=7cbd4f09eaeda373662aaddef90d2d070a564b68;p=libdcp.git diff --git a/src/types.h b/src/types.h index a0965e83..8297dbcc 100644 --- a/src/types.h +++ b/src/types.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2019 Carl Hetherington This file is part of libdcp. @@ -38,10 +38,15 @@ #ifndef LIBDCP_TYPES_H #define LIBDCP_TYPES_H +#include #include #include #include +namespace xmlpp { + class Element; +} + namespace dcp { @@ -99,7 +104,9 @@ enum ContentKind TEASER, POLICY, PUBLIC_SERVICE_ANNOUNCEMENT, - ADVERTISEMENT + ADVERTISEMENT, + EPISODE, + PROMO }; extern std::string content_kind_to_string (ContentKind kind); @@ -292,6 +299,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