2 * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3 * Copyright (c) 2009 Zmanda, Inc. All Rights Reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published
7 * by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300
19 * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
23 #include "xfer-device.h"
27 XferDestTaperClass * selfc)
29 XferElementClass *klass = XFER_ELEMENT_CLASS(selfc);
31 klass->perl_class = "Amanda::Xfer::Dest::Taper";
35 xfer_dest_taper_get_type (void)
37 static GType type = 0;
39 if G_UNLIKELY(type == 0) {
40 static const GTypeInfo info = {
41 sizeof (XferDestTaperClass),
43 (GBaseFinalizeFunc) NULL,
44 (GClassInitFunc) class_init,
45 (GClassFinalizeFunc) NULL,
46 NULL /* class_data */,
47 sizeof (XferDestTaper),
49 (GInstanceInitFunc) NULL,
53 type = g_type_register_static (XFER_ELEMENT_TYPE, "XferDestTaper", &info, 0);
64 xfer_dest_taper_start_part(
69 XferDestTaperClass *klass;
70 g_assert(IS_XFER_DEST_TAPER(elt));
72 klass = XFER_DEST_TAPER_GET_CLASS(elt);
73 klass->start_part(XFER_DEST_TAPER(elt), retry_part, header);
77 xfer_dest_taper_use_device(
81 XferDestTaperClass *klass;
82 g_assert(IS_XFER_DEST_TAPER(elt));
84 klass = XFER_DEST_TAPER_GET_CLASS(elt);
85 klass->use_device(XFER_DEST_TAPER(elt), device);
89 xfer_dest_taper_cache_inform(
95 XferDestTaperClass *klass;
96 g_assert(IS_XFER_DEST_TAPER(elt));
98 klass = XFER_DEST_TAPER_GET_CLASS(elt);
99 klass->cache_inform(XFER_DEST_TAPER(elt), filename, offset, length);
103 xfer_dest_taper_get_part_bytes_written(
104 XferElement *elt G_GNUC_UNUSED)
106 XferDestTaperClass *klass;
107 g_assert(IS_XFER_DEST_TAPER(elt));
109 klass = XFER_DEST_TAPER_GET_CLASS(elt);
110 if (klass->get_part_bytes_written)
111 return klass->get_part_bytes_written(XFER_DEST_TAPER(elt));