librsync  2.0.1
command.h
1 /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*-
2  *
3  * librsync -- library for network deltas
4  *
5  * Copyright (C) 1999, 2000, 2001 by Martin Pool <[email protected]>
6  * Copyright (C) 1999 by Andrew Tridgell <[email protected]>
7  *
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.
12  *
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.
17  *
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.
21  */
22 
23 
24 /*
25  * command.h -- Types of commands present in the encoding stream.
26  *
27  * The vague idea is that eventually this file will be more abstract
28  * than protocol.h, but it's not clear that will ever be required.
29  */
30 
31 
32 /**
33  * Classes of operation that can be present. Each may have several different
34  * possible representations.
35  */
36 enum rs_op_kind {
37  RS_KIND_END = 1000,
38  RS_KIND_LITERAL,
39  RS_KIND_SIGNATURE,
40  RS_KIND_COPY,
41  RS_KIND_CHECKSUM,
42  RS_KIND_RESERVED, /* for future expansion */
43 
44  /* This one should never occur in file streams. It's an
45  * internal marker for invalid commands. */
46  RS_KIND_INVALID
47 };
48 
49 
50 typedef struct rs_op_kind_name {
51  char const *name;
52  enum rs_op_kind const kind;
54 
55 char const * rs_op_kind_name(enum rs_op_kind);
56 
57