projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Properly support ContentKind scope attribute.
[libdcp.git]
/
src
/
content_kind.h
diff --git
a/src/content_kind.h
b/src/content_kind.h
index 08aa17b49936aedfcc556ef1bea6fb2a46381737..39872feab2a33c88b060c110e3589b575bdca747 100644
(file)
--- a/
src/content_kind.h
+++ b/
src/content_kind.h
@@
-47,10
+47,19
@@
namespace dcp {
class ContentKind
{
public:
class ContentKind
{
public:
+ ContentKind(std::string name, boost::optional<std::string> scope)
+ : _name(name)
+ , _scope(scope)
+ {}
+
std::string name() const {
return _name;
}
std::string name() const {
return _name;
}
+ boost::optional<std::string> scope() const {
+ return _scope;
+ }
+
static const ContentKind FEATURE;
static const ContentKind SHORT;
static const ContentKind TRAILER;
static const ContentKind FEATURE;
static const ContentKind SHORT;
static const ContentKind TRAILER;
@@
-61,8
+70,12
@@
public:
static const ContentKind POLICY;
static const ContentKind PUBLIC_SERVICE_ANNOUNCEMENT;
static const ContentKind ADVERTISEMENT;
static const ContentKind POLICY;
static const ContentKind PUBLIC_SERVICE_ANNOUNCEMENT;
static const ContentKind ADVERTISEMENT;
- static const ContentKind
EPISODE
;
+ static const ContentKind
CLIP
;
static const ContentKind PROMO;
static const ContentKind PROMO;
+ static const ContentKind STEREOCARD;
+ static const ContentKind EPISODE;
+ static const ContentKind HIGHLIGHTS;
+ static const ContentKind EVENT;
static ContentKind from_name(std::string name);
static std::vector<ContentKind> all();
static ContentKind from_name(std::string name);
static std::vector<ContentKind> all();
@@
-73,6
+86,7
@@
private:
{}
std::string _name;
{}
std::string _name;
+ boost::optional<std::string> _scope;
};
};