1 /*! 2 @header BDBOperationStatus 3 @abstract BDB module 4 5 @availability OS X, GNUstep 6 @copyright (C) 2004, 2005, 2006 Oliver Langer 7 8 Author: Oliver Langer 9 10 This library is free software; you can redistribute it and/or 11 modify it under the terms of the GNU Lesser General Public 12 License as published by the Free Software Foundation; either 13 version 2.1 of the License, or (at your option) any later version. 14 15 This library is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 Lesser General Public License for more details. 19 20 You should have received a copy of the GNU Lesser General Public 21 License along with this library; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 24 <pre> 25 ------------------------------------------------------------------------- 26 Modification history 27 28 04.12.2005 ola initial version 29 22.08.2006 ola license changed 30 ------------------------------------------------------------------------- 31 </pre> 32 */ 33 34 35 #if !defined(__BDBOPERATION_STATUS_H) 36 #define __BDBOPERATION_STATUS_H 37 38 #include <db.h> 39 #include <limits.h> 40 41 42 /*! 43 * @enum BDBOperationStatus 44 * Result code of diverse operations 45 */ 46 typedef enum { 47 BDB_STATUS_SUCCESS = 0, 48 49 /** 50 * data is missing or has never been given for specified key 51 */ 52 BDB_STATUS_KEYEMPTY = DB_KEYEMPTY, 53 54 /** 55 * key/data pair does not exists 56 */ 57 BDB_STATUS_NOTFOUND = DB_NOTFOUND, 58 59 /** 60 * Using either mode DB_NOOVERWRITE, DB_NODUPDATA, the specified key already 61 * exists. 62 */ 63 BDB_STATUS_KEYEXIST = DB_KEYEXIST, 64 65 /** 66 * Should never be returned 67 */ 68 BDB_STATUS_UNKNOWN = INT_MAX 69 } BDBOperationStatus; 70 71 #endif 72