Debian Codegraph @

examples/cxx/excxx_repquote/RepConfigInfo.h

raw
1 /*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2001, 2013 Oracle and/or its affiliates. All rights reserved.
5 *
6 * $Id$
7 */
8 #include <db_cxx.h>
9
10 // Chainable struct used to store host information.
11 typedef struct RepHostInfoObj{
12 bool creator;
13 char* host;
14 int port;
15 bool peer; // only relevant for "other" hosts
16 RepHostInfoObj* next; // used for chaining multiple "other" hosts.
17 } REP_HOST_INFO;
18
19 class RepConfigInfo {
20 public:
21 RepConfigInfo();
22 virtual ~RepConfigInfo();
23
24 void addOtherHost(char* host, int port, bool peer);
25 public:
26 u_int32_t start_policy;
27 char* home;
28 bool got_listen_address;
29 REP_HOST_INFO this_host;
30 int nrsites;
31 int priority;
32 bool verbose;
33 // used to store a set of optional other hosts.
34 REP_HOST_INFO *other_hosts;
35 int ack_policy;
36 bool bulk;
37 };