/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
- * Copyright (c) 2009, 2010 Zmanda, Inc. All Rights Reserved.
+ * Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* part) */
size_t block_size;
+ /* bytes read for this image */
+ guint64 bytes_read;
+
/* part size (potentially including any zero-padding from the
* device) */
guint64 part_size;
self->paused = TRUE;
g_object_unref(self->device);
self->device = NULL;
+ self->bytes_read += self->part_size;
self->part_size = 0;
self->block_size = 0;
if (self->part_timer) {
klass = XFER_SOURCE_RECOVERY_GET_CLASS(elt);
klass->use_device(XFER_SOURCE_RECOVERY(elt), device);
}
+
+guint64
+xfer_source_recovery_get_bytes_read(
+ XferElement *elt)
+{
+ XferSourceRecovery *self = XFER_SOURCE_RECOVERY(elt);
+ guint64 bytes_read = self->bytes_read;
+
+ if (self->device)
+ bytes_read += device_get_bytes_read(self->device);
+
+ return bytes_read;
+}
+