Merge branch '1.0' of ssh://main.carlh.net/home/carl/git/libdcp into 1.0
[libdcp.git] / src / asset.h
index 12fe265749c9f8859f06e6bbd872db1ee67a2599..c7911497b48c70bb40f9f938b982d57af9154091 100644 (file)
@@ -34,6 +34,8 @@ namespace xmlpp {
        class Node;
 }
 
+struct asset_test;
+
 namespace dcp {
 
 /** @class Asset
@@ -47,6 +49,7 @@ class Asset : public Object
 public:
        Asset ();
        Asset (boost::filesystem::path file);
+       Asset (std::string id, boost::filesystem::path file);
 
        virtual bool equals (
                boost::shared_ptr<const Asset> other,
@@ -63,7 +66,7 @@ public:
         *  @param node Parent node.
         *  @param standard Standard to use.
         */
-       void write_to_pkl (xmlpp::Node* node, Standard standard) const;
+       void write_to_pkl (xmlpp::Node* node, boost::filesystem::path root, Standard standard) const;
 
        /** @return the most recent disk file used to read or write this asset; may be empty */
        boost::filesystem::path file () const {
@@ -76,6 +79,8 @@ public:
        std::string hash (boost::function<void (float)> progress = 0) const;
 
 protected:
+       friend struct ::asset_test;
+
        virtual std::string pkl_type (Standard standard) const = 0;
 
        /** The most recent disk file used to read or write this asset; may be empty */