Cleanup: pass EqualityOptions as const&
[libdcp.git] / src / asset.h
index 923720ff144673918ff92e6173ff2bbdda80e8a6..b88b1167d3c110f1087424805d972d2225667164 100644 (file)
@@ -88,7 +88,7 @@ public:
 
        virtual bool equals (
                std::shared_ptr<const Asset> other,
-               EqualityOptions opt,
+               EqualityOptions const& opt,
                NoteHandler note
                ) const;
 
@@ -109,6 +109,15 @@ public:
         */
        void set_file (boost::filesystem::path file) const;
 
+       /** Set the file that holds this asset on disk.  Calling this function
+        *  preserves the object's store of its hash, so if the object already
+        *  has a hash it is up to the caller to ensure that the new file has
+        *  the same hash.
+        *
+        *  @param file New file's path.
+        */
+       void set_file_preserving_hash(boost::filesystem::path file) const;
+
        /** Set the file that holds this asset on disk.  The new file must
         *  be exactly the same as the old one, as this function assumes
         *  that the object's hash does not change.
@@ -126,6 +135,7 @@ public:
        std::string hash (boost::function<void (float)> progress = {}) const;
 
        void set_hash (std::string hash);
+       void unset_hash();
 
 protected: