librsync  2.3.2
command.h
Go to the documentation of this file.
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 <mbp@sourcefrog.net>
6  * Copyright (C) 1999 by Andrew Tridgell <tridge@samba.org>
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 /** \file command.h
24  * Types of commands present in the encoding stream.
25  *
26  * The vague idea is that eventually this file will be more abstract than
27  * protocol.h, but it's not clear that will ever be required. */
28 
29 /** Classes of operation that can be present. Each may have several different
30  * possible representations. */
31 enum rs_op_kind {
32  RS_KIND_END = 1000,
33  RS_KIND_LITERAL,
34  RS_KIND_SIGNATURE,
35  RS_KIND_COPY,
36  RS_KIND_CHECKSUM,
37  RS_KIND_RESERVED, /* for future expansion */
38 
39  /* This one should never occur in file streams. It's an internal marker for
40  invalid commands. */
41  RS_KIND_INVALID
42 };
43 
44 typedef struct rs_op_kind_name {
45  char const *name;
46  enum rs_op_kind const kind;
48 
49 char const *rs_op_kind_name(enum rs_op_kind);
rs_op_kind
Classes of operation that can be present.
Definition: command.h:31
char const * rs_op_kind_name(enum rs_op_kind)
Return a human-readable name for KIND.
Definition: command.c:40