summaryrefslogtreecommitdiffstats
path: root/includes/image_io/extras/base64_decoder_data_destination.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/image_io/extras/base64_decoder_data_destination.h')
-rw-r--r--includes/image_io/extras/base64_decoder_data_destination.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/image_io/extras/base64_decoder_data_destination.h b/includes/image_io/extras/base64_decoder_data_destination.h
index cde1dbc..107ea4b 100644
--- a/includes/image_io/extras/base64_decoder_data_destination.h
+++ b/includes/image_io/extras/base64_decoder_data_destination.h
@@ -5,6 +5,7 @@
#include <vector>
#include "image_io/base/data_destination.h"
+#include "image_io/base/message_handler.h"
namespace photos_editing_formats {
namespace image_io {
@@ -16,8 +17,11 @@ class Base64DecoderDataDestination : public DataDestination {
public:
/// @param next_destination The next DataDestination in the chain which will
/// be sent the decoded bytes received by the Transfer() function.
- explicit Base64DecoderDataDestination(DataDestination* next_destination)
+ /// @param message_handler An optional message handler to write messages to.
+ Base64DecoderDataDestination(DataDestination* next_destination,
+ MessageHandler* message_handler)
: next_destination_(next_destination),
+ message_handler_(message_handler),
next_decoded_location_(0),
has_error_(false) {}
@@ -39,6 +43,9 @@ class Base64DecoderDataDestination : public DataDestination {
/// The destination that the decoded data is sent to.
DataDestination* next_destination_;
+ /// An optional message handler to write messages to.
+ MessageHandler* message_handler_;
+
/// If the transfer_range parameter of the Transfer function does not have a
/// length that is a multiple of 4, then the leftover bytes are placed in this
/// vector and are prepended to the data in the next call to Transfer.