/*
- * Copyright (c) 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved.
+ * Copyright (c) 2008-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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%{
#include "glib-util.h"
#include "amxfer.h"
+#include "amanda.h"
+#include "sockaddr-util.h"
%}
/* The SWIGging of the transfer architecture.
void xfer_unref(Xfer *);
xfer_status xfer_get_status(Xfer *xfer);
char *xfer_repr(Xfer *xfer);
-void xfer_start(Xfer *xfer);
+void xfer_start(Xfer *xfer, gint64 offset, gint64 size);
void xfer_cancel(Xfer *xfer);
/* xfer_get_source is implemented below */
* passed to the GSource's set_callback */
%perlcode %{
sub xfer_start_with_callback {
- my ($xfer, $cb) = @_;
+ my ($xfer, $cb, $offset, $size) = @_;
if (defined $cb) {
my $releasing_cb = sub {
my ($src, $msg, $xfer) = @_;
};
$xfer->get_source()->set_callback($releasing_cb);
}
- xfer_start($xfer);
+ $offset = 0 if !defined $offset;
+ $size = 0 if !defined $size;
+ xfer_start($xfer, $offset, $size);
}
%}
void xfer_element_unref(XferElement *elt); /* (wrap the macro, above) */
/* xfer_element_link_to -- private */
char *xfer_element_repr(XferElement *elt);
+/* xfer_element_set_size -- private */
/* xfer_element_start -- private */
/* xfer_element_cancel -- private */
%newobject xfer_filter_process;
XferElement *xfer_filter_process(
gchar **argv,
- gboolean need_root,
- gboolean log_stderr);
+ gboolean need_root);
+int get_err_fd(
+ XferElement *elt);
%newobject xfer_dest_null;
XferElement *xfer_dest_null(
PACKAGE(Amanda::Xfer::Filter::Process)
XFER_ELEMENT_SUBCLASS()
DECLARE_CONSTRUCTOR(Amanda::Xfer::xfer_filter_process)
+DECLARE_METHOD(get_stderr_fd, Amanda::Xfer::get_err_fd)
/* ---- */