2 * Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
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
22 %module "Amanda::XferServer"
23 %include "amglue/amglue.swg"
24 %include "exception.i"
25 %import "Amanda/Xfer.swg"
26 %import "Amanda/Device.swg"
27 %import "Amanda/Header.swg"
29 %include "Amanda/XferServer.pod"
32 #include "glib-util.h"
34 #include "xfer-device.h"
35 #include "xfer-server.h"
38 %newobject xfer_source_device;
39 XferElement *xfer_source_device(
42 %newobject xfer_dest_device;
43 XferElement *xfer_dest_device(
45 gboolean cancel_at_leom);
47 %newobject xfer_source_holding;
48 XferElement * xfer_source_holding(
49 const char *filename);
51 guint64 xfer_source_holding_get_bytes_read(
54 %newobject xfer_dest_taper_splitter;
55 XferElement *xfer_dest_taper_splitter(
59 gboolean expect_cache_inform);
61 %newobject xfer_dest_taper_cacher;
62 XferElement *xfer_dest_taper_cacher(
66 gboolean use_mem_cache,
67 const char *disk_cache_dirname);
69 %newobject xfer_dest_taper_directtcp;
70 XferElement *xfer_dest_taper_directtcp(
74 void xfer_dest_taper_start_part(
79 void xfer_dest_taper_use_device(
83 void xfer_dest_taper_cache_inform(
89 guint64 xfer_dest_taper_get_part_bytes_written(
92 %newobject xfer_source_recovery;
93 XferElement *xfer_source_recovery(Device *first_device);
95 void xfer_source_recovery_start_part(
99 void xfer_source_recovery_use_device(
103 guint64 xfer_source_recovery_get_bytes_read(
109 PACKAGE(Amanda::Xfer::Source::Device)
110 XFER_ELEMENT_SUBCLASS()
111 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_source_device)
115 PACKAGE(Amanda::Xfer::Dest::Device)
116 XFER_ELEMENT_SUBCLASS()
117 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_dest_device)
121 PACKAGE(Amanda::Xfer::Source::Holding)
122 XFER_ELEMENT_SUBCLASS()
123 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_source_holding)
124 DECLARE_METHOD(get_bytes_read, Amanda::XferServer::xfer_source_holding_get_bytes_read)
128 PACKAGE(Amanda::Xfer::Dest::Taper)
129 XFER_ELEMENT_SUBCLASS()
130 DECLARE_METHOD(use_device, Amanda::XferServer::xfer_dest_taper_use_device)
131 DECLARE_METHOD(start_part, Amanda::XferServer::xfer_dest_taper_start_part)
132 DECLARE_METHOD(cache_inform, Amanda::XferServer::xfer_dest_taper_cache_inform)
133 DECLARE_METHOD(get_part_bytes_written, Amanda::XferServer::xfer_dest_taper_get_part_bytes_written)
137 PACKAGE(Amanda::Xfer::Dest::Taper::Splitter)
138 XFER_ELEMENT_SUBCLASS_OF(Amanda::Xfer::Dest::Taper)
139 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_dest_taper_splitter)
143 PACKAGE(Amanda::Xfer::Dest::Taper::Cacher)
144 XFER_ELEMENT_SUBCLASS_OF(Amanda::Xfer::Dest::Taper)
145 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_dest_taper_cacher)
149 PACKAGE(Amanda::Xfer::Dest::Taper::DirectTCP)
150 XFER_ELEMENT_SUBCLASS_OF(Amanda::Xfer::Dest::Taper)
151 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_dest_taper_directtcp)
155 PACKAGE(Amanda::Xfer::Source::Recovery)
156 XFER_ELEMENT_SUBCLASS()
157 DECLARE_CONSTRUCTOR(Amanda::XferServer::xfer_source_recovery)
158 DECLARE_METHOD(start_part, Amanda::XferServer::xfer_source_recovery_start_part)
159 DECLARE_METHOD(use_device, Amanda::XferServer::xfer_source_recovery_use_device)
160 DECLARE_METHOD(get_bytes_read, Amanda::XferServer::xfer_source_recovery_get_bytes_read)