OpenDNSSEC-enforcer  1.4.3
dbsdef.h
Go to the documentation of this file.
1 /*
2  * $Id: dbsdef.h 731 2009-05-18 08:24:19Z sion $
3  *
4  * Copyright (c) 2008-2009 Nominet UK. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
29 #ifndef KSM_DBEDEF_H
30 #define KSM_DBEDEF_H
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*+
37  * dbsdef.h - Define Database Status Codes
38  *
39  * Description:
40  * Defines the various status codes that can be returned by the various
41  * DB routines.
42 -*/
43 
44 #define DBS_BASE (65536 + 6144) /* Base of DB status codes */
45 
46 #define DBS_AUTOCOMM (DBS_BASE + 0) /* ERROR: failed to enable autocommit - %s */
47 #define DBS_BUFFEROVF (DBS_BASE + 1) /* ERROR: buffer overflow in %s */
48 #define DBS_CONNFAIL (DBS_BASE + 2) /* ERROR: unable to connect to database - %s */
49 #define DBS_INITFAIL (DBS_BASE + 3) /* ERROR: could not initialize handle to database */
50 #define DBS_INVARG (DBS_BASE + 4) /* ERROR: invalid arguments to %s */
51 #define DBS_INVINDEX (DBS_BASE + 5) /* ERROR: invalid index of %d, maximum index is %d */
52 #define DBS_NORESULT (DBS_BASE + 6) /* ERROR: no result obtained from query where one was expected */
53 #define DBS_NOSUCHROW (DBS_BASE + 7) /* ERROR: unable to get ID of last inserted row - no such row created? */
54 #define DBS_NOTCONERR (DBS_BASE + 8) /* ERROR: not connected to the database */
55 #define DBS_NOTCONN (DBS_BASE + 9) /* INFO: not connected to the database */
56 #define DBS_NOTINT (DBS_BASE + 10) /* ERROR: expected integer result from query, but obtained '%s' instead */
57 #define DBS_SQLFAIL (DBS_BASE + 11) /* ERROR: error executing SQL - %s */
58 #define DBS_STMTALLOC (DBS_BASE + 12) /* ERROR: unable to allocate prepared statement structure */
59 #define DBS_STMTPREP (DBS_BASE + 13) /* ERROR: unable to create prepared statement - %s */
60 #define DBS_TOOMANYROW (DBS_BASE + 14) /* WARNING: query '%s' returned too many rows, excess ignored */
61 #define DBS_UNEXRES (DBS_BASE + 15) /* ERROR: unexpected result from executing SQL statement '%s' */
62 
63 #ifdef __cplusplus
64 };
65 #endif
66 
67 #endif /* KSM_DBEDEF_H */