• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 #ifndef OBJECTSTORE_ERRORS_H
16 #define OBJECTSTORE_ERRORS_H
17 
18 #include <stdint.h>
19 
20 namespace OHOS::ObjectStore {
21 constexpr uint32_t BASE_ERR_OFFSET = 1650;
22 
23 /* module defined errors */
24 constexpr uint32_t SUCCESS = 0;
25 constexpr uint32_t ERR_DB_SET_PROCESS = BASE_ERR_OFFSET + 1;
26 constexpr uint32_t ERR_EXIST = BASE_ERR_OFFSET + 2;
27 constexpr uint32_t ERR_DATA_LEN = BASE_ERR_OFFSET + 3;
28 constexpr uint32_t ERR_NOMEM = BASE_ERR_OFFSET + 4;
29 constexpr uint32_t ERR_DB_NOT_INIT = BASE_ERR_OFFSET + 5;
30 constexpr uint32_t ERR_DB_GETKV_FAIL = BASE_ERR_OFFSET + 6;
31 constexpr uint32_t ERR_DB_NOT_EXIST = BASE_ERR_OFFSET + 7;
32 constexpr uint32_t ERR_DB_GET_FAIL = BASE_ERR_OFFSET + 8;
33 constexpr uint32_t ERR_DB_ENTRY_FAIL = BASE_ERR_OFFSET + 9;
34 constexpr uint32_t ERR_CLOSE_STORAGE = BASE_ERR_OFFSET + 10;
35 constexpr uint32_t ERR_NULL_OBJECT = BASE_ERR_OFFSET + 11;
36 constexpr uint32_t ERR_REGISTER = BASE_ERR_OFFSET + 12;
37 constexpr uint32_t ERR_NULL_OBJECTSTORE = BASE_ERR_OFFSET + 13;
38 constexpr uint32_t ERR_GET_OBJECT = BASE_ERR_OFFSET + 14;
39 constexpr uint32_t ERR_NO_OBSERVER = BASE_ERR_OFFSET + 15;
40 constexpr uint32_t ERR_UNRIGSTER = BASE_ERR_OFFSET + 16;
41 constexpr uint32_t ERR_SINGLE_DEVICE = BASE_ERR_OFFSET + 17;
42 constexpr uint32_t ERR_NULL_PTR = BASE_ERR_OFFSET + 18;
43 constexpr uint32_t ERR_PROCESSING = BASE_ERR_OFFSET + 19;
44 constexpr uint32_t ERR_RESULTSET = BASE_ERR_OFFSET + 20;
45 constexpr uint32_t ERR_INVALID_ARGS = BASE_ERR_OFFSET + 21;
46 } // namespace OHOS::ObjectStore
47 
48 #endif
49