-rw-r--r-- | rsync/command.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/rsync/command.h b/rsync/command.h new file mode 100644 index 0000000..43da19d --- a/dev/null +++ b/rsync/command.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- | ||
2 | * | ||
3 | * librsync -- library for network deltas | ||
4 | * $Id$ | ||
5 | * | ||
6 | * Copyright (C) 1999, 2000, 2001 by Martin Pool <mbp@samba.org> | ||
7 | * Copyright (C) 1999 by Andrew Tridgell <tridge@samba.org> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU Lesser General Public License | ||
11 | * as published by the Free Software Foundation; either version 2.1 of | ||
12 | * the License, or (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * Lesser General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU Lesser General Public | ||
20 | * License along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | ||
23 | |||
24 | |||
25 | /* | ||
26 | * command.h -- Types of commands present in the encoding stream. | ||
27 | * | ||
28 | * The vague idea is that eventually this file will be more abstract | ||
29 | * than protocol.h, but it's not clear that will ever be required. | ||
30 | */ | ||
31 | |||
32 | |||
33 | /** | ||
34 | * Classes of operation that can be present. Each may have several different | ||
35 | * possible representations. | ||
36 | */ | ||
37 | enum rs_op_kind { | ||
38 | RS_KIND_END = 1000, | ||
39 | RS_KIND_LITERAL, | ||
40 | RS_KIND_SIGNATURE, | ||
41 | RS_KIND_COPY, | ||
42 | RS_KIND_CHECKSUM, | ||
43 | RS_KIND_RESERVED, /* for future expansion */ | ||
44 | |||
45 | /* This one should never occur in file streams. It's an | ||
46 | * internal marker for invalid commands. */ | ||
47 | RS_KIND_INVALID | ||
48 | }; | ||
49 | |||
50 | |||
51 | typedef struct rs_op_kind_name { | ||
52 | char const *name; | ||
53 | enum rs_op_kind const kind; | ||
54 | } rs_op_kind_name_t; | ||
55 | |||
56 | char const * rs_op_kind_name(enum rs_op_kind); | ||
57 | |||
58 | |||