/*
 * Copyright (c) 2026 Huawei Device Co., Ltd.
 * 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.
 */

/**
 * @file HdiZFactory.idl
 *
 * @brief Declares APIs for creating codec component factory.
 *
 * @since 7.0
 * @version 1.0
 */

package ohos.hdi.codec.zcodec.v1_0;
import ohos.hdi.codec.zcodec.v1_0.HdiZTypes;
import ohos.hdi.codec.zcodec.v1_0.HdiZComponent;
import ohos.hdi.codec.zcodec.v1_0.HdiZCallback;

interface HdiZFactory {
    /**
     * @brief Gets all codec capabilities.
     *
     * @param caps Indicates the codec capability array. For details, see {@link HdiCapability}.
     *
     * @since 7.0
     * @version 1.0
     */
    GetCapabilities([out] HdiCapability[] caps);

    /**
     * @brief Creates codec component by standard.
     *
     * @param standard Indicates the codec standard.
     * @param isEncoder Indicates whether the component is an encoder.
     * @param cb Indicates the callback. For details, see {@link HdiZCallback}.
     * @param param Indicates the parameter.
     * @param instance Indicates the created component instance. For details, see {@link HdiZComponent}.
     *
     * @since 7.0
     * @version 1.0
     */
    CreateByStandard([in] int standard, [in] boolean isEncoder, [in] HdiZCallback cb,
        [in] ParcelableParam param, [out] HdiZComponent instance);

    /**
     * @brief Creates codec component by name.
     *
     * @param name Indicates the component name.
     * @param cb Indicates the callback. For details, see {@link HdiZCallback}.
     * @param param Indicates the parameter.
     * @param instance Indicates the created component instance. For details, see {@link HdiZComponent}.
     *
     * @since 7.0
     * @version 1.0
     */
    CreateByName([in] String name, [in] HdiZCallback cb,
        [in] ParcelableParam param, [out] HdiZComponent instance);
}