/*
 * 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 android.hardware.automotive.vehicle.proto;

/* Must be in sync with StatusCode.aidl. */
enum StatusCode {
    OK = 0;

    /* Try again. */
    TRY_AGAIN = 1;

    /* Invalid argument provided. */
    INVALID_ARG = 2;

    /* This code must be returned when device that associated with the vehicle
     * property is not available. For example, when client tries to set HVAC
     * temperature when the whole HVAC unit is turned OFF. */
    NOT_AVAILABLE = 3;

    /* Access denied */
    ACCESS_DENIED = 4;

    /* Something unexpected has happened in Vehicle HAL */
    INTERNAL_ERROR = 5;

    /**
     * For features that are not available because the underlying feature is
     * disabled.
     */
    NOT_AVAILABLE_DISABLED = 6;

    /**
     * For features that are not available because the vehicle speed is too low.
     */
    NOT_AVAILABLE_SPEED_LOW = 7;

    /**
     * For features that are not available because the vehicle speed is too
     * high.
     */
    NOT_AVAILABLE_SPEED_HIGH = 8;

    /**
     * For features that are not available because of bad camera or sensor
     * visibility. Examples might be bird poop blocking the camera or a bumper
     * cover blocking an ultrasonic sensor.
     */
    NOT_AVAILABLE_POOR_VISIBILITY = 9;

    /**
     * The feature cannot be accessed due to safety reasons. Eg. System could be
     * in a faulty state, an object or person could be blocking the requested
     * operation such as closing a trunk door, etc.
     */
    NOT_AVAILABLE_SAFETY = 10;
};

message VehicleHalCallStatus {
    StatusCode status_code = 1;
}
