Chromium Code Reviews| 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. | |
|
Kevin M
2016/07/19 16:01:41
nit: This is already implied by the filename and f
CJ
2016/07/19 20:35:58
Removed.
| |
| 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 GeolocationCoordinatesMessage { | |
| 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 GeolocationSetInterestLevelMessage { | |
| 37 // These values represent the various listening states the server can have. | |
| 38 // A Level containing an accuracy level indicates that the server is | |
| 39 // waiting for either high or low accuracy position updates from the client. | |
| 40 // If a NO_INTEREST level is sent, the server is no longer listening | |
| 41 // for updates. | |
| 42 enum Level { | |
| 43 NO_INTEREST = 0; | |
| 44 HIGH_ACCURACY = 1; | |
| 45 LOW_ACCURACY = 2; | |
| 46 } | |
| 47 | |
| 48 optional Level level = 1; | |
| 49 } | |
| 50 | |
| 51 message GeolocationMessage { | |
| 52 oneof type { | |
| 53 // Server => Client types. | |
| 54 GeolocationSetInterestLevelMessage set_interest_level = 1; | |
| 55 EmptyMessage request_refresh = 2; | |
| 56 | |
| 57 // Client => Server types. | |
| 58 GeolocationCoordinatesMessage coordinates = 3; | |
| 59 GeolocationErrorMessage error = 4; | |
| 60 } | |
| 61 } | |
| OLD | NEW |