blob: 1736cd4fb456067c3bb228975345c7614fc7f729 [file] [log] [blame]
Jiri Simsa5293dcb2014-05-10 09:56:38 -07001// Boxes is an android app that uses veyron to share views
2// between peer devices.
3package boxes
4
5// BoxSignalling allows peers to rendezvous with each other
6type 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.
15type Box struct {
Gautham Thambidorai8e7f8c12014-06-10 13:17:43 -070016 // DeviceID that generated the box
17 DeviceId string
Jiri Simsa5293dcb2014-05-10 09:56:38 -070018 // 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
25type DrawInterface interface {
Gautham Thambidoraied6d0342014-06-04 14:32:47 -070026 // Draw is used to send/receive a stream of boxes to another peer
Jiri Simsa5293dcb2014-05-10 09:56:38 -070027 Draw() stream<Box, Box> (Err error)
Gautham Thambidoraied6d0342014-06-04 14:32:47 -070028 // SyncBoxes is used to setup a sync service over store to send/receive
29 // boxes to another peer
30 SyncBoxes() (Err error)
Jiri Simsa5293dcb2014-05-10 09:56:38 -070031}