2 Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
4 This file is part of libdcp.
6 libdcp is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 libdcp is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with libdcp. If not, see <http://www.gnu.org/licenses/>.
19 In addition, as a special exception, the copyright holders give
20 permission to link the code of portions of this program with the
21 OpenSSL library under certain conditions as described in each
22 individual source file, and distribute linked combinations
25 You must obey the GNU General Public License in all respects
26 for all of the code used other than OpenSSL. If you modify
27 file(s) with this exception, you may extend this exception to your
28 version of the file(s), but you are not obligated to do so. If you
29 do not wish to do so, delete this exception statement from your
30 version. If you delete this exception statement from all source
31 files in the program, then also delete it here.
35 #ifndef LIBDCP_CONTENT_KIND_H
36 #define LIBDCP_CONTENT_KIND_H
39 #include <boost/optional.hpp>
50 ContentKind(std::string name, boost::optional<std::string> scope)
55 std::string name() const {
59 boost::optional<std::string> scope() const {
63 static const ContentKind FEATURE;
64 static const ContentKind SHORT;
65 static const ContentKind TRAILER;
66 static const ContentKind TEST;
67 static const ContentKind TRANSITIONAL;
68 static const ContentKind RATING;
69 static const ContentKind TEASER;
70 static const ContentKind POLICY;
71 static const ContentKind PUBLIC_SERVICE_ANNOUNCEMENT;
72 static const ContentKind ADVERTISEMENT;
73 static const ContentKind CLIP;
74 static const ContentKind PROMO;
75 static const ContentKind STEREOCARD;
76 static const ContentKind EPISODE;
77 static const ContentKind HIGHLIGHTS;
78 static const ContentKind EVENT;
80 static ContentKind from_name(std::string name);
81 static std::vector<ContentKind> all();
84 explicit ContentKind(std::string name)
89 boost::optional<std::string> _scope;
93 bool operator==(ContentKind const& a, ContentKind const& b);
94 bool operator!=(ContentKind const& a, ContentKind const& b);