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