X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content_type.h;h=f08db883a867ba17ff2772e389ce7761389200d7;hb=HEAD;hp=2685e6edfd20b8857060ef1735fae36c74160754;hpb=0a3de908ae0f62dd8d7d5aaaa96e2ddab891b5a8;p=dcpomatic.git diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index 2685e6edf..f08db883a 100644 --- a/src/lib/dcp_content_type.h +++ b/src/lib/dcp_content_type.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,21 +18,26 @@ */ + #ifndef DCPOMATIC_DCP_CONTENT_TYPE_H #define DCPOMATIC_DCP_CONTENT_TYPE_H + /** @file src/dcp_content_type.h * @brief DCPContentType class. */ + +#include #include #include #include + /** @class DCPContentType * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.) */ -class DCPContentType : public boost::noncopyable +class DCPContentType { public: DCPContentType (std::string, dcp::ContentKind, std::string); @@ -51,8 +56,9 @@ public: } static DCPContentType const * from_isdcf_name (std::string); + static DCPContentType const * from_libdcp_kind (dcp::ContentKind); static DCPContentType const * from_index (int); - static int as_index (DCPContentType const *); + static boost::optional as_index (DCPContentType const *); static std::vector all (); static void setup_dcp_content_types (); @@ -62,7 +68,8 @@ private: std::string _isdcf_name; /** All available DCP content types */ - static std::vector _dcp_content_types; + static std::vector _dcp_content_types; }; + #endif