1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited. 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 #ifndef KV_ERR_H 17 #define KV_ERR_H 18 19 /* Key-value function return code description */ 20 #define KV_OK (0) /* Successed */ 21 #define KV_LOOP_CONTINUE (10000) /* Loop Continue */ 22 #define KV_ERR_NO_SPACE (-10001) /* The space is out of range */ 23 #define KV_ERR_INVALID_PARAM (-10002) /* The parameter is invalid */ 24 #define KV_ERR_MALLOC_FAILED (-10003) /* The os memory malloc error */ 25 #define KV_ERR_NOT_FOUND (-10004) /* Could not found the item */ 26 #define KV_ERR_FLASH_READ (-10005) /* The flash read operation error */ 27 #define KV_ERR_FLASH_WRITE (-10006) /* The flash write operation error */ 28 #define KV_ERR_FLASH_ERASE (-10007) /* The flash erase operation error */ 29 #define KV_ERR_OS_LOCK (-10008) /* The error related to os lock */ 30 #define KV_ERR_OS_SEM (-10009) /* The error related to os semaphose */ 31 32 #define KV_ERR_ENCRYPT (-10010) /* Data encryption error */ 33 #define KV_ERR_DECRYPT (-10011) /* Data decryption error */ 34 #define KV_ERR_NOT_SUPPORT (-10012) /* The function is not support yet */ 35 36 #endif /* KV_ERR_H */ 37 38