# Bbuuzzb(dbeng) error codes, configuration error codes and
# send message numbers.
# Rick Smereka, Copyright (C) 2005-2006.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT 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
# along with this program; if not, get a copy via the Internet at
# http://gnu.org/copyleft/gpl.html or write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA

# You can contact the author via email at rsmereka@future-lab.com

# Some of the constants in this module are defined based on other
# constants which are located in the module 'comcode.tcl'. This
# module must be 'source'ed in your code.

# Initial tcl version. Rick Smereka, Apr/2005

# local engine I/O error codes for single user or reply codes
# for multi user
const DBENG_OK $SOCKET_RC_OK
const DBENG_EXISTS 1
const DBENG_NOT_EXIST 2
const DBENG_RECORD_CHANGED 3
const DBENG_NO_RECORD 4
const DBENG_EOF 5
const DBENG_NO_SUCH_FIELD 6
const DBENG_INVALID_FILE_NAME 7
const DBENG_UNABLE_TO_OPEN 8
const DBENG_WRITE_FAIL 9
const DBENG_NO_EXISTING_RECORD 10
const DBENG_CANNOT_CREATE_TABLE 11 
const DBENG_MAX_OPEN_TABLE 12
const DBENG_NO_SUCH_FILE 13
const DBENG_RECORD_TOO_LARGE 14
const DBENG_MEMORY_FAIL 15
const DBENG_INVALID_FUNCTION 16
const DBENG_ACCESS_DENIED 17
const DBENG_FUNCTION_NOT_IMPLEMENTED 18
const DBENG_PUT_ERROR 19
const DBENG_NO_SUCH_SUBFIELD 20
const DBENG_NO_SUCH_SUBSUBFIELD 21
const DBENG_FILENAME_TOO_LONG 22
const DBENG_NO_SUCH_TID 23
const DBENG_TABLE_LOCKED 24
const DBENG_RENAME_ERROR 25
const DBENG_INTERNAL_ERROR 26
const DBENG_FILE_DATA_ERROR 27
const DBENG_SOCLOC_NO_INIT 28
const DBENG_NO_SERVER 29
const DBENG_FAILOVER 30
const DBENG_BAD_IP 31
const DBENG_NO_CATALOG_ENTRY 32
const DBENG_CATALOG_ENTRY_EXISTS 33
const DBENG_RECORD_POSITION_CHANGED 34
const DBENG_REPLICATION_NOT_ACTIVE 35
const DBENG_NO_REPLICATION_ENTRY 36
const DBENG_TABLE_IN_USE 37
const DBENG_NO_INIT 38
const DBENG_NO_CATALOG 39
const DBENG_VC_ERROR $SOCKET_RC_VC_ERROR

# configuration codes
const DBENG_CONFIG_INVALID_PARAMETER 40
const DBENG_CONFIG_PARAMETER_MISSING 41
const DBENG_CONFIG_UNABLE_TO_OPEN 42
const DBENG_CONFIG_TMP_PATH_SIZE 43
const DBENG_CONFIG_LOG_SIZE 44
const DBENG_CONFIG_SESSION_TABLE_SIZE 45
const DBENG_CONFIG_INVALID_TMP_PATH 46
const DBENG_CONFIG_INVALID_LOG 47
const DBENG_CONFIG_INVALID_SESSION_TABLE 48
const DBENG_CONFIG_INVALID_CATALOG 49

# send message types
const DBENG_SEND_OPEN 60
const DBENG_SEND_CLOSE 61
const DBENG_SEND_NEXT 62
const DBENG_SEND_TOP 63
const DBENG_SEND_GET_REC 64
const DBENG_SEND_GET_FIELD 65
const DBENG_SEND_GOTO 66
const DBENG_SEND_COUNT 67
const DBENG_SEND_PUT_FIELD 68
const DBENG_SEND_WRITE 69
const DBENG_SEND_DELETE 70
const DBENG_SEND_GET_DELETE_FLAG 71
const DBENG_SEND_SET_DELETE_FLAG 72
const DBENG_SEND_GET_NFIELDS 73
const DBENG_SEND_GET_REC_SIZE 74
const DBENG_SEND_GET_FIELD_SIZE 75
const DBENG_SEND_GET_REC_NUM 76
const DBENG_SEND_GET_POS 77
const DBENG_SEND_SET_POS 78
const DBENG_SEND_GET_CHANGE_REC_FLAG 79
const DBENG_SEND_SET_CHANGE_REC_FLAG 80
const DBENG_SEND_PACK 81
const DBENG_SEND_NEW 82
const DBENG_SEND_FIND 83
const DBENG_SEND_FIND_FIELD 84
const DBENG_SEND_FIND_PART 85
const DBENG_SEND_FIND_FIELD_PART 86
const DBENG_SEND_GET_REC_COUNT 87
const DBENG_SEND_GET_ENF_CHANGE_REC_FLAG 88
const DBENG_SEND_SET_ENF_CHANGE_REC_FLAG 89
const DBENG_SEND_GET_IS_TABLE_LOCKED 90
const DBENG_SEND_SET_IS_TABLE_LOCKED 91
const DBENG_SEND_NEW_TABLE 92
const DBENG_SEND_GET_TMP_PATH 93
const DBENG_SEND_GET_LOG 94
const DBENG_SEND_GET_SESSION 95
const DBENG_SEND_GET_CATALOG 96
const DBENG_SEND_GET_LOG_FLAG 97
const DBENG_SEND_GET_SESSION_FLAG 98
const DBENG_SEND_GET_CATALOG_FLAG 99
const DBENG_SEND_GET_DBENG_VERSION 100
const DBENG_SEND_SET_TMP_PATH 101
const DBENG_SEND_SET_SESSION 102
const DBENG_SEND_SET_CATALOG 103
const DBENG_SEND_SET_LOG_FLAG 104
const DBENG_SEND_SET_SESSION_FLAG 105
const DBENG_SEND_SET_CATALOG_FLAG 106
const DBENG_SEND_GET_OPEN_TABLE_LIST 107
const DBENG_SEND_GET_NSUBFIELDS 108
const DBENG_SEND_GET_SUBFIELD_SIZE 109
const DBENG_SEND_GET_SUBFIELD 110
const DBENG_SEND_PUT_SUBFIELD 111
const DBENG_SEND_GET_NSUBSUBFIELDS 112
const DBENG_SEND_GET_SUBSUBFIELD_SIZE 113
const DBENG_SEND_GET_SUBSUBFIELD 114
const DBENG_SEND_PUT_SUBSUBFIELD 115
const DBENG_SEND_REPLICATE 116
const DBENG_SEND_GET_REPLICATE_FLAG 117
const DBENG_SEND_SET_REPLICATE_FLAG 118
const DBENG_SEND_REPLICATE_UPDATE 119
const DBENG_SEND_DELETE_TABLE 120
const DBENG_SEND_EXIST 121
const DBENG_SEND_CLEAR_TABLE 122
const DBENG_SEND_COPY_TABLE 123
const DBENG_SEND_GET_CATALOG_LIST 124
const DBENG_SEND_SORT 125
const DBENG_SEND_GET_SORT_MEM 126
const DBENG_SEND_SET_SORT_MEM 127
const DBENG_SEND_GET_SORT_OPEN_BIN 128
const DBENG_SEND_SET_SORT_OPEN_BIN 129
const DBENG_SEND_DELETE_FIELD 130
const DBENG_SEND_DELETE_SUBFIELD 131
const DBENG_SEND_DELETE_SUBSUBFIELD 132
const DBENG_SEND_GET_AUTOPACK 133
const DBENG_SEND_SET_AUTOPACK 134
const DBENG_SEND_SET_LOG 135
const DBENG_SEND_TERM $SOCKET_SEND_TERM
const DBENG_SEND_STATUS $SOCKET_SEND_STATUS
const DBENG_SEND_LOG_OFF $SOCKET_SEND_LOG_OFF
const DBENG_SEND_LOG_ON $SOCKET_SEND_LOG_ON
const DBENG_SEND_LOG_STATUS $SOCKET_SEND_LOG_STATUS
const DBENG_SEND_SERVICE_NAME $SOCKET_SEND_SERVICE_NAME
const DBENG_SEND_VERSION $SOCKET_SEND_VERSION
const DBENG_SEND_TRANS_NUM $SOCKET_SEND_TRANS_NUM
const DBENG_SEND_CONNECT_NUM $SOCKET_SEND_CONNECT_NUM

# delimiter for any item returning a list
const DBENG_LIST_DELIM "^"

# service name for 'socloc'
const DBENG_SERVICE_NAME "Bbuuzzb"

# database engine version ID
const DBENG_VERSION ".61.02-2006.05.09"
