From 5cb09148a9d3456727459b7d41b8c36b0ca277b9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 5 Feb 2014 13:39:10 +0000 Subject: Comment / tidy. --- src/dcp.h | 5 ----- src/mxf.cc | 2 -- src/mxf.h | 22 +++++++++++++++------- 3 files changed, 15 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/dcp.h b/src/dcp.h index 9d8a5415..d6275037 100644 --- a/src/dcp.h +++ b/src/dcp.h @@ -97,11 +97,6 @@ public: boost::shared_ptr signer = boost::shared_ptr () ); - /** Emitted with a parameter between 0 and 1 to indicate progress - * for long jobs. - */ - boost::signals2::signal Progress; - private: /** Write the PKL file. diff --git a/src/mxf.cc b/src/mxf.cc index 200bc843..3c75997b 100644 --- a/src/mxf.cc +++ b/src/mxf.cc @@ -43,7 +43,6 @@ using namespace dcp; MXF::MXF (Fraction edit_rate) : Content (edit_rate) - , _progress (0) , _encryption_context (0) , _decryption_context (0) { @@ -52,7 +51,6 @@ MXF::MXF (Fraction edit_rate) MXF::MXF (boost::filesystem::path file) : Content (file) - , _progress (0) , _encryption_context (0) , _decryption_context (0) { diff --git a/src/mxf.h b/src/mxf.h index 66fb536f..525ac701 100644 --- a/src/mxf.h +++ b/src/mxf.h @@ -45,6 +45,7 @@ public: MXF (boost::filesystem::path file); ~MXF (); + /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */ virtual std::string key_type () const = 0; bool equals ( @@ -59,36 +60,43 @@ public: */ void fill_writer_info (ASDCP::WriterInfo* w, Standard standard); - void set_progress (boost::signals2::signal* progress) { - _progress = progress; - } - + /** @return true if the data is encrypted */ bool encrypted () const { return !_key_id.empty (); } + /** Set the ID of the key that is used for encryption/decryption. + * @param i key ID. + */ void set_key_id (std::string i) { _key_id = i; } + /** @return the ID of the key used for encryption/decryption, or an empty string */ std::string key_id () const { return _key_id; } - + void set_key (Key); + /** @return encryption/decryption key, if one has been set */ boost::optional key () const { return _key; } + /** @return encryption context, set up with any key that has been passed to set_key() */ ASDCP::AESEncContext* encryption_context () const { return _encryption_context; } + /** Set the metadata that is written to the MXF file. + * @param m Metadata. + */ void set_metadata (MXFMetadata m) { _metadata = m; } + /** @return metadata from the MXF file */ MXFMetadata metadata () const { return _metadata; } @@ -100,11 +108,11 @@ protected: void read_writer_info (ASDCP::WriterInfo const &); - /** Signal to emit to report progress, or 0 */ - boost::signals2::signal* _progress; ASDCP::AESEncContext* _encryption_context; ASDCP::AESDecContext* _decryption_context; + /** ID of the key used for encryption/decryption, or an empty string */ std::string _key_id; + /** Key used for encryption/decryption, if there is one */ boost::optional _key; MXFMetadata _metadata; }; -- cgit v1.2.3