GCS  0.2.3
gcs_msg_type.h
1 /*
2  * Copyright (C) 2008 Codership Oy <info@codership.com>
3  *
4  * $Id: gcs_msg_type.h 477 2008-11-08 22:50:34Z alex $
5  */
6 /*
7  * Message types.
8  */
9 
10 #ifndef _gcs_msg_type_h_
11 #define _gcs_msg_type_h_
12 
13 // NOTE! When changing this enumaration, make sure to change
14 // gcs_msg_type_string[] in gcs_msg_type.c
15 typedef enum gcs_msg_type
16 {
17  GCS_MSG_ERROR, // error happened when recv()
18  GCS_MSG_ACTION, // action fragment
19  GCS_MSG_LAST, // report about last applied action
20  GCS_MSG_COMPONENT, // new component
21  GCS_MSG_STATE_UUID,// state exchange UUID message
22  GCS_MSG_STATE_MSG, // state exchange message
23  GCS_MSG_JOIN, // massage saying that the node completed state transfer
24  GCS_MSG_SYNC, // message saying that the node has synced with group
25  GCS_MSG_FLOW, // flow control message
26  GCS_MSG_CAUSAL, // causality token
27  GCS_MSG_MAX
28 }
29 gcs_msg_type_t;
30 
31 extern const char* gcs_msg_type_string[GCS_MSG_MAX];
32 
33 /* Types of private actions - should not care,
34  * must be defined and used by the application */
35 
36 /* Types of regular configuration mesages (both PRIM/NON_PRIM) */
37 typedef enum gcs_reg_type
38 {
39  GCS_REG_JOIN, // caused by member JOIN
40  GCS_REG_LEAVE, // caused by member LEAVE
41  GCS_REG_DISCONNECT, // caused by member DISCONNECT
42  GCS_REG_NETWORK // caused by NETWORK failure?
43 }
44 gcs_reg_type_t;
45 
46 #endif // _gcs_message_h_