summaryrefslogtreecommitdiff
path: root/includes/image_io/jpeg/jpeg_xmp_data_extractor.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/image_io/jpeg/jpeg_xmp_data_extractor.h')
-rw-r--r--includes/image_io/jpeg/jpeg_xmp_data_extractor.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/image_io/jpeg/jpeg_xmp_data_extractor.h b/includes/image_io/jpeg/jpeg_xmp_data_extractor.h
index 30d62a1..29b16b6 100644
--- a/includes/image_io/jpeg/jpeg_xmp_data_extractor.h
+++ b/includes/image_io/jpeg/jpeg_xmp_data_extractor.h
@@ -2,6 +2,7 @@
#define IMAGE_IO_JPEG_JPEG_XMP_DATA_EXTRACTOR_H_ // NOLINT
#include "image_io/base/data_destination.h"
+#include "image_io/base/message_handler.h"
#include "image_io/jpeg/jpeg_info.h"
namespace photos_editing_formats {
@@ -17,10 +18,13 @@ class JpegXmpDataExtractor : public DataDestination {
/// @param data_destination The destination to which the extracted xmp data
/// is to be sent.
JpegXmpDataExtractor(JpegXmpInfo::Type xmp_info_type, size_t segment_count,
- DataDestination* data_destination)
+ DataDestination* data_destination,
+ MessageHandler* message_handler)
: xmp_info_type_(xmp_info_type),
last_segment_index_(segment_count - 1),
data_destination_(data_destination),
+ message_handler_(message_handler),
+ segment_index_(0),
has_error_(false) {}
/// Set the current segment index to the given value.
@@ -52,6 +56,9 @@ class JpegXmpDataExtractor : public DataDestination {
/// The DataDestination that the extracted xmp data is sent to.
DataDestination* data_destination_;
+ /// An optional message handler to write messages to.
+ MessageHandler* message_handler_;
+
/// The xmp data is spread over one or more segments in the DataSource. This
/// index tracks which one is being transferred.
size_t segment_index_;