/*
 * 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.
 */

package android.hardware.camera.device@3.7;

import android.hardware.camera.common@1.0::Status;
import @3.6::ICameraDevice;

/**
 * Camera device interface
 *
 * Supports the android.hardware.Camera API, and the android.hardware.camera2
 * API at LIMITED or better hardware level.
 *
 * ICameraDevice.open() must return @3.2::ICameraDeviceSession,
 * @3.5::ICameraDeviceSession, @3.6::ICameraDeviceSession, or
 * @3.7::ICameraDeviceSession.
 */
interface ICameraDevice extends @3.6::ICameraDevice {
    /**
     * isStreamCombinationSupported_3_7:
     *
     * Identical to @3.5::ICameraDevice.isStreamCombinationSupported, except
     * that it takes a @3.7::StreamConfiguration parameter, which could contain
     * information about multi-resolution input and output streams.
     *
     */
    isStreamCombinationSupported_3_7(StreamConfiguration streams)
            generates (Status status, bool queryStatus);
};
