Tidy up; more/better use of BOOST_FOREACH.
[libdcp.git] / src / mxf.h
index b5200b08ed3eb615287f0bd657ffef05df721d46..f8be98446f4516ba8d1166bca5be7a965a65c94b 100644 (file)
--- a/src/mxf.h
+++ b/src/mxf.h
@@ -27,7 +27,6 @@
 #include <boost/signals2.hpp>
 
 namespace ASDCP {
-       class AESEncContext;
        class AESDecContext;
        class WriterInfo;
 }
@@ -40,27 +39,20 @@ namespace dcp
 {
 
 class MXFMetadata;
-class PictureMXFWriter;        
+class PictureAssetWriter;
 
 /** @class MXF
- *  @brief Parent class for classes which represent MXF files.
+ *  @brief Parent for classes which represent MXF files.
  */
-class MXF : public Asset
+class MXF
 {
 public:
        MXF ();
-       MXF (boost::filesystem::path file);
-       ~MXF ();
-
-       bool equals (
-               boost::shared_ptr<const Asset> other,
-               EqualityOptions opt,
-               NoteHandler note
-               ) const;
+       virtual ~MXF ();
 
        /** @return true if the data is encrypted */
        bool encrypted () const {
-               return _key_id;
+               return static_cast<bool>(_key_id);
        }
 
        /** Set the ID of the key that is used for encryption/decryption.
@@ -93,17 +85,17 @@ public:
        MXFMetadata metadata () const {
                return _metadata;
        }
-       
+
 protected:
        template <class P, class Q>
-       friend void start (PictureMXFWriter* writer, boost::shared_ptr<P> state, Standard standard, Q* mxf, uint8_t* data, int size);
+       friend void start (PictureAssetWriter* writer, boost::shared_ptr<P> state, Standard standard, Q* mxf, uint8_t* data, int size);
 
        std::string read_writer_info (ASDCP::WriterInfo const &);
        /** Fill in a ADSCP::WriteInfo struct.
         *  @param w struct to fill in.
         *  @param standard INTEROP or SMPTE.
         */
-       void fill_writer_info (ASDCP::WriterInfo* w, Standard standard);
+       void fill_writer_info (ASDCP::WriterInfo* w, std::string id, Standard standard) const;
 
        ASDCP::AESDecContext* _decryption_context;
        /** ID of the key used for encryption/decryption, if there is one */