Renamed a method that isn't part of the public interface of unmarshall
[invirt/third/libt4.git] / paxos_protocol.h
1 #ifndef paxos_protocol_h
2 #define paxos_protocol_h
3
4 #include "types.h"
5 #include "rpc/rpc.h"
6
7 struct prop_t {
8     unsigned n;
9     string m;
10
11     MEMBERS(n, m)
12     LEXICOGRAPHIC_COMPARISON(prop_t)
13 };
14
15 MARSHALLABLE(prop_t)
16
17 class paxos_protocol {
18     public:
19         enum status : status_t { OK, ERR };
20         enum rpc_numbers : proc_t {
21             preparereq = 0x11001,
22             acceptreq,
23             decidereq,
24             heartbeat,
25         };
26
27         struct prepareres {
28             bool oldinstance;
29             bool accept;
30             prop_t n_a;
31             string v_a;
32
33             MEMBERS(oldinstance, accept, n_a, v_a)
34         };
35 };
36
37 MARSHALLABLE(paxos_protocol::prepareres)
38
39 #endif