2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef DCPOMATIC_DCP_CONTENT_TYPE_H
21 #define DCPOMATIC_DCP_CONTENT_TYPE_H
23 /** @file src/content_type.h
24 * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.)
31 /** @class DCPContentType
32 * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.)
34 class DCPContentType : public boost::noncopyable
37 DCPContentType (std::string, dcp::ContentKind, std::string);
39 /** @return user-visible `pretty' name */
40 std::string pretty_name () const {
44 dcp::ContentKind libdcp_kind () const {
48 std::string isdcf_name () const {
52 static DCPContentType const * from_pretty_name (std::string);
53 static DCPContentType const * from_isdcf_name (std::string);
54 static DCPContentType const * from_index (int);
55 static int as_index (DCPContentType const *);
56 static std::vector<DCPContentType const *> all ();
57 static void setup_dcp_content_types ();
60 std::string _pretty_name;
61 dcp::ContentKind _libdcp_kind;
62 std::string _isdcf_name;
64 /** All available DCP content types */
65 static std::vector<DCPContentType const *> _dcp_content_types;