Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 1 | // Boxes is an android app that uses veyron to share views |
| 2 | // between peer devices. |
| 3 | package boxes |
| 4 | |
| 5 | // BoxSignalling allows peers to rendezvous with each other |
| 6 | type BoxSignalling interface { |
| 7 | // Add endpoint information to the signalling server. |
| 8 | Add(Endpoint string) (Err error) |
| 9 | // Get endpoint information about a peer. |
| 10 | Get() (Endpoint string, Err error) |
| 11 | } |
| 12 | |
| 13 | // Box describes the name and co-ordinates of a given box that |
| 14 | // is displayed in the View of a peer device. |
| 15 | type Box struct { |
Gautham Thambidorai | 8e7f8c1 | 2014-06-10 13:17:43 -0700 | [diff] [blame] | 16 | // DeviceID that generated the box |
| 17 | DeviceId string |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 18 | // BoxId is a unique name for a box |
| 19 | BoxId string |
| 20 | // Points are the co-ordinates of a given box |
| 21 | Points [4]float32 |
| 22 | } |
| 23 | |
| 24 | // DrawInterface enables adding a box on another peer |
| 25 | type DrawInterface interface { |
Gautham Thambidorai | ed6d034 | 2014-06-04 14:32:47 -0700 | [diff] [blame] | 26 | // Draw is used to send/receive a stream of boxes to another peer |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 27 | Draw() stream<Box, Box> (Err error) |
Gautham Thambidorai | ed6d034 | 2014-06-04 14:32:47 -0700 | [diff] [blame] | 28 | // SyncBoxes is used to setup a sync service over store to send/receive |
| 29 | // boxes to another peer |
| 30 | SyncBoxes() (Err error) |
Jiri Simsa | 5293dcb | 2014-05-10 09:56:38 -0700 | [diff] [blame] | 31 | } |