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; |
| 9 | OTHER = 2; |
Zhenkai Zhu | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 10 | } |
Zhenkai Zhu | b633882 | 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 | 6fcdee4 | 2012-05-30 17:02:49 -0700 | [diff] [blame] | 14 | } |