X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content_type.h;h=960bb012948cf8c8b8be310b5ee13622a7cd934d;hb=0d3f5aae5b99832b7c5d55f32f5bccb365caa3fd;hp=aba3054490ad89aaf1ebc9e27a82c9bf5fcdab3c;hpb=c7c8c894df8c2bb98aeed84011dd28da94afa392;p=dcpomatic.git diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index aba305449..960bb0129 100644 --- a/src/lib/dcp_content_type.h +++ b/src/lib/dcp_content_type.h @@ -17,12 +17,16 @@ */ +#ifndef DVDOMATIC_DCP_CONTENT_TYPE_H +#define DVDOMATIC_DCP_CONTENT_TYPE_H + /** @file src/content_type.h * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.) */ #include #include +#include /** @class DCPContentType * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.) @@ -30,19 +34,23 @@ class DCPContentType { public: - DCPContentType (std::string, std::string); + DCPContentType (std::string, libdcp::ContentKind, std::string); /** @return user-visible `pretty' name */ std::string pretty_name () const { return _pretty_name; } - /** @return name as written to a DCP */ - std::string dcp_name () const { - return _dcp_name; + libdcp::ContentKind libdcp_kind () const { + return _libdcp_kind; + } + + std::string dci_name () const { + return _dci_name; } static DCPContentType const * from_pretty_name (std::string); + static DCPContentType const * from_dci_name (std::string); static DCPContentType const * from_index (int); static int as_index (DCPContentType const *); static std::vector all (); @@ -50,9 +58,11 @@ public: private: std::string _pretty_name; - std::string _dcp_name; + libdcp::ContentKind _libdcp_kind; + std::string _dci_name; /** All available DCP content types */ static std::vector _dcp_content_types; }; +#endif