| /* |
| * Copyright (C) 2021 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| syntax = "proto3"; |
| |
| package com.google.companionprotos; |
| |
| option java_package = "com.google.android.companionprotos"; |
| option java_multiple_files = true; |
| |
| // Potential system query types. |
| enum SystemQueryType { |
| // The contents of the payload are unknown. |
| // |
| // Note, this enum name is prefixed. See |
| // go/proto-best-practices-checkers#enum-default-value-name-conflict |
| SYSTEM_QUERY_TYPE_UNKNOWN = 0; |
| |
| // Query that returns the name of the device. |
| DEVICE_NAME = 1; |
| |
| // Query that returns the name of the mobile companion application. |
| APP_NAME = 2; |
| |
| // Query that returns the current role of the user. |
| USER_ROLE = 3; |
| |
| // Query that returns whether the companion platform on the other side |
| // (phone/IHU) supports the queried features. Field |payloads| in the |
| // SystemQuery proto will be a list of strings that each represents a |
| // feature recipient UUID. |
| IS_FEATURE_SUPPORTED = 4; |
| } |
| |
| // Definition proto for a system query. |
| message SystemQuery { |
| // Type indication for this query. |
| SystemQueryType type = 1; |
| |
| // Payload that accompanies the query. |
| repeated bytes payloads = 2; |
| } |
| |
| // Potential user roles. |
| enum SystemUserRole { |
| // The user's role is unknown. |
| // |
| // Note, this enum name is prefixed. See |
| // go/proto-best-practices-checkers#enum-default-value-name-conflict |
| SYSTEM_USER_ROLE_UNKNOWN = 0; |
| |
| // The user associated with this device is currently driving. |
| DRIVER = 1; |
| |
| // The user associated with this device is not currently driving. |
| PASSENGER = 2; |
| } |
| |
| // Response to a user role query which should be performed on each reconnect |
| // prior to issuing callbacks so features can properly adapt. |
| message SystemUserRoleResponse { |
| // The user's current role. |
| SystemUserRole role = 1; |
| } |
| |
| // Response to a feature support status query. |
| message FeatureSupportResponse { |
| repeated FeatureSupportStatus statuses = 1; |
| } |
| |
| // The support status of a feature. |
| message FeatureSupportStatus { |
| // The feature that is being queried. |
| string feature_id = 1; |
| |
| // Whether the feature is supported. |
| bool is_supported = 2; |
| } |