• 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 UDMF
18  * @{
19  *
20  * @brief The Unified Data Management Framework(UDMF) aims to define various standards
21  * for data across applications, devices, and platforms, providing a unified OpenHarmony
22  * data language and standardized data access and reading paths.
23  *
24  * @syscap SystemCapability.DistributedDataManager.UDMF.Core
25  *
26  * @since 12
27  */
28 
29 /**
30  * @file udmf_err_code.h
31  *
32  * @brief Declaration error code information.
33  *
34  * @kit ArkData
35  * @library libudmf.so
36  * @syscap SystemCapability.DistributedDataManager.UDMF.Core
37  *
38  * @since 12
39  */
40 
41 
42 #ifndef UDMF_ERR_CODE_H
43 #define UDMF_ERR_CODE_H
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /**
50  * @brief Indicates the error code information.
51  *
52  * @since 12
53  */
54 typedef enum Udmf_ErrCode {
55     /**
56      * The error code in the correct case.
57      */
58     UDMF_E_OK = 0,
59     /**
60      * @brief The error code for common exceptions.
61      */
62     UDMF_ERR = 20400000,
63     /**
64      * @brief The error code for common invalid args.
65      */
66     UDMF_E_INVALID_PARAM = (UDMF_ERR + 1),
67 } Udmf_ErrCode;
68 
69 /**
70  * @brief Indicates the error code information.
71  *
72  * @since 15
73  */
74 typedef enum Udmf_ListenerStatus {
75     /**
76      * brief Indicates the finished status.
77      */
78     UDMF_FINISHED,
79     /**
80      * @brief Indicates that processing is still in progress.
81      */
82     UDMF_PROCESSING,
83     /**
84      * @brief Indicates that an internal error has occurred.
85      */
86     UDMF_INNER_ERROR,
87     /**
88      * @brief Indicates that the GetDataParams contains invalid parameters.
89      */
90     UDMF_INVALID_PARAMETERS,
91     /**
92      * @brief Indicates that no data is obtained.
93      */
94     UDMF_DATA_NOT_FOUND,
95     /**
96      * @brief Indicates that an error occurred in the synchronization process.
97      */
98     UDMF_SYNC_FAILED,
99     /**
100      * @brief that an error occurred during file copying.
101      */
102     UDMF_COPY_FILE_FAILED,
103 } Udmf_ListenerStatus;
104 
105 #ifdef __cplusplus
106 };
107 #endif
108 
109 /** @} */
110 #endif
111