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 syntax = "proto2"; |
| 6 |
| 7 option optimize_for = LITE_RUNTIME; |
| 8 |
| 9 import "common.proto"; |
| 10 |
| 11 package blimp; |
| 12 |
| 13 message GeolocationErrorMessage { |
| 14 enum ErrorCode { |
| 15 PERMISSION_DENIED = 1; |
| 16 POSITION_UNAVAILABLE = 2; |
| 17 TIMEOUT = 3; |
| 18 } |
| 19 |
| 20 optional ErrorCode error_code = 1; |
| 21 optional string error_message = 2; |
| 22 } |
| 23 |
| 24 message GeolocationCoordinatesMessage { |
| 25 optional double latitude = 1; |
| 26 optional double longitude = 2; |
| 27 optional double altitude = 3; |
| 28 optional double accuracy = 4; |
| 29 optional double altitude_accuracy = 5; |
| 30 optional double heading = 6; |
| 31 optional double speed = 7; |
| 32 } |
| 33 |
| 34 message GeolocationSetInterestLevelMessage { |
| 35 // These values represent the various listening states the server can have. |
| 36 // A Level containing an accuracy level indicates that the server is |
| 37 // waiting for either high or low accuracy position updates from the client. |
| 38 // If a NO_INTEREST level is sent, the server is no longer listening |
| 39 // for updates. |
| 40 enum Level { |
| 41 NO_INTEREST = 0; |
| 42 HIGH_ACCURACY = 1; |
| 43 LOW_ACCURACY = 2; |
| 44 } |
| 45 |
| 46 optional Level level = 1; |
| 47 } |
| 48 |
| 49 message GeolocationMessage { |
| 50 oneof type { |
| 51 // Server => Client types. |
| 52 GeolocationSetInterestLevelMessage set_interest_level = 1; |
| 53 EmptyMessage request_refresh = 2; |
| 54 |
| 55 // Client => Server types. |
| 56 GeolocationCoordinatesMessage coordinates = 3; |
| 57 GeolocationErrorMessage error = 4; |
| 58 } |
| 59 } |
OLD | NEW |