------------------------------------------------------------------------------
-- Berekeley DB Error Codes                                                 --
--                                                                          --
-- Part of SparForte                                                        --
------------------------------------------------------------------------------
--                                                                          --
--            Copyright (C) 2001-2024 Free Software Foundation              --
--                                                                          --
-- This is free software;  you can  redistribute it  and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion.  This is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License  distributed with this;  see file COPYING.  If not, write --
-- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
-- MA 02111-1307, USA.                                                      --
--                                                                          --
-- This is maintained at http://www.sparforte.com                           --
--                                                                          --
------------------------------------------------------------------------------
pragma ada_2005;

#if BDB
with
    bdb_constants;
#end if;

#if BDB
use
    bdb_constants;
#end if;

package body parser_bdb is

-----------------------------------------------------------------------------

procedure StartupBDB is
begin
  #if BDB
  declareNamespace( "bdb" );

  declareIdent( bdb_db_error_t, "bdb.db_error", natural_t, typeClass );

  declareStandardConstant( bdb_DB_OK_t, "bdb.DB_OK", bdb_db_error_t, DB_OK'img );
  declareStandardConstant( bdb_DB_BUFFER_SMALL_t, "bdb.DB_BUFFER_SMALL", bdb_db_error_t, DB_BUFFER_SMALL'img );
  declareStandardConstant( bdb_DB_DONOTINDEX_t, "bdb.DB_DONOTINDEX", bdb_db_error_t, DB_DONOTINDEX'img );
  declareStandardConstant( bdb_DB_FOREIGN_CONFLICT_t, "bdb.DB_FOREIGN_CONFLICT", bdb_db_error_t, DB_FOREIGN_CONFLICT'img );
  declareStandardConstant( bdb_DB_KEYEMPTY_t, "bdb.DB_KEYEMPTY", bdb_db_error_t, DB_KEYEMPTY'img );
  declareStandardConstant( bdb_DB_KEYEXIST_t, "bdb.DB_KEYEXIST", bdb_db_error_t, DB_KEYEXIST'img );
  declareStandardConstant( bdb_DB_LOCK_DEADLOCK_t, "bdb.DB_LOCK_DEADLOCK", bdb_db_error_t, DB_LOCK_DEADLOCK'img );
  declareStandardConstant( bdb_DB_LOCK_NOTGRANTED_t, "bdb.DB_LOCK_NOTGRANTED", bdb_db_error_t, DB_LOCK_NOTGRANTED'img );
  declareStandardConstant( bdb_DB_LOG_BUFFER_FULL_t, "bdb.DB_LOG_BUFFER_FULL", bdb_db_error_t, DB_LOG_BUFFER_FULL'img );
  declareStandardConstant( bdb_DB_NOSERVER_t, "bdb.DB_NOSERVER", bdb_db_error_t, DB_NOSERVER'img );
  declareStandardConstant( bdb_DB_NOSERVER_HOME_t, "bdb.DB_NOSERVER_HOME", bdb_db_error_t, DB_NOSERVER_HOME'img );
  declareStandardConstant( bdb_DB_NOSERVER_ID_t, "bdb.DB_NOSERVER_ID", bdb_db_error_t, DB_NOSERVER_ID'img );
  declareStandardConstant( bdb_DB_NOTFOUND_t, "bdb.DB_NOTFOUND", bdb_db_error_t, DB_NOTFOUND'img );
  declareStandardConstant( bdb_DB_OLD_VERSION_t, "bdb.DB_OLD_VERSION", bdb_db_error_t, DB_OLD_VERSION'img );
  declareStandardConstant( bdb_DB_PAGE_NOTFOUND_t, "bdb.DB_PAGE_NOTFOUND", bdb_db_error_t, DB_PAGE_NOTFOUND'img );
  declareStandardConstant( bdb_DB_REP_DUPMASTER_t, "bdb.DB_REP_DUPMASTER", bdb_db_error_t, DB_REP_DUPMASTER'img );
  declareStandardConstant( bdb_DB_REP_HANDLE_DEAD_t, "bdb.DB_REP_HANDLE_DEAD", bdb_db_error_t, DB_REP_HANDLE_DEAD'img );
  declareStandardConstant( bdb_DB_REP_HOLDELECTION_t, "bdb.DB_REP_HOLDELECTION", bdb_db_error_t, DB_REP_HOLDELECTION'img );
  declareStandardConstant( bdb_DB_REP_IGNORE_t, "bdb.DB_REP_IGNORE", bdb_db_error_t, DB_REP_IGNORE'img );
  declareStandardConstant( bdb_DB_REP_ISPERM_t, "bdb.DB_REP_ISPERM", bdb_db_error_t, DB_REP_ISPERM'img );
  declareStandardConstant( bdb_DB_REP_JOIN_FAILURE_t, "bdb.DB_REP_JOIN_FAILURE", bdb_db_error_t, DB_REP_JOIN_FAILURE'img );
  declareStandardConstant( bdb_DB_REP_LEASE_EXPIRED_t, "bdb.DB_REP_LEASE_EXPIRED", bdb_db_error_t, DB_REP_LEASE_EXPIRED'img );
  declareStandardConstant( bdb_DB_REP_LOCKOUT_t, "bdb.DB_REP_LOCKOUT", bdb_db_error_t, DB_REP_LOCKOUT'img );
  declareStandardConstant( bdb_DB_REP_NEWSITE_t, "bdb.DB_REP_NEWSITE", bdb_db_error_t, DB_REP_NEWSITE'img );
  declareStandardConstant( bdb_DB_REP_NOTPERM_t, "bdb.DB_REP_NOTPERM", bdb_db_error_t, DB_REP_NOTPERM'img );
  declareStandardConstant( bdb_DB_REP_UNAVAIL_t, "bdb.DB_REP_UNAVAIL", bdb_db_error_t, DB_REP_UNAVAIL'img );
  declareStandardConstant( bdb_DB_RUNRECOVERY_t, "bdb.DB_RUNRECOVERY", bdb_db_error_t, DB_RUNRECOVERY'img );
  declareStandardConstant( bdb_DB_SECONDARY_BAD_t, "bdb.DB_SECONDARY_BAD", bdb_db_error_t, DB_SECONDARY_BAD'img );
  declareStandardConstant( bdb_DB_VERIFY_BAD_t, "bdb.DB_VERIFY_BAD", bdb_db_error_t, DB_VERIFY_BAD'img );
  declareStandardConstant( bdb_DB_VERSION_MISMATCH_t, "bdb.DB_VERSION_MISMATCH", bdb_db_error_t, DB_VERSION_MISMATCH'img );

  declareNamespaceClosed( "bdb" );
#else
null;
#end if;
end StartupBDB;

procedure ShutdownBDB is
begin
  null;
end ShutdownBDB;

end parser_bdb;
