Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

job.h

Go to the documentation of this file.
00001 /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*-
00002  *
00003  * librsync -- the library for network deltas
00004  * $Id: job.h,v 1.1.1.1 2002/01/25 22:15:09 kergoth Exp $
00005  * 
00006  * Copyright (C) 2000, 2001 by Martin Pool <mbp@samba.org>
00007  * 
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  * 
00013  * This program is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021  */
00022 
00023 
00024 struct rs_job {
00025     int                 dogtag;
00026 
00028     const char          *job_name;
00029     
00030     rs_buffers_t *stream;
00031 
00033     rs_result           (*statefn)(rs_job_t *);
00034 
00036     rs_result final_result;
00037 
00038     /* XXX: These next two are redundant with their equivalents in the
00039      * signature field.  Perhaps we should get rid of them, but
00040      * they're also used in the mksum operation. */
00041     int                 block_len;
00042     int                 strong_sum_len;
00043 
00046     rs_signature_t      *signature;
00047     
00049     unsigned char       op;
00050 
00053     rs_weak_sum_t       weak_sig;
00054 
00057     int                 have_weak_sig;
00058 
00060     rs_long_t           param1, param2;
00061     
00062     struct rs_prototab_ent const *cmd;
00063     rs_mdfour_t      output_md4;
00064 
00066     rs_stats_t          stats;
00067 
00071     char       *scoop_buf;
00072     char       *scoop_next;
00073     size_t      scoop_alloc;
00074     size_t      scoop_avail;
00075         
00078     char        write_buf[16];
00079     int         write_len;
00080 
00083     rs_long_t   copy_len;
00084 
00086     rs_long_t       basis_pos, basis_len;
00087 
00089     rs_copy_cb      *copy_cb;
00090     void            *copy_arg;
00091 };
00092 
00093 
00094 rs_job_t * rs_job_new(const char *, rs_result (*statefn)(rs_job_t *));
00095 
00096 void rs_job_check(rs_job_t *job);
00097 const rs_stats_t *rs_job_statistics(rs_job_t *);
00098 
00099 int rs_job_input_is_ending(rs_job_t *job);

Generated on Sat Nov 5 16:18:35 2005 for OPIE by  doxygen 1.4.2