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; |
Zhenkai Zhu | 25e33e5 | 2012-09-28 13:00:07 -0700 | [diff] [blame] | 10 | JOIN = 3; |
11 | OTHER = 4; | ||||
Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 12 | } |
Zhenkai Zhu | b633882 | 2012-05-31 13:27:24 -0700 | [diff] [blame] | 13 | required ChatMessageType type = 3 [default = CHAT]; |
14 | optional string data = 4; | ||||
Zhenkai Zhu | b98e602 | 2012-09-27 13:48:23 -0700 | [diff] [blame] | 15 | required int32 timestamp = 5; |
Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 16 | } |