]>
cygwin.com Git - cygwin-apps/setup.git/blob - rsync/job.h
1 /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*-
3 * librsync -- the library for network deltas
6 * Copyright (C) 2000, 2001 by Martin Pool <mbp@samba.org>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 /** Human-readable job operation name. */
32 /** Callback for each processing step. */
33 rs_result (*statefn
)(rs_job_t
*);
35 /** Final result of processing job. Used by rs_job_s_failed(). */
36 rs_result final_result
;
38 /* XXX: These next two are redundant with their equivalents in the
39 * signature field. Perhaps we should get rid of them, but
40 * they're also used in the mksum operation. */
44 /** Signature that's either being read in, or used for
45 * generating a delta. */
46 rs_signature_t
*signature
;
48 /** Command byte currently being processed, if any. */
51 /** If in the middle of reading a signature (rs_loadsig_s_weak()),
52 * or generating a delta, this contains the weak signature. */
53 rs_weak_sum_t weak_sig
;
55 /** If generating a delta, this is true if we have a valid weak signature and
56 * can roll it forward. */
59 /** Lengths of expected parameters. */
60 rs_long_t param1
, param2
;
62 struct rs_prototab_ent
const *cmd
;
63 rs_mdfour_t output_md4
;
65 /** Encoding statistics. */
68 /** Buffer of data left over in the scoop. Allocation is
69 * scoop_buf..scoop_alloc, and scoop_next[0..scoop_avail]
70 * contains valid data. */
76 /** If USED is >0, then buf contains that much write data to
81 /** If \p copy_len is >0, then that much data should be copied
82 * through from the input. */
85 /** Copy from the basis position. */
86 rs_long_t basis_pos
, basis_len
;
88 /** Callback used to copy data from the basis into the output. */
94 rs_job_t
* rs_job_new(const char *, rs_result (*statefn
)(rs_job_t
*));
96 void rs_job_check(rs_job_t
*job
);
97 const rs_stats_t
*rs_job_statistics(rs_job_t
*);
99 int rs_job_input_is_ending(rs_job_t
*job
);
This page took 0.039436 seconds and 5 git commands to generate.