OpenDNSSEC-enforcer  1.3.4
/build/buildd/opendnssec-1.3.4/enforcer/ksm/include/ksm/dbsdef.h
Go to the documentation of this file.
00001 /*
00002  * $Id: dbsdef.h 731 2009-05-18 08:24:19Z sion $
00003  *
00004  * Copyright (c) 2008-2009 Nominet UK. All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  * 2. Redistributions in binary form must reproduce the above copyright
00012  *    notice, this list of conditions and the following disclaimer in the
00013  *    documentation and/or other materials provided with the distribution.
00014  *
00015  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00016  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00017  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00019  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00020  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00021  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
00023  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00024  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
00025  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026  *
00027  */
00028 
00029 #ifndef KSM_DBEDEF_H
00030 #define KSM_DBEDEF_H
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 /*+
00037  * dbsdef.h - Define Database Status Codes
00038  *
00039  * Description:
00040  *      Defines the various status codes that can be returned by the various
00041  *      DB routines.
00042 -*/
00043 
00044 #define DBS_BASE                (65536 + 6144)  /* Base of DB status codes */
00045 
00046 #define DBS_AUTOCOMM    (DBS_BASE +  0) /* ERROR: failed to enable autocommit - %s */
00047 #define DBS_BUFFEROVF   (DBS_BASE +  1) /* ERROR: buffer overflow in %s */
00048 #define DBS_CONNFAIL    (DBS_BASE +  2) /* ERROR: unable to connect to database - %s */
00049 #define DBS_INITFAIL    (DBS_BASE +  3) /* ERROR: could not initialize handle to database */
00050 #define DBS_INVARG              (DBS_BASE +  4) /* ERROR: invalid arguments to %s */
00051 #define DBS_INVINDEX    (DBS_BASE +  5) /* ERROR: invalid index of %d, maximum index is %d */
00052 #define DBS_NORESULT    (DBS_BASE +  6) /* ERROR: no result obtained from query where one was expected */
00053 #define DBS_NOSUCHROW   (DBS_BASE +  7) /* ERROR: unable to get ID of last inserted row - no such row created? */
00054 #define DBS_NOTCONERR   (DBS_BASE +  8) /* ERROR: not connected to the database */
00055 #define DBS_NOTCONN             (DBS_BASE +  9) /* INFO: not connected to the database */
00056 #define DBS_NOTINT              (DBS_BASE + 10) /* ERROR: expected integer result from query, but obtained '%s' instead */
00057 #define DBS_SQLFAIL             (DBS_BASE + 11) /* ERROR: error executing SQL - %s */
00058 #define DBS_STMTALLOC   (DBS_BASE + 12) /* ERROR: unable to allocate prepared statement structure */
00059 #define DBS_STMTPREP    (DBS_BASE + 13) /* ERROR: unable to create prepared statement - %s */
00060 #define DBS_TOOMANYROW  (DBS_BASE + 14) /* WARNING: query '%s' returned too many rows, excess ignored */
00061 #define DBS_UNEXRES             (DBS_BASE + 15) /* ERROR: unexpected result from executing SQL statement '%s' */
00062 
00063 #ifdef __cplusplus
00064 };
00065 #endif
00066 
00067 #endif /* KSM_DBEDEF_H */