• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 NativeWindow
18  * @{
19  *
20  * @brief Provides the error codes for native window.
21  *
22  * @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
23  * @since 12
24  * @version 1.0
25  */
26 
27 /**
28  * @file external_window.h
29  *
30  * @brief Defines the error codes.
31  *
32  * @kit ArkGraphics2D
33  * @library libnative_window.so
34  * @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
35  * @since 12
36  * @version 1.0
37  */
38 
39 #ifndef INCLUDE_GRAPHIC_ERROR_CODE_H
40 #define INCLUDE_GRAPHIC_ERROR_CODE_H
41 
42 #include <stdint.h>
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /**
49  * @brief interface error code.
50  * @since 12
51  */
52 typedef enum OHNativeErrorCode {
53     /** @error succeed */
54     NATIVE_ERROR_OK = 0,
55     /**
56      * @error memory operation error
57      * @since 15
58      */
59     NATIVE_ERROR_MEM_OPERATION_ERROR = 30001000,
60     /** @error input invalid parameter */
61     NATIVE_ERROR_INVALID_ARGUMENTS = 40001000,
62     /** @error unauthorized operation */
63     NATIVE_ERROR_NO_PERMISSION = 40301000,
64     /** @error no idle buffer is available */
65     NATIVE_ERROR_NO_BUFFER = 40601000,
66     /** @error the consumer side doesn't exist */
67     NATIVE_ERROR_NO_CONSUMER = 41202000,
68     /** @error uninitialized */
69     NATIVE_ERROR_NOT_INIT = 41203000,
70     /** @error the consumer is connected */
71     NATIVE_ERROR_CONSUMER_CONNECTED = 41206000,
72     /** @error the buffer status did not meet expectations */
73     NATIVE_ERROR_BUFFER_STATE_INVALID = 41207000,
74     /** @error buffer is already in the cache queue */
75     NATIVE_ERROR_BUFFER_IN_CACHE = 41208000,
76     /** @error the buffer queue is full */
77     NATIVE_ERROR_BUFFER_QUEUE_FULL = 41209000,
78     /** @error buffer is not in the cache queue */
79     NATIVE_ERROR_BUFFER_NOT_IN_CACHE = 41210000,
80     /** @error the consumer is disconnected */
81     NATIVE_ERROR_CONSUMER_DISCONNECTED = 41211000,
82     /** @error the consumer not register listener */
83     NATIVE_ERROR_CONSUMER_NO_LISTENER_REGISTERED = 41212000,
84     /** @error the current device or platform does not support it */
85     NATIVE_ERROR_UNSUPPORTED = 50102000,
86     /** @error unknown error, please check log */
87     NATIVE_ERROR_UNKNOWN = 50002000,
88     /** @error hdi interface error */
89     NATIVE_ERROR_HDI_ERROR = 50007000,
90     /** @error ipc send failed */
91     NATIVE_ERROR_BINDER_ERROR = 50401000,
92     /** @error the egl environment is abnormal */
93     NATIVE_ERROR_EGL_STATE_UNKNOWN = 60001000,
94     /** @error egl interface invocation failed */
95     NATIVE_ERROR_EGL_API_FAILED = 60002000,
96 } OHNativeErrorCode;
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 /** @} */
103 #endif // INCLUDE_GRAPHIC_ERROR_CODE_H