Updated de_DE translation from Carsten Kurz.
[dcpomatic.git] / src / lib / content.h
index b91b5778c8be7f855fbb25f3db9d24ed13550968..d87ae13d7fee53739f8a5d8ecb1173d177654929 100644 (file)
@@ -27,6 +27,7 @@
 #include "types.h"
 #include "signaller.h"
 #include "dcpomatic_time.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
 #include <boost/filesystem.hpp>
 #include <boost/signals2.hpp>
@@ -86,8 +87,10 @@ public:
        virtual void as_xml (xmlpp::Node *) const;
        virtual DCPTime full_length () const = 0;
        virtual std::string identifier () const;
-
-       std::list<std::pair<std::string, std::string> > properties () const;
+       /** @return points at which to split this content when
+        *  REELTYPE_BY_VIDEO_CONTENT is in use.
+        */
+       virtual std::list<DCPTime> reel_split_points () const;
 
        boost::shared_ptr<Content> clone () const;
 
@@ -112,10 +115,10 @@ public:
 
        bool paths_valid () const;
 
-       /** @return Digest of the content's file(s).  Note: this is
-        *  not a complete MD5-or-whatever hash, but a sort of poor
-        *  man's version (see comments in ::examine).
-        */
+       /** @return Digest of the content's file(s).  Note: this is
+        *  not a complete MD5-or-whatever hash, but a sort of poor
+        *  man's version (see comments in ::examine).
+        */
        std::string digest () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _digest;
@@ -158,11 +161,31 @@ public:
 
        boost::shared_ptr<const Film> film () const;
 
+       class UserProperty
+       {
+       public:
+               template <class T>
+               UserProperty (std::string category_, std::string key_, T value_, std::string unit_ = "")
+                       : category (category_)
+                       , key (key_)
+                       , value (raw_convert<std::string> (value_))
+                       , unit (unit_)
+               {}
+
+               std::string category;
+               std::string key;
+               std::string value;
+               std::string unit;
+       };
+
+       std::list<UserProperty> user_properties () const;
+
        boost::signals2::signal<void (boost::weak_ptr<Content>, int, bool)> Changed;
 
 protected:
        void signal_changed (int);
-       virtual void add_properties (std::list<std::pair<std::string, std::string> > &) const {}
+
+       virtual void add_properties (std::list<UserProperty> &) const {}
 
        boost::weak_ptr<const Film> _film;