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 AbilityRuntime
18  * @{
19  *
20  * @brief Provide the definition of the C interface for the native AbilityRuntime
21  *
22  * @syscap SystemCapability.Ability.AbilityRuntime.Core
23  * @since 13
24  */
25 
26 /**
27  * @file ability_runtime_common.h
28  *
29  * @brief Declare the common types for the native AbilityRuntime.
30  *
31  * @library libability_runtime.so
32  * @kit AbilityKit
33  * @syscap SystemCapability.Ability.AbilityRuntime.Core
34  * @since 13
35  */
36 
37 #ifndef ABILITY_RUNTIME_COMMON_H
38 #define ABILITY_RUNTIME_COMMON_H
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /**
45  * @brief Enumerates the error codes.
46  *
47  * @since 13
48  */
49 typedef enum {
50     /** @error No error. */
51     ABILITY_RUNTIME_ERROR_CODE_NO_ERROR = 0,
52     /** @error Invalid parameters. */
53     ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID = 401,
54     /** @error The context does not exist. */
55     ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST = 16000011,
56 } AbilityRuntime_ErrorCode;
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 /** @} */
63 #endif // ABILITY_RUNTIME_COMMON_H
64