00001 00004 /* Copyright (C) 2008 Lemur Consulting Ltd 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #ifndef XAPIAN_INCLUDED_REPLICATIONPROTOCOL_H 00022 #define XAPIAN_INCLUDED_REPLICATIONPROTOCOL_H 00023 00024 // Versions: 00025 // 1: Initial support 00026 #define XAPIAN_REPLICATION_PROTOCOL_MAJOR_VERSION 1 00027 #define XAPIAN_REPLICATION_PROTOCOL_MINOR_VERSION 0 00028 00029 // Reply types (master -> slave) 00030 enum replicate_reply_type { 00031 REPL_REPLY_END_OF_CHANGES, // No more changes to transfer. 00032 REPL_REPLY_FAIL, // Couldn't generate full set of changes. 00033 REPL_REPLY_DB_HEADER, // The start of a whole DB copy. 00034 REPL_REPLY_DB_FILENAME, // The name of a file in a DB copy. 00035 REPL_REPLY_DB_FILEDATA, // Contents of a file in a DB copy. 00036 REPL_REPLY_DB_FOOTER, // End of a whole DB copy. 00037 REPL_REPLY_CHANGESET // A changeset file is being sent. 00038 }; 00039 00040 // The maximum number of copies of a database to send in a single conversation. 00041 // If more copies than this are required, a REPL_REPLY_FAIL message will be 00042 // sent. 00043 #define MAX_DB_COPIES_PER_CONVERSATION 5 00044 00045 #endif // XAPIAN_INCLUDED_REPLICATIONPROTOCOL_H