OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Message definitions for geolocation messages. | |
6 | |
7 syntax = "proto2"; | |
8 | |
9 option optimize_for = LITE_RUNTIME; | |
10 | |
11 import "common.proto"; | |
12 | |
13 package blimp; | |
14 | |
15 message GeolocationErrorMessage { | |
16 enum ErrorCode { | |
17 PERMISSION_DENIED = 1; | |
18 POSITION_UNAVAILABLE = 2; | |
19 TIMEOUT = 3; | |
20 } | |
21 | |
22 optional ErrorCode error_code = 1; | |
23 optional string error_message = 2; | |
24 } | |
25 | |
26 message GeolocationCoordinates { | |
27 optional double latitude = 1; | |
28 optional double longitude = 2; | |
29 optional double altitude = 3; | |
30 optional double accuracy = 4; | |
31 optional double altitude_accuracy = 5; | |
32 optional double heading = 6; | |
33 optional double speed = 7; | |
34 } | |
35 | |
36 message GeolocationPositionMessage { | |
37 optional GeolocationCoordinates coordinates = 1; | |
38 | |
39 // Client-side time | |
Wez
2016/07/14 01:19:21
If you check the LocationProvider interface you'll
CJ
2016/07/14 23:55:09
Ah okay! Did not know that. Updating.
Wez
2016/07/15 01:46:17
Acknowledged.
| |
40 optional int64 timestamp_millis = 2; | |
41 } | |
42 | |
43 message GeolocationInterestMessage { | |
44 // These values represent the various listening states the server can have. | |
45 // A ListenState containing an accuracy level indicates that the server is | |
46 // waiting for either high or low accuracy position updates from the client. | |
47 // If a REQUEST_NONE listen state is sent, the server is no longer listening | |
48 // for updates. | |
Wez
2016/07/14 01:19:21
My suggestion was to rename ListenState and the en
CJ
2016/07/14 23:55:09
Done, but slightly different. Thought NO_INTEREST
Wez
2016/07/15 01:46:17
Acknowledged.
| |
49 enum ListenState { | |
50 REQUEST_NONE = 0; | |
51 ACCURACY_HIGH = 1; | |
52 ACCURACY_LOW = 2; | |
53 } | |
54 | |
55 optional ListenState listen_state = 1; | |
56 } | |
57 | |
58 message GeolocationMessage { | |
59 oneof type { | |
60 // Server => Client types. | |
61 GeolocationInterestMessage update_listen_state = 1; | |
62 EmptyMessage request_refresh = 2; | |
63 | |
64 // Client => Server types. | |
65 GeolocationPositionMessage location = 3; | |
66 GeolocationErrorMessage error = 4; | |
67 } | |
68 } | |
OLD | NEW |