• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 /**
17 * @addtogroup Codec
18 * @{
19 *
20 * @brief Defines APIs of the image Codec module.
21 *
22 * The Codec module provides APIs for image codec, setting codec parameters,
23 * and controlling and transferring image data.
24 *
25 * @since 4.0
26 * @version 1.0
27 */
28
29/**
30 * @file ICodecImageCallback.idl
31 *
32 * @brief Defines the callbacks used to report image codec result.
33 *
34 *
35 * @since 4.0
36 * @version 1.0
37 */
38
39/**
40 * @brief Defines the path for the package of the image Codec module APIs.
41 *
42 * @since 4.0
43 * @version 1.0
44 */
45package ohos.hdi.codec.image.v1_0;
46
47import ohos.hdi.codec.image.v1_0.CodecImageType;
48
49
50/**
51 * @brief Defines the callbacks of the Image Codec module.
52 *
53 * The following callbacks are provided:
54 * - Callback used to report image codec result,For details, see {@link OnImageEvent}.
55 * The callbacks are registered by using:
56 * - {@link DoJpegDecode} when decode jpeg image.
57 */
58
59
60[callback] interface ICodecImageCallback {
61
62    /**
63     * @brief Reports image codec result, such as an error.
64     *
65     * @param status Indicates the result of the image codec. For details, see {@link HDF_STATUS}.
66     *
67     * @status is <b>HDF_SUCCESS</b> if the image codec successfully.
68     * @status is other values if the image codec failed. For details about the status codes,
69     * see <b>HDF_STATUS</b> defined by HDF.
70     *
71     * @since 4.0
72     */
73    OnImageEvent([in] int status);
74}
75