Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 1 | package SyncDemo; |
2 | |||||
3 | message ChatMessage { | ||||
Zhenkai Zhu | b633882 | 2012-05-31 13:27:24 -0700 | [diff] [blame] | 4 | required string to = 1; |
5 | required string from = 2; | ||||
Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 6 | enum ChatMessageType { |
7 | CHAT = 0; | ||||
Zhenkai Zhu | 5a8d5aa | 2012-05-30 21:25:23 -0700 | [diff] [blame] | 8 | HELLO = 1; |
Zhenkai Zhu | 6523867 | 2012-09-25 13:10:57 -0700 | [diff] [blame] | 9 | LEAVE = 2; |
10 | OTHER = 3; | ||||
Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 11 | } |
Zhenkai Zhu | b633882 | 2012-05-31 13:27:24 -0700 | [diff] [blame] | 12 | required ChatMessageType type = 3 [default = CHAT]; |
13 | optional string data = 4; | ||||
14 | optional int32 timestamp = 5; | ||||
Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 15 | } |