librsync  2.3.4
emit.h
Go to the documentation of this file.
1 /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*-
2  *
3  * librsync -- dynamic caching and delta update in HTTP
4  *
5  * Copyright (C) 2000, 2001 by Martin Pool <mbp@sourcefrog.net>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 
22 /** \file emit.h
23  * encoding output routines.
24  *
25  * \todo Pluggable encoding formats: gdiff-style, rsync 24, ed (text), Delta
26  * HTTP. */
27 #ifndef EMIT_H
28 # define EMIT_H
29 
30 # include "librsync.h"
31 
32 /** Write the magic for the start of a delta. */
34 
35 /** Write a LITERAL command. */
36 void rs_emit_literal_cmd(rs_job_t *, int len);
37 
38 /** Write a COPY command for given offset and length.
39  *
40  * There is a choice of variable-length encodings, depending on the size of
41  * representation for the parameters. */
42 void rs_emit_copy_cmd(rs_job_t *job, rs_long_t where, rs_long_t len);
43 
44 /** Write an END command. */
46 
47 #endif /* !EMIT_H */
void rs_emit_delta_header(rs_job_t *)
Write the magic for the start of a delta.
Definition: emit.c:31
void rs_emit_copy_cmd(rs_job_t *job, rs_long_t where, rs_long_t len)
Write a COPY command for given offset and length.
Definition: emit.c:66
void rs_emit_end_cmd(rs_job_t *)
Write an END command.
Definition: emit.c:105
void rs_emit_literal_cmd(rs_job_t *, int len)
Write a LITERAL command.
Definition: emit.c:37
Public header for librsync.
The contents of this structure are private.
Definition: job.h:47