From 45d5e3aa7aca2c8ee70157caed8e537d449ce58a Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Mon, 3 Jun 2019 11:45:00 -0300 Subject: [PATCH] Refactor public include files (#205) Refactor include files. --- .../win32/BuildExecutableInstall.bat | 37 - .../arch-specific/win32/strip_comments.sed | 82 -- builds/posix/Makefile.in | 22 +- builds/win32/make_all.bat | 21 +- src/alice/alice.cpp | 2 +- src/alice/alice.h | 2 +- src/alice/alice_meta.epp | 2 +- src/alice/aliceswi.h | 2 +- src/alice/exe.cpp | 2 +- src/alice/tdr.cpp | 2 +- src/auth/AuthDbg.cpp | 2 +- src/auth/SecureRemotePassword/Message.h | 2 +- .../manage/SrpManagement.cpp | 2 +- src/auth/SecurityDatabase/LegacyClient.cpp | 2 +- .../SecurityDatabase/LegacyManagement.epp | 2 +- src/auth/SecurityDatabase/LegacyServer.cpp | 2 +- src/auth/SecurityDatabase/LegacyServer.h | 2 +- src/auth/trusted/AuthSspi.h | 2 +- src/burp/burp.cpp | 2 +- src/burp/burp.h | 2 +- src/burp/burpswi.h | 2 +- src/common/Auth.cpp | 2 +- src/common/IntlParametersBlock.cpp | 2 +- src/common/StatementMetadata.cpp | 4 +- src/common/call_service.h | 2 +- src/common/classes/BlobWrapper.cpp | 2 +- src/common/classes/BlrWriter.cpp | 4 +- src/common/classes/ClumpletReader.cpp | 2 +- src/common/classes/ClumpletWriter.cpp | 3 +- src/common/classes/ImplementHelper.h | 2 +- src/common/classes/InternalMessageBuffer.cpp | 4 +- src/common/classes/NoThrowTimeStamp.h | 2 +- src/common/classes/UserBlob.cpp | 2 +- src/common/dsc.cpp | 2 +- src/common/dsc.h | 4 +- src/common/isc.cpp | 2 +- src/common/pretty.cpp | 2 +- src/common/sdl.cpp | 2 +- src/common/utils.cpp | 4 +- src/dsql/AggNodes.cpp | 2 +- src/dsql/AggNodes.h | 2 +- src/dsql/BlrDebugWriter.cpp | 4 +- src/dsql/BoolNodes.cpp | 2 +- src/dsql/BoolNodes.h | 2 +- src/dsql/DdlNodes.epp | 2 +- src/dsql/DdlNodes.h | 2 +- src/dsql/DsqlCompilerScratch.cpp | 2 +- src/dsql/ExprNodes.cpp | 2 +- src/dsql/ExprNodes.h | 2 +- src/dsql/StmtNodes.cpp | 2 +- src/dsql/StmtNodes.h | 2 +- src/dsql/WinNodes.h | 2 +- src/dsql/ddl.cpp | 2 +- src/dsql/dsql.cpp | 2 +- src/dsql/gen.cpp | 2 +- src/dsql/make.cpp | 2 +- src/dsql/metd.epp | 2 +- src/dsql/parse.y | 2 +- src/dsql/pass1.cpp | 4 +- src/dsql/sqlda.h | 2 +- src/dsql/utld.cpp | 2 +- src/gpre/boot/gpre_meta_boot.cpp | 2 +- src/gpre/c_cxx.cpp | 2 +- src/gpre/cmd.cpp | 2 +- src/gpre/cme.cpp | 2 +- src/gpre/cmp.cpp | 2 +- src/gpre/exp.cpp | 2 +- src/gpre/gpre.h | 4 +- src/gpre/int_cxx.cpp | 2 +- src/gpre/jrdmet.cpp | 2 +- src/gpre/languages/ada.cpp | 2 +- src/gpre/languages/cob.cpp | 2 +- src/gpre/languages/fbrmclib.cpp | 10 +- src/gpre/languages/ftn.cpp | 2 +- src/gpre/languages/pas.cpp | 2 +- src/gpre/languages/rmc.cpp | 2 +- src/gpre/obj_cxx.cpp | 2 +- src/gpre/par.cpp | 2 +- src/gpre/sql.cpp | 2 +- src/gpre/std/gpre_meta.epp | 2 +- src/include/fb_types.h | 2 +- src/{jrd => include/firebird/impl}/blr.h | 6 +- src/include/{ => firebird/impl}/consts_pub.h | 6 +- .../firebird/impl}/dsc_pub.h | 6 +- src/{jrd => include/firebird/impl}/inf_pub.h | 7 +- .../firebird/impl}/sqlda_pub.h | 7 +- src/include/{ => firebird/impl}/types_pub.h | 6 +- src/include/ibase.h | 1193 +++++++++++++++- src/isql/extract.epp | 2 +- src/isql/isql.epp | 2 +- src/isql/isqlswi.h | 2 +- src/isql/iutils.cpp | 2 +- src/isql/show.epp | 2 +- src/jrd/CryptoManager.cpp | 2 +- src/jrd/ExtEngineManager.cpp | 6 +- src/jrd/PreparedStatement.cpp | 2 +- src/jrd/ResultSet.cpp | 2 +- src/jrd/align.h | 2 +- src/jrd/evl.cpp | 2 +- src/jrd/exe.cpp | 2 +- src/jrd/extds/InternalDS.cpp | 2 +- src/jrd/ibase.h | 1206 ----------------- src/jrd/recsrc/RecordSource.h | 2 +- src/jrd/replication/Applier.cpp | 4 +- src/jrd/replication/Publisher.cpp | 2 +- src/jrd/svc.h | 4 +- src/jrd/trace/TraceCmdLine.cpp | 2 +- src/jrd/trace/TraceService.cpp | 6 +- src/jrd/trace/TraceService.h | 2 +- src/jrd/validation.cpp | 2 +- src/misc/codes.epp | 2 +- src/misc/headers.sed | 9 - src/misc/ibase_header.txt | 11 - src/misc/makeHeader.cpp | 83 -- src/msgs/build_file.epp | 2 +- src/msgs/change_msgs.epp | 2 +- src/msgs/check_msgs.epp | 2 +- src/msgs/enter_msgs.epp | 2 +- src/msgs/load.epp | 2 +- src/msgs/modify_msgs.epp | 2 +- src/plugins/udr_engine/UdrEngine.cpp | 2 +- src/qli/command.cpp | 2 +- src/qli/dtr.cpp | 2 +- src/qli/eval.cpp | 2 +- src/qli/exe.cpp | 2 +- src/qli/format.cpp | 2 +- src/qli/gener.cpp | 2 +- src/qli/help.epp | 2 +- src/qli/lex.cpp | 2 +- src/qli/meta.epp | 2 +- src/qli/proc.epp | 2 +- src/qli/qliswi.h | 2 +- src/qli/show.epp | 2 +- src/remote/client/BlrFromMessage.cpp | 2 +- src/remote/client/interface.cpp | 2 +- src/remote/inet.cpp | 2 +- src/remote/merge.cpp | 2 +- src/remote/os/win32/wnet.cpp | 2 +- src/remote/os/win32/xnet.cpp | 2 +- src/remote/parser.cpp | 2 +- src/remote/remote.cpp | 2 +- src/remote/server/ReplServer.cpp | 2 +- src/remote/server/os/posix/inet_server.cpp | 4 +- src/remote/server/os/win32/chop.cpp | 2 +- src/remote/server/os/win32/cntl.cpp | 2 +- src/remote/server/os/win32/property.cpp | 2 +- src/remote/server/os/win32/window.cpp | 2 +- src/remote/server/server.cpp | 4 +- src/utilities/cache.cpp | 2 +- src/utilities/create_db.cpp | 2 +- src/utilities/fbcpl/stdafx.h | 2 +- src/utilities/fbsvcmgr/fbsvcmgr.cpp | 2 +- src/utilities/fbtracemgr/traceMgrMain.cpp | 2 +- src/utilities/gsec/gsec.cpp | 2 +- src/utilities/gstat/dba.epp | 2 +- src/utilities/gstat/ppg.cpp | 2 +- src/utilities/ibmgr/ibmgr.cpp | 2 +- src/utilities/ibmgr/srvrmgr.cpp | 2 +- src/utilities/nbackup/nbackup.cpp | 2 +- src/utilities/ntrace/TracePluginImpl.cpp | 6 +- src/utilities/print_pool.cpp | 2 +- src/utilities/rebuild/rebuild.cpp | 2 +- src/utilities/rebuild/rmet.epp | 2 +- src/utilities/rebuild/rstore.epp | 2 +- src/utilities/run_service.cpp | 2 +- src/utilities/stats.epp | 2 +- src/yvalve/DistributedTransaction.cpp | 2 +- src/yvalve/MasterImplementation.cpp | 2 +- src/yvalve/PluginManager.cpp | 4 +- src/yvalve/YObjects.h | 14 +- src/yvalve/alt.cpp | 4 +- src/yvalve/array.epp | 4 +- src/yvalve/blob.epp | 2 +- src/yvalve/gds.cpp | 4 +- src/yvalve/perf.cpp | 2 +- src/yvalve/utl.cpp | 2 +- src/yvalve/why.cpp | 331 ++--- src/yvalve/why_proto.h | 225 +-- 178 files changed, 1579 insertions(+), 2066 deletions(-) delete mode 100644 builds/install/arch-specific/win32/strip_comments.sed rename src/{jrd => include/firebird/impl}/blr.h (99%) rename src/include/{ => firebird/impl}/consts_pub.h (99%) rename src/{common => include/firebird/impl}/dsc_pub.h (95%) rename src/{jrd => include/firebird/impl}/inf_pub.h (99%) rename src/{dsql => include/firebird/impl}/sqlda_pub.h (97%) rename src/include/{ => firebird/impl}/types_pub.h (98%) delete mode 100644 src/jrd/ibase.h delete mode 100644 src/misc/headers.sed delete mode 100644 src/misc/ibase_header.txt delete mode 100644 src/misc/makeHeader.cpp diff --git a/builds/install/arch-specific/win32/BuildExecutableInstall.bat b/builds/install/arch-specific/win32/BuildExecutableInstall.bat index 31f4d6e2dd..db2b0426aa 100644 --- a/builds/install/arch-specific/win32/BuildExecutableInstall.bat +++ b/builds/install/arch-specific/win32/BuildExecutableInstall.bat @@ -425,39 +425,6 @@ if %MSVC_VERSION% EQU 15 ( @goto :EOF -:IBASE_H -:: Concatenate header files into ibase.h -::====================================== -:: o This section of code takes several header files, strips license -:: boiler plates and comments and inserts them into ibase.h for -:: distribution. The only drawback is that it strips all the comments. -:: o No error checking is done. -:: o Take note that different versions of sed use different -:: string delimiters. The firebird_tools version uses double quotes - ". -:: The cygwin one probably uses single quotes. -:: o The script 'strip_comments.sed' is taken from -:: http://sed.sourceforge.net/grabbag/scripts/testo.htm - -setlocal -set OUTPATH=%FB_OUTPUT_DIR%\include -copy %FB_ROOT_PATH%\src\jrd\ibase.h %OUTPATH%\ibase.h > nul -for %%v in ( %FB_ROOT_PATH%\src\include\types_pub.h %FB_ROOT_PATH%\src\include\consts_pub.h %FB_ROOT_PATH%\src\dsql\sqlda_pub.h %FB_ROOT_PATH%\src\common\dsc_pub.h %FB_ROOT_PATH%\src\jrd\inf_pub.h %FB_ROOT_PATH%\src\jrd\blr.h ) do ( - del %OUTPATH%\%%~nxv 2> nul - copy %%v %OUTPATH%\%%~nxv > nul - sed -n -f strip_comments.sed %OUTPATH%\%%~nxv > %OUTPATH%\%%~nv.more || call :ERROR Stripping comments from %%v failed. - - more /s %OUTPATH%\%%~nv.more > %OUTPATH%\%%~nv.sed -) -move /y %OUTPATH%\ibase.h %OUTPATH%\ibase.sed -sed -e "/#include \"types_pub\.h\"/r %OUTPATH%\types_pub.sed" -e "/#include \"types_pub\.h\"/d" -e "/#include \"consts_pub\.h\"/r %OUTPATH%\consts_pub.sed" -e "/#include \"consts_pub\.h\"/d" -e "/#include \"..\/common\/dsc_pub\.h\"/r %OUTPATH%\dsc_pub.sed" -e "/#include \"..\/common\/dsc_pub\.h\"/d" -e "/#include \"..\/dsql\/sqlda_pub\.h\"/r %OUTPATH%\sqlda_pub.sed" -e "/#include \"..\/dsql\/sqlda_pub\.h\"/d" -e "/#include \"blr\.h\"/r %OUTPATH%\blr.sed" -e "/#include \"blr\.h\"/d" -e "/#include \"..\/jrd\/inf_pub\.h\"/r %OUTPATH%\inf_pub.sed" -e "/#include \"..\/jrd\/inf_pub\.h\"/d" %OUTPATH%\ibase.sed > %OUTPATH%\ibase.h -del %OUTPATH%\ibase.sed %OUTPATH%\types_pub.* %OUTPATH%\consts_pub.* %OUTPATH%\sqlda_pub.* %OUTPATH%\dsc_pub.* %OUTPATH%\inf_pub.* %OUTPATH%\blr.* -endlocal - -::End of IBASE_H -::-------------- -@goto :EOF - - :INCLUDE_DIR :: Prepare other files needed for deployment to /include dir setlocal @@ -791,10 +758,6 @@ if defined WIX ( @echo. ) -@echo Concatenating header files for ibase.h -@(@call :IBASE_H ) || (@echo Error calling IBASE_H && @goto :END) -@echo. - @echo Prepare include directory @(@call :INCLUDE_DIR ) || (@echo Error calling INCLUDE_DIR && @goto :END) @echo. diff --git a/builds/install/arch-specific/win32/strip_comments.sed b/builds/install/arch-specific/win32/strip_comments.sed deleted file mode 100644 index 125efd4661..0000000000 --- a/builds/install/arch-specific/win32/strip_comments.sed +++ /dev/null @@ -1,82 +0,0 @@ -: loop - -/^\/\// s,.*,, - -/^$/{ - x - p - n - b loop -} -/^"/{ - : double - /^$/{ - x - p - n - /^"/b break - b double - } - - H - x - s,\n\(.[^\"]*\).*,\1, - x - s,.[^\"]*,, - - /^"/b break - /^\\/{ - H - x - s,\n\(.\).*,\1, - x - s/.// - } - b double -} - -/^'/{ - : single - /^$/{ - x - p - n - /^'/b break - b single - } - H - x - s,\n\(.[^\']*\).*,\1, - x - s,.[^\']*,, - - /^'/b break - /^\\/{ - H - x - s,\n\(.\).*,\1, - x - s/.// - } - b single -} - -/^\/\*/{ - s/.// - : ccom - s,^.[^*]*,, - /^$/ n - /^\*\//{ - s/..// - b loop - } - b ccom -} - -: break -H -x -s,\n\(.[^"'/]*\).*,\1, -x -s/.[^"'/]*// -b loop \ No newline at end of file diff --git a/builds/posix/Makefile.in b/builds/posix/Makefile.in index 969381c46f..c815fba779 100644 --- a/builds/posix/Makefile.in +++ b/builds/posix/Makefile.in @@ -102,7 +102,7 @@ API_PAS_FILE=$(SRC_ROOT)/include/gen/Firebird.pas PAS_ROOT=$(SRC_ROOT)/misc/pascal PASCAL_SOURCES=$(wildcard $(PAS_ROOT)/*) TMP_FUNCS=$(TMP_ROOT)/func.pas -XPB_CONSTS=$(SRC_ROOT)/include/consts_pub.h +XPB_CONSTS=$(SRC_ROOT)/include/firebird/impl/consts_pub.h ERR_CONSTS=$(ROOT)/lang_helpers/gds_codes.pas updateCloopInterfaces : $(API_H_FILE) $(API_PAS_FILE) @@ -646,31 +646,17 @@ NEW_INCLUDES_SRC = $(shell find $(SRC_ROOT)/include/firebird -type f) NEW_INCLUDES_DEST = $(patsubst $(SRC_ROOT)/include/firebird/%, $(INCLUDE_DEST)/firebird/%, $(NEW_INCLUDES_SRC)) include_generic: $(INCLUDE_DEST)/ib_util.h \ - $(INCLUDE_DEST)/ibase.h \ $(NEW_INCLUDES_DEST) # ib_util.h actually is a marker for a number of headers -# All these files are #included in ibase.h. Here we cat them all together -# and remove the embedded #includes to make it simpler for external usage. - -IBASE_ExtraFiles = include/types_pub.h include/consts_pub.h dsql/sqlda_pub.h common/dsc_pub.h jrd/ibase.h jrd/inf_pub.h jrd/blr.h include/gen/iberror.h -SRC_IBASE_ExtraFiles = $(addprefix $(SRC_ROOT)/, $(IBASE_ExtraFiles)) -MAKE_HEADER_Src = $(addprefix $(SRC_ROOT)/, misc/makeHeader.cpp) -MAKE_HEADER_Bin = ./makeHeader - -$(INCLUDE_DEST)/ibase.h: $(SRC_IBASE_ExtraFiles) - $(STATICEXE_LINK) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src) - $(CP) $^ . - $(MAKE_HEADER_Bin) $@ - $(RM) -f ibase.h - # Copy all the other headers to the distribution directory. We use # ib_util.h as the marker for all the files. OtherDistribHeaders = extlib/ib_util.h \ yvalve/perf.h \ - include/gen/iberror.h + include/gen/iberror.h \ + include/ibase.h SRC_OtherDistribHeaders = $(addprefix $(SRC_ROOT)/, $(OtherDistribHeaders)) @@ -719,7 +705,7 @@ clean_vers: $(RM) *.vers clean_misc: - $(RM) makeHeader ods.txt odstest* security.tmp test.header.txt + $(RM) ods.txt odstest* security.tmp test.header.txt ifeq ($(EDITLINE_FLG),Y) ifeq ($(STD_EDITLINE),false) diff --git a/builds/win32/make_all.bat b/builds/win32/make_all.bat index 46375e3ac1..a5a24ecd05 100644 --- a/builds/win32/make_all.bat +++ b/builds/win32/make_all.bat @@ -84,26 +84,7 @@ findstr /V "@UDF_COMMENT@" %FB_ROOT_PATH%\builds\install\misc\firebird.conf.in > @copy %FB_ROOT_PATH%\doc\README.* %FB_OUTPUT_DIR%\doc >nul @copy %FB_ROOT_PATH%\doc\sql.extensions\README.* %FB_OUTPUT_DIR%\doc\sql.extensions >nul -:: HEADERS -:: Don't use this ibase.h unless you have to - we build it better in BuildExecutableInstall.bat -:: This variation doesn't clean up the license templates, and processes the component files in -:: a different order to that used in the production version. However, this version doesn't -:: have a dependancy upon sed while the production one does. -echo #pragma message("Non-production version of ibase.h.") > %FB_OUTPUT_DIR%\include\ibase.tmp -echo #pragma message("Using raw, unprocessed concatenation of header files.") >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\misc\ibase_header.txt >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\include\types_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\common\dsc_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\dsql\sqlda_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\jrd\ibase.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\jrd\inf_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\include\consts_pub.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\jrd\blr.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -type %FB_ROOT_PATH%\src\include\gen\iberror.h >> %FB_OUTPUT_DIR%\include\ibase.tmp -sed -f %FB_ROOT_PATH%\src\misc\headers.sed < %FB_OUTPUT_DIR%\include\ibase.tmp > %FB_OUTPUT_DIR%\include\ibase.h -del %FB_OUTPUT_DIR%\include\ibase.tmp > nul - -:: Additional headers +:: Headers copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul copy %FB_ROOT_PATH%\src\jrd\perf.h %FB_OUTPUT_DIR%\include >nul copy %FB_ROOT_PATH%\src\include\gen\iberror.h %FB_OUTPUT_DIR%\include > nul diff --git a/src/alice/alice.cpp b/src/alice/alice.cpp index 561b04ee29..a99848a779 100644 --- a/src/alice/alice.cpp +++ b/src/alice/alice.cpp @@ -40,7 +40,7 @@ #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/license.h" #include "../alice/alice.h" #include "../alice/exe_proto.h" diff --git a/src/alice/alice.h b/src/alice/alice.h index 6c73796438..0648f297ac 100644 --- a/src/alice/alice.h +++ b/src/alice/alice.h @@ -26,7 +26,7 @@ #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/ThreadData.h" #include "../include/fb_blk.h" #include "../common/classes/alloc.h" diff --git a/src/alice/alice_meta.epp b/src/alice/alice_meta.epp index ca42bf6091..fc99727e19 100644 --- a/src/alice/alice_meta.epp +++ b/src/alice/alice_meta.epp @@ -29,7 +29,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../alice/alice.h" #include "../alice/alice_meta.h" #include "../yvalve/gds_proto.h" diff --git a/src/alice/aliceswi.h b/src/alice/aliceswi.h index ef8b28bed4..f866d6cb44 100644 --- a/src/alice/aliceswi.h +++ b/src/alice/aliceswi.h @@ -22,7 +22,7 @@ #ifndef ALICE_ALICESWI_H #define ALICE_ALICESWI_H -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/constants.h" // switch definitions diff --git a/src/alice/exe.cpp b/src/alice/exe.cpp index 1118dae18f..727be92517 100644 --- a/src/alice/exe.cpp +++ b/src/alice/exe.cpp @@ -36,7 +36,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../alice/alice.h" #include "../alice/alice_proto.h" #include "../common/classes/Switches.h" diff --git a/src/alice/tdr.cpp b/src/alice/tdr.cpp index cbeba9f605..eb28702c21 100644 --- a/src/alice/tdr.cpp +++ b/src/alice/tdr.cpp @@ -35,7 +35,7 @@ #include #include #include "memory_routines.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../alice/alice.h" #include "../common/classes/Switches.h" #include "../alice/aliceswi.h" diff --git a/src/auth/AuthDbg.cpp b/src/auth/AuthDbg.cpp index 94d58be706..3b27994add 100644 --- a/src/auth/AuthDbg.cpp +++ b/src/auth/AuthDbg.cpp @@ -27,7 +27,7 @@ #include "firebird.h" #include "../auth/AuthDbg.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/StatusHolder.h" #ifdef AUTH_DEBUG diff --git a/src/auth/SecureRemotePassword/Message.h b/src/auth/SecureRemotePassword/Message.h index 7799e769ee..3f026b4a88 100644 --- a/src/auth/SecureRemotePassword/Message.h +++ b/src/auth/SecureRemotePassword/Message.h @@ -9,7 +9,7 @@ #include "../common/classes/alloc.h" #include "../common/StatusHolder.h" #include "../common/classes/ImplementHelper.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #else // INTERNAL_FIREBIRD diff --git a/src/auth/SecureRemotePassword/manage/SrpManagement.cpp b/src/auth/SecureRemotePassword/manage/SrpManagement.cpp index 9c6774f867..7b8b0f8cad 100644 --- a/src/auth/SecureRemotePassword/manage/SrpManagement.cpp +++ b/src/auth/SecureRemotePassword/manage/SrpManagement.cpp @@ -32,7 +32,7 @@ #include "firebird/Interface.h" #include "../auth/SecureRemotePassword/srp.h" #include "../jrd/constants.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../utilities/gsec/gsec.h" #include "../auth/SecureRemotePassword/Message.h" #include "../common/classes/auto.h" diff --git a/src/auth/SecurityDatabase/LegacyClient.cpp b/src/auth/SecurityDatabase/LegacyClient.cpp index ae665c318d..0e1f68a610 100644 --- a/src/auth/SecurityDatabase/LegacyClient.cpp +++ b/src/auth/SecurityDatabase/LegacyClient.cpp @@ -26,7 +26,7 @@ * */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../auth/SecurityDatabase/LegacyClient.h" #include "../auth/SecurityDatabase/LegacyHash.h" #include "../common/enc_proto.h" diff --git a/src/auth/SecurityDatabase/LegacyManagement.epp b/src/auth/SecurityDatabase/LegacyManagement.epp index c9c4b0a9d7..8e0caf06ee 100644 --- a/src/auth/SecurityDatabase/LegacyManagement.epp +++ b/src/auth/SecurityDatabase/LegacyManagement.epp @@ -27,7 +27,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../auth/SecurityDatabase/LegacyHash.h" #include "../common/enc_proto.h" #include "../yvalve/gds_proto.h" diff --git a/src/auth/SecurityDatabase/LegacyServer.cpp b/src/auth/SecurityDatabase/LegacyServer.cpp index 3f513691ca..9cdfb7c43f 100644 --- a/src/auth/SecurityDatabase/LegacyServer.cpp +++ b/src/auth/SecurityDatabase/LegacyServer.cpp @@ -27,7 +27,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../auth/SecurityDatabase/LegacyServer.h" #include "../auth/SecurityDatabase/LegacyHash.h" #include "../common/enc_proto.h" diff --git a/src/auth/SecurityDatabase/LegacyServer.h b/src/auth/SecurityDatabase/LegacyServer.h index 47e476a9c7..7ab7683aba 100644 --- a/src/auth/SecurityDatabase/LegacyServer.h +++ b/src/auth/SecurityDatabase/LegacyServer.h @@ -27,7 +27,7 @@ #ifndef AUTH_LEGACY_SERVER_H #define AUTH_LEGACY_SERVER_H -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/utils_proto.h" #include "../common/sha.h" #include "gen/iberror.h" diff --git a/src/auth/trusted/AuthSspi.h b/src/auth/trusted/AuthSspi.h index bbf33deedd..5c11c0760b 100644 --- a/src/auth/trusted/AuthSspi.h +++ b/src/auth/trusted/AuthSspi.h @@ -39,7 +39,7 @@ #include <../common/classes/fb_string.h> #include <../common/classes/array.h> #include "../common/classes/ImplementHelper.h" -#include <../jrd/ibase.h> +#include #include "firebird/Interface.h" #include "../common/classes/objects_array.h" diff --git a/src/burp/burp.cpp b/src/burp/burp.cpp index 9777df8297..b1cc4a392f 100644 --- a/src/burp/burp.cpp +++ b/src/burp/burp.cpp @@ -36,7 +36,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include #include "../jrd/ibsetjmp.h" #include "../common/msg_encode.h" diff --git a/src/burp/burp.h b/src/burp/burp.h index cb98cbd96c..20b77a5afb 100644 --- a/src/burp/burp.h +++ b/src/burp/burp.h @@ -30,7 +30,7 @@ #define BURP_BURP_H #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "firebird/Interface.h" #include "firebird/Message.h" #include "../common/dsc.h" diff --git a/src/burp/burpswi.h b/src/burp/burpswi.h index a009e7a5b3..2cfc6e7758 100644 --- a/src/burp/burpswi.h +++ b/src/burp/burpswi.h @@ -28,7 +28,7 @@ #define BURP_BURPSWI_H #include "../jrd/constants.h" -#include "../jrd/ibase.h" +#include "ibase.h" /* Local copies of global variables. They will be copied into a data structure. */ diff --git a/src/common/Auth.cpp b/src/common/Auth.cpp index 1fdcb224cf..9d3a1a7099 100644 --- a/src/common/Auth.cpp +++ b/src/common/Auth.cpp @@ -27,7 +27,7 @@ #include "firebird.h" #include "../common/Auth.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/classes/ImplementHelper.h" #include "../common/utils_proto.h" #include "../common/db_alias.h" diff --git a/src/common/IntlParametersBlock.cpp b/src/common/IntlParametersBlock.cpp index 0a32545903..4d2391a309 100644 --- a/src/common/IntlParametersBlock.cpp +++ b/src/common/IntlParametersBlock.cpp @@ -29,7 +29,7 @@ #include "firebird.h" #include "../common/IntlParametersBlock.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "../common/isc_f_proto.h" #include "../common/classes/ClumpletWriter.h" #include "../common/UtilSvc.h" diff --git a/src/common/StatementMetadata.cpp b/src/common/StatementMetadata.cpp index ef6f9ee130..8291cce36c 100644 --- a/src/common/StatementMetadata.cpp +++ b/src/common/StatementMetadata.cpp @@ -26,10 +26,10 @@ #include "../common/StatementMetadata.h" #include "memory_routines.h" #include "../common/StatusHolder.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../yvalve/gds_proto.h" #include "../common/utils_proto.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" namespace Firebird { diff --git a/src/common/call_service.h b/src/common/call_service.h index eafc62cf47..aaccb014c0 100644 --- a/src/common/call_service.h +++ b/src/common/call_service.h @@ -24,7 +24,7 @@ #ifndef UTILITIES_GSEC_CALL_SERVICE_H #define UTILITIES_GSEC_CALL_SERVICE_H -#include "../jrd/ibase.h" +#include "ibase.h" #include "../utilities/gsec/gsec.h" #include "../common/security.h" diff --git a/src/common/classes/BlobWrapper.cpp b/src/common/classes/BlobWrapper.cpp index 6ae3d58164..2575d30fdb 100644 --- a/src/common/classes/BlobWrapper.cpp +++ b/src/common/classes/BlobWrapper.cpp @@ -24,7 +24,7 @@ #include "firebird.h" #include "BlobWrapper.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "firebird/Interface.h" static const USHORT SEGMENT_LIMIT = 65535; diff --git a/src/common/classes/BlrWriter.cpp b/src/common/classes/BlrWriter.cpp index 84d56df285..e6dc5dc5ac 100644 --- a/src/common/classes/BlrWriter.cpp +++ b/src/common/classes/BlrWriter.cpp @@ -19,11 +19,11 @@ */ #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "dyn_consts.h" #include "gen/iberror.h" #include "../common/classes/BlrWriter.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" namespace Firebird { diff --git a/src/common/classes/ClumpletReader.cpp b/src/common/classes/ClumpletReader.cpp index 13ff1eaf54..27729a3469 100644 --- a/src/common/classes/ClumpletReader.cpp +++ b/src/common/classes/ClumpletReader.cpp @@ -32,7 +32,7 @@ #include "../common/classes/MetaName.h" #include "fb_exception.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "firebird/Interface.h" #ifdef DEBUG_CLUMPLETS diff --git a/src/common/classes/ClumpletWriter.cpp b/src/common/classes/ClumpletWriter.cpp index 438d6d1ac5..c232281cd0 100644 --- a/src/common/classes/ClumpletWriter.cpp +++ b/src/common/classes/ClumpletWriter.cpp @@ -32,8 +32,7 @@ #include "../common/classes/ClumpletWriter.h" #include "../common/classes/MetaName.h" #include "fb_exception.h" - -#include "../jrd/ibase.h" +#include "ibase.h" namespace Firebird { diff --git a/src/common/classes/ImplementHelper.h b/src/common/classes/ImplementHelper.h index 34a7638977..092a80ed74 100644 --- a/src/common/classes/ImplementHelper.h +++ b/src/common/classes/ImplementHelper.h @@ -37,7 +37,7 @@ #include "../common/classes/auto.h" #include "../common/classes/RefCounted.h" #include "../common/StatusArg.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #ifdef DEV_BUILD #include #endif diff --git a/src/common/classes/InternalMessageBuffer.cpp b/src/common/classes/InternalMessageBuffer.cpp index 4976a9e135..fbd153763d 100644 --- a/src/common/classes/InternalMessageBuffer.cpp +++ b/src/common/classes/InternalMessageBuffer.cpp @@ -32,8 +32,8 @@ #include "../common/classes/BlrReader.h" #include "../common/gdsassert.h" #include "../common/MsgMetadata.h" -#include "../dsql/sqlda_pub.h" -#include "../jrd/blr.h" +#include "firebird/impl/sqlda_pub.h" +#include "firebird/impl/blr.h" namespace Firebird { diff --git a/src/common/classes/NoThrowTimeStamp.h b/src/common/classes/NoThrowTimeStamp.h index 440fac8e23..71ebf09b41 100644 --- a/src/common/classes/NoThrowTimeStamp.h +++ b/src/common/classes/NoThrowTimeStamp.h @@ -27,7 +27,7 @@ #ifndef CLASSES_NOTHROW_TIMESTAMP_H #define CLASSES_NOTHROW_TIMESTAMP_H -#include "../common/dsc_pub.h" +#include "firebird/impl/dsc_pub.h" // struct tm declaration #if defined(TIME_WITH_SYS_TIME) diff --git a/src/common/classes/UserBlob.cpp b/src/common/classes/UserBlob.cpp index 278ad44d85..57a1d566ba 100644 --- a/src/common/classes/UserBlob.cpp +++ b/src/common/classes/UserBlob.cpp @@ -22,7 +22,7 @@ */ #include "UserBlob.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" static const USHORT SEGMENT_LIMIT = 65535; diff --git a/src/common/dsc.cpp b/src/common/dsc.cpp index a9b97253d0..75810a1729 100644 --- a/src/common/dsc.cpp +++ b/src/common/dsc.cpp @@ -28,7 +28,7 @@ #include #include "../common/dsc.h" #include "../common/TimeZoneUtil.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/intl.h" #include "../yvalve/gds_proto.h" #include "../common/gdsassert.h" diff --git a/src/common/dsc.h b/src/common/dsc.h index ed2043c781..b7b78d078b 100644 --- a/src/common/dsc.h +++ b/src/common/dsc.h @@ -27,8 +27,8 @@ #ifndef JRD_DSC_H #define JRD_DSC_H -#include "../common/dsc_pub.h" -#include "consts_pub.h" +#include "firebird/impl/dsc_pub.h" +#include "firebird/impl/consts_pub.h" #include "../jrd/ods.h" #include "../intl/charsets.h" #include "../common/DecFloat.h" diff --git a/src/common/isc.cpp b/src/common/isc.cpp index acf4c4de79..390b66fbaa 100644 --- a/src/common/isc.cpp +++ b/src/common/isc.cpp @@ -41,7 +41,7 @@ #include #include "gen/iberror.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/scl.h" #include "../yvalve/gds_proto.h" #include "../common/isc_proto.h" diff --git a/src/common/pretty.cpp b/src/common/pretty.cpp index e4ba488406..b20c0c394a 100644 --- a/src/common/pretty.cpp +++ b/src/common/pretty.cpp @@ -31,7 +31,7 @@ #include "dyn_consts.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/constants.h" #include "../common/prett_proto.h" #include "../yvalve/gds_proto.h" diff --git a/src/common/sdl.cpp b/src/common/sdl.cpp index cf259b29ac..3080f4dbd7 100644 --- a/src/common/sdl.cpp +++ b/src/common/sdl.cpp @@ -23,7 +23,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/val.h" #include "../common/sdl.h" #include "../jrd/intl.h" diff --git a/src/common/utils.cpp b/src/common/utils.cpp index ece70a9d99..f4ecba2260 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -45,13 +45,13 @@ #include "../common/classes/locks.h" #include "../common/classes/init.h" #include "../jrd/constants.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../jrd/align.h" #include "../common/os/path_utils.h" #include "../common/os/fbsyslog.h" #include "../common/StatusArg.h" #include "../common/os/os_utils.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../common/classes/ClumpletReader.h" #include "../common/StatusArg.h" diff --git a/src/dsql/AggNodes.cpp b/src/dsql/AggNodes.cpp index c4f532e59f..067d31193f 100644 --- a/src/dsql/AggNodes.cpp +++ b/src/dsql/AggNodes.cpp @@ -22,7 +22,7 @@ #include "../dsql/AggNodes.h" #include "../dsql/ExprNodes.h" #include "../jrd/jrd.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/btr.h" #include "../jrd/exe.h" #include "../jrd/tra.h" diff --git a/src/dsql/AggNodes.h b/src/dsql/AggNodes.h index 8fdb789757..d63d0da693 100644 --- a/src/dsql/AggNodes.h +++ b/src/dsql/AggNodes.h @@ -23,7 +23,7 @@ #ifndef DSQL_AGG_NODES_H #define DSQL_AGG_NODES_H -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../dsql/Nodes.h" #include "../dsql/NodePrinter.h" diff --git a/src/dsql/BlrDebugWriter.cpp b/src/dsql/BlrDebugWriter.cpp index 7c60dff61b..4757e16cd1 100644 --- a/src/dsql/BlrDebugWriter.cpp +++ b/src/dsql/BlrDebugWriter.cpp @@ -20,7 +20,7 @@ */ #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "dyn_consts.h" #include "gen/iberror.h" #include "../jrd/jrd.h" @@ -28,7 +28,7 @@ #include "../dsql/BlrDebugWriter.h" #include "../dsql/StmtNodes.h" #include "../dsql/dsql.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/DebugInterface.h" #include "../dsql/errd_proto.h" diff --git a/src/dsql/BoolNodes.cpp b/src/dsql/BoolNodes.cpp index a5c3f30a72..205fc11cc2 100644 --- a/src/dsql/BoolNodes.cpp +++ b/src/dsql/BoolNodes.cpp @@ -24,7 +24,7 @@ #include "../dsql/ExprNodes.h" #include "../dsql/StmtNodes.h" #include "../jrd/align.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/tra.h" #include "../jrd/recsrc/RecordSource.h" #include "../jrd/recsrc/Cursor.h" diff --git a/src/dsql/BoolNodes.h b/src/dsql/BoolNodes.h index 0bbd47c7c0..b9a5964135 100644 --- a/src/dsql/BoolNodes.h +++ b/src/dsql/BoolNodes.h @@ -23,7 +23,7 @@ #ifndef DSQL_BOOL_NODES_H #define DSQL_BOOL_NODES_H -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../dsql/Nodes.h" namespace Jrd { diff --git a/src/dsql/DdlNodes.epp b/src/dsql/DdlNodes.epp index dac9af0e53..9c206a4624 100644 --- a/src/dsql/DdlNodes.epp +++ b/src/dsql/DdlNodes.epp @@ -24,7 +24,7 @@ #include "../dsql/BoolNodes.h" #include "../dsql/ExprNodes.h" #include "../dsql/StmtNodes.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/btr.h" #include "../jrd/dyn.h" #include "../jrd/flags.h" diff --git a/src/dsql/DdlNodes.h b/src/dsql/DdlNodes.h index 2957b646b3..ddf3378c8b 100644 --- a/src/dsql/DdlNodes.h +++ b/src/dsql/DdlNodes.h @@ -23,7 +23,7 @@ #ifndef DSQL_DDL_NODES_H #define DSQL_DDL_NODES_H -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/dyn.h" #include "../common/msg_encode.h" #include "../dsql/make_proto.h" diff --git a/src/dsql/DsqlCompilerScratch.cpp b/src/dsql/DsqlCompilerScratch.cpp index 4c0b2531f1..5d262613ed 100644 --- a/src/dsql/DsqlCompilerScratch.cpp +++ b/src/dsql/DsqlCompilerScratch.cpp @@ -24,7 +24,7 @@ #include "../dsql/ExprNodes.h" #include "../dsql/StmtNodes.h" #include "../jrd/jrd.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/RecordSourceNodes.h" #include "../dsql/ddl_proto.h" #include "../dsql/errd_proto.h" diff --git a/src/dsql/ExprNodes.cpp b/src/dsql/ExprNodes.cpp index 28e8a52c1d..106393f27e 100644 --- a/src/dsql/ExprNodes.cpp +++ b/src/dsql/ExprNodes.cpp @@ -28,7 +28,7 @@ #include "../dsql/BoolNodes.h" #include "../dsql/StmtNodes.h" #include "../jrd/align.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/tra.h" #include "../jrd/Function.h" #include "../jrd/SysFunction.h" diff --git a/src/dsql/ExprNodes.h b/src/dsql/ExprNodes.h index 3478e4056b..37372c08dc 100644 --- a/src/dsql/ExprNodes.h +++ b/src/dsql/ExprNodes.h @@ -23,7 +23,7 @@ #ifndef DSQL_EXPR_NODES_H #define DSQL_EXPR_NODES_H -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../dsql/Nodes.h" #include "../dsql/NodePrinter.h" #include "../dsql/pass1_proto.h" diff --git a/src/dsql/StmtNodes.cpp b/src/dsql/StmtNodes.cpp index f5ba3f3900..dc4ae280db 100644 --- a/src/dsql/StmtNodes.cpp +++ b/src/dsql/StmtNodes.cpp @@ -27,7 +27,7 @@ #include "../dsql/ExprNodes.h" #include "../dsql/StmtNodes.h" #include "../jrd/align.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/tra.h" #include "../jrd/Function.h" #include "../jrd/Optimizer.h" diff --git a/src/dsql/StmtNodes.h b/src/dsql/StmtNodes.h index d162ba5659..cdf6ad91f4 100644 --- a/src/dsql/StmtNodes.h +++ b/src/dsql/StmtNodes.h @@ -24,7 +24,7 @@ #define DSQL_STMT_NODES_H #include "../common/classes/MetaName.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/Function.h" #include "../jrd/extds/ExtDS.h" #include "../dsql/Nodes.h" diff --git a/src/dsql/WinNodes.h b/src/dsql/WinNodes.h index 34e9d96782..9ccbac3620 100644 --- a/src/dsql/WinNodes.h +++ b/src/dsql/WinNodes.h @@ -23,7 +23,7 @@ #ifndef DSQL_WIN_NODES_H #define DSQL_WIN_NODES_H -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../dsql/Nodes.h" #include "../dsql/NodePrinter.h" diff --git a/src/dsql/ddl.cpp b/src/dsql/ddl.cpp index b742ed9700..f62c9d4325 100644 --- a/src/dsql/ddl.cpp +++ b/src/dsql/ddl.cpp @@ -76,7 +76,7 @@ #include "../common/classes/MetaName.h" #include "../dsql/dsql.h" #include "../dsql/ExprNodes.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/Attachment.h" #include "../jrd/RecordSourceNodes.h" #include "../jrd/intl.h" diff --git a/src/dsql/dsql.cpp b/src/dsql/dsql.cpp index 8623f22e33..dcee054350 100644 --- a/src/dsql/dsql.cpp +++ b/src/dsql/dsql.cpp @@ -37,7 +37,7 @@ #include #include #include "../dsql/dsql.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/align.h" #include "../jrd/intl.h" #include "../common/intlobj_new.h" diff --git a/src/dsql/gen.cpp b/src/dsql/gen.cpp index 08501e4288..2a0bd96952 100644 --- a/src/dsql/gen.cpp +++ b/src/dsql/gen.cpp @@ -42,7 +42,7 @@ #include "../dsql/StmtNodes.h" #include "../dsql/DSqlDataTypeUtil.h" #include "../jrd/RecordSourceNodes.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/align.h" #include "../jrd/constants.h" #include "../jrd/intl.h" diff --git a/src/dsql/make.cpp b/src/dsql/make.cpp index e15f1d8117..3be3b340a9 100644 --- a/src/dsql/make.cpp +++ b/src/dsql/make.cpp @@ -39,7 +39,7 @@ #include "../dsql/dsql.h" #include "../dsql/Nodes.h" #include "../dsql/ExprNodes.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/intl.h" #include "../jrd/constants.h" #include "../jrd/align.h" diff --git a/src/dsql/metd.epp b/src/dsql/metd.epp index dcae270e32..a338643359 100644 --- a/src/dsql/metd.epp +++ b/src/dsql/metd.epp @@ -35,7 +35,7 @@ #include "firebird.h" #include #include "../dsql/dsql.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/align.h" #include "../jrd/intl.h" #include "../jrd/irq.h" diff --git a/src/dsql/parse.y b/src/dsql/parse.y index 0414f34457..083bef6383 100644 --- a/src/dsql/parse.y +++ b/src/dsql/parse.y @@ -83,7 +83,7 @@ #include "gen/iberror.h" #include "../dsql/dsql.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/flags.h" #include "../jrd/jrd.h" #include "../jrd/DataTypeUtil.h" diff --git a/src/dsql/pass1.cpp b/src/dsql/pass1.cpp index 7c0eb7bd82..ad81b65773 100644 --- a/src/dsql/pass1.cpp +++ b/src/dsql/pass1.cpp @@ -141,13 +141,13 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../dsql/dsql.h" #include "../dsql/Nodes.h" #include "../dsql/BoolNodes.h" #include "../dsql/ExprNodes.h" #include "../jrd/intl.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/jrd.h" #include "../jrd/constants.h" #include "../jrd/intl_classes.h" diff --git a/src/dsql/sqlda.h b/src/dsql/sqlda.h index a15d55c70f..1fd6174dc6 100644 --- a/src/dsql/sqlda.h +++ b/src/dsql/sqlda.h @@ -52,6 +52,6 @@ struct SQLDA #define SQLDA_LENGTH(n) (sizeof (SQLDA) + (n - 1) * sizeof (SQLVAR)) -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #endif // DSQL_SQLDA_H diff --git a/src/dsql/utld.cpp b/src/dsql/utld.cpp index 2e8d91ec44..94187dea4e 100644 --- a/src/dsql/utld.cpp +++ b/src/dsql/utld.cpp @@ -35,7 +35,7 @@ #include #include "../dsql/dsql.h" #include "../dsql/sqlda.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/align.h" #include "../jrd/constants.h" #include "../dsql/utld_proto.h" diff --git a/src/gpre/boot/gpre_meta_boot.cpp b/src/gpre/boot/gpre_meta_boot.cpp index 1f302c675b..a153cc6d74 100644 --- a/src/gpre/boot/gpre_meta_boot.cpp +++ b/src/gpre/boot/gpre_meta_boot.cpp @@ -30,7 +30,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../jrd/intl.h" #include "../gpre/gpre_proto.h" diff --git a/src/gpre/c_cxx.cpp b/src/gpre/c_cxx.cpp index e7098a8eb6..a927d9bede 100644 --- a/src/gpre/c_cxx.cpp +++ b/src/gpre/c_cxx.cpp @@ -33,7 +33,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" #include "../gpre/msc_proto.h" diff --git a/src/gpre/cmd.cpp b/src/gpre/cmd.cpp index fb854d1de4..30c98c00cf 100644 --- a/src/gpre/cmd.cpp +++ b/src/gpre/cmd.cpp @@ -30,7 +30,7 @@ #include "firebird.h" #include #include "../gpre/gpre.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/flags.h" #include "../gpre/cmd_proto.h" #include "../gpre/cme_proto.h" diff --git a/src/gpre/cme.cpp b/src/gpre/cme.cpp index 4801fa4684..cc0575d8c8 100644 --- a/src/gpre/cme.cpp +++ b/src/gpre/cme.cpp @@ -29,7 +29,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../jrd/intl.h" #include "../intl/charsets.h" diff --git a/src/gpre/cmp.cpp b/src/gpre/cmp.cpp index 77953e4100..c3f7580bdc 100644 --- a/src/gpre/cmp.cpp +++ b/src/gpre/cmp.cpp @@ -30,7 +30,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../jrd/align.h" #include "../gpre/cmd_proto.h" diff --git a/src/gpre/exp.cpp b/src/gpre/exp.cpp index 9c008eeb50..8b73d72dc4 100644 --- a/src/gpre/exp.cpp +++ b/src/gpre/exp.cpp @@ -30,7 +30,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../jrd/intl.h" #include "../gpre/cmp_proto.h" diff --git a/src/gpre/gpre.h b/src/gpre/gpre.h index 8eaca536d7..cd628bd33a 100644 --- a/src/gpre/gpre.h +++ b/src/gpre/gpre.h @@ -64,7 +64,7 @@ #include #include "dyn_consts.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/constants.h" #include "../common/utils_proto.h" @@ -87,7 +87,7 @@ const int MAX_DATABASES = 32; const int MAX_EVENT_SIZE = 16; // event names use 15 chars from old docs. // Values for SQL dialects. -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" // Language options diff --git a/src/gpre/int_cxx.cpp b/src/gpre/int_cxx.cpp index dfc5ec54c9..87d8345c03 100644 --- a/src/gpre/int_cxx.cpp +++ b/src/gpre/int_cxx.cpp @@ -30,7 +30,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../gpre/gpre_proto.h" #include "../gpre/lang_proto.h" diff --git a/src/gpre/jrdmet.cpp b/src/gpre/jrdmet.cpp index 856098f478..74162bf3df 100644 --- a/src/gpre/jrdmet.cpp +++ b/src/gpre/jrdmet.cpp @@ -27,7 +27,7 @@ // #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/constants.h" #include "../jrd/ods.h" diff --git a/src/gpre/languages/ada.cpp b/src/gpre/languages/ada.cpp index 49a8abfb05..80011fcefb 100644 --- a/src/gpre/languages/ada.cpp +++ b/src/gpre/languages/ada.cpp @@ -30,7 +30,7 @@ #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" #include "../gpre/cmp_proto.h" diff --git a/src/gpre/languages/cob.cpp b/src/gpre/languages/cob.cpp index 42e7a2c1b8..9011a055a9 100644 --- a/src/gpre/languages/cob.cpp +++ b/src/gpre/languages/cob.cpp @@ -42,7 +42,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" diff --git a/src/gpre/languages/fbrmclib.cpp b/src/gpre/languages/fbrmclib.cpp index ea7254a2a4..cc9fc289e4 100644 --- a/src/gpre/languages/fbrmclib.cpp +++ b/src/gpre/languages/fbrmclib.cpp @@ -46,7 +46,7 @@ #include "autoconfig.h" #endif #include "fb_types.h" -#include "../jrd/ibase.h" +#include "ibase.h" // Firebird transaction existence block (as defined in why.cpp) @@ -939,12 +939,12 @@ EXPORT RM_ENTRY(rmc_get_slice) (isc_db_handle *)arg_vector[1].a_address, (isc_tr_handle *)arg_vector[2].a_address, (ISC_QUAD *)arg_vector[3].a_address, - (short)*CobolToShort(&arg_vector[4]), - (char *)CobolToString(&arg_vector[5]), - (short)*CobolToShort(&arg_vector[6]), + *CobolToShort(&arg_vector[4]), + (ISC_UCHAR *)CobolToString(&arg_vector[5]), + *CobolToShort(&arg_vector[6]), (ISC_LONG *)CobolToInt(&arg_vector[7]), *CobolToInt(&arg_vector[8]), - (void *)arg_vector[9].a_address, + (ISC_LONG *)arg_vector[9].a_address, p1); IntToCobol(&arg_vector[11], (ISC_UINT64)p1); StatusToCobol(&arg_vector[0], stat); diff --git a/src/gpre/languages/ftn.cpp b/src/gpre/languages/ftn.cpp index 3b33d49c56..8de9e4206b 100644 --- a/src/gpre/languages/ftn.cpp +++ b/src/gpre/languages/ftn.cpp @@ -33,7 +33,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" diff --git a/src/gpre/languages/pas.cpp b/src/gpre/languages/pas.cpp index d3c46a9773..18b389e9a5 100644 --- a/src/gpre/languages/pas.cpp +++ b/src/gpre/languages/pas.cpp @@ -30,7 +30,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" #include "../gpre/cmp_proto.h" diff --git a/src/gpre/languages/rmc.cpp b/src/gpre/languages/rmc.cpp index 87e790ac4f..a6a0ee463a 100644 --- a/src/gpre/languages/rmc.cpp +++ b/src/gpre/languages/rmc.cpp @@ -28,7 +28,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" diff --git a/src/gpre/obj_cxx.cpp b/src/gpre/obj_cxx.cpp index a5811cf427..ecb6ea316c 100644 --- a/src/gpre/obj_cxx.cpp +++ b/src/gpre/obj_cxx.cpp @@ -33,7 +33,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../gpre/pat.h" #include "../gpre/msc_proto.h" diff --git a/src/gpre/par.cpp b/src/gpre/par.cpp index aea1a13d84..e67490a173 100644 --- a/src/gpre/par.cpp +++ b/src/gpre/par.cpp @@ -45,7 +45,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../gpre/cmp_proto.h" #include "../gpre/exp_proto.h" diff --git a/src/gpre/sql.cpp b/src/gpre/sql.cpp index 7aee62c30c..a2f65ec0e6 100644 --- a/src/gpre/sql.cpp +++ b/src/gpre/sql.cpp @@ -31,7 +31,7 @@ #include #include #include "../gpre/gpre.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/intl.h" #include "../jrd/constants.h" #include "../gpre/cme_proto.h" diff --git a/src/gpre/std/gpre_meta.epp b/src/gpre/std/gpre_meta.epp index 67c5a08e05..7e41ea317c 100644 --- a/src/gpre/std/gpre_meta.epp +++ b/src/gpre/std/gpre_meta.epp @@ -30,7 +30,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../gpre/gpre.h" #include "../jrd/intl.h" #include "../gpre/gpre_proto.h" diff --git a/src/include/fb_types.h b/src/include/fb_types.h index f93dc6defe..24ecf03d56 100644 --- a/src/include/fb_types.h +++ b/src/include/fb_types.h @@ -76,7 +76,7 @@ typedef ULONG ISC_ULONG; typedef SINT64 ISC_INT64; typedef FB_UINT64 ISC_UINT64; -#include "types_pub.h" +#include "firebird/impl/types_pub.h" typedef ISC_QUAD SQUAD; diff --git a/src/jrd/blr.h b/src/include/firebird/impl/blr.h similarity index 99% rename from src/jrd/blr.h rename to src/include/firebird/impl/blr.h index 25505ebd51..a524012f3b 100644 --- a/src/jrd/blr.h +++ b/src/include/firebird/impl/blr.h @@ -30,8 +30,8 @@ * Adriano dos Santos Fernandes */ -#ifndef JRD_BLR_H -#define JRD_BLR_H +#ifndef FIREBIRD_IMPL_BLR_H +#define FIREBIRD_IMPL_BLR_H #define BLR_WORD(x) UCHAR(x), UCHAR((x) >> 8) @@ -441,4 +441,4 @@ #define blr_at_local (unsigned char) 0 #define blr_at_zone (unsigned char) 1 -#endif // JRD_BLR_H +#endif // FIREBIRD_IMPL_BLR_H diff --git a/src/include/consts_pub.h b/src/include/firebird/impl/consts_pub.h similarity index 99% rename from src/include/consts_pub.h rename to src/include/firebird/impl/consts_pub.h index 60e6434987..6252c49775 100644 --- a/src/include/consts_pub.h +++ b/src/include/firebird/impl/consts_pub.h @@ -23,8 +23,8 @@ * */ -#ifndef INCLUDE_CONSTS_PUB_H -#define INCLUDE_CONSTS_PUB_H +#ifndef FIREBIRD_IMPL_CONSTS_PUB_H +#define FIREBIRD_IMPL_CONSTS_PUB_H /**********************************/ /* Database parameter block stuff */ @@ -737,4 +737,4 @@ #define fb_dbg_arg_input 0 #define fb_dbg_arg_output 1 -#endif // ifndef INCLUDE_CONSTS_PUB_H +#endif // ifndef FIREBIRD_IMPL_CONSTS_PUB_H diff --git a/src/common/dsc_pub.h b/src/include/firebird/impl/dsc_pub.h similarity index 95% rename from src/common/dsc_pub.h rename to src/include/firebird/impl/dsc_pub.h index 578020411a..4429673cce 100644 --- a/src/common/dsc_pub.h +++ b/src/include/firebird/impl/dsc_pub.h @@ -23,8 +23,8 @@ * compatible with the HP Compiler */ -#ifndef JRD_DSC_PUB_H -#define JRD_DSC_PUB_H +#ifndef FIREBIRD_IMPL_DSC_PUB_H +#define FIREBIRD_IMPL_DSC_PUB_H /* @@ -71,4 +71,4 @@ #define ISC_TIME_SECONDS_PRECISION 10000 #define ISC_TIME_SECONDS_PRECISION_SCALE (-4) -#endif /* JRD_DSC_PUB_H */ +#endif /* FIREBIRD_IMPL_DSC_PUB_H */ diff --git a/src/jrd/inf_pub.h b/src/include/firebird/impl/inf_pub.h similarity index 99% rename from src/jrd/inf_pub.h rename to src/include/firebird/impl/inf_pub.h index 0cfc8ce135..ea4d31eb9d 100644 --- a/src/jrd/inf_pub.h +++ b/src/include/firebird/impl/inf_pub.h @@ -23,8 +23,8 @@ * 2001.07.28: John Bellardo: Added isc_info_rsb_skip to support LIMIT. */ -#ifndef JRD_INF_PUB_H -#define JRD_INF_PUB_H +#ifndef FIREBIRD_IMPL_INF_PUB_H +#define FIREBIRD_IMPL_INF_PUB_H /* Common, structural codes */ /****************************/ @@ -462,5 +462,4 @@ enum info_db_provider #define isc_info_sql_stmt_set_generator 13 #define isc_info_sql_stmt_savepoint 14 -#endif /* JRD_INF_PUB_H */ - +#endif /* FIREBIRD_IMPL_INF_PUB_H */ diff --git a/src/dsql/sqlda_pub.h b/src/include/firebird/impl/sqlda_pub.h similarity index 97% rename from src/dsql/sqlda_pub.h rename to src/include/firebird/impl/sqlda_pub.h index f6a9961d45..5b3f95b863 100644 --- a/src/dsql/sqlda_pub.h +++ b/src/include/firebird/impl/sqlda_pub.h @@ -21,8 +21,8 @@ * Contributor(s): ______________________________________. */ -#ifndef DSQL_SQLDA_PUB_H -#define DSQL_SQLDA_PUB_H +#ifndef FIREBIRD_IMPL_SQLDA_PUB_H +#define FIREBIRD_IMPL_SQLDA_PUB_H /* Definitions for DSQL free_statement routine */ @@ -104,5 +104,4 @@ typedef struct numeric type */ #define SQL_DIALECT_CURRENT SQL_DIALECT_V6 /* latest IB DIALECT */ -#endif /* DSQL_SQLDA_PUB_H */ - +#endif /* FIREBIRD_IMPL_SQLDA_PUB_H */ diff --git a/src/include/types_pub.h b/src/include/firebird/impl/types_pub.h similarity index 98% rename from src/include/types_pub.h rename to src/include/firebird/impl/types_pub.h index 743c5bbf06..5fcc880dc2 100644 --- a/src/include/types_pub.h +++ b/src/include/firebird/impl/types_pub.h @@ -24,8 +24,8 @@ * Contributor(s): ______________________________________. */ -#ifndef INCLUDE_TYPES_PUB_H -#define INCLUDE_TYPES_PUB_H +#ifndef FIREBIRD_IMPL_TYPES_PUB_H +#define FIREBIRD_IMPL_TYPES_PUB_H #include @@ -200,4 +200,4 @@ struct FB_DEC34_t { typedef struct FB_DEC16_t FB_DEC16; typedef struct FB_DEC34_t FB_DEC34; -#endif /* INCLUDE_TYPES_PUB_H */ +#endif /* FIREBIRD_IMPL_TYPES_PUB_H */ diff --git a/src/include/ibase.h b/src/include/ibase.h index 3e296f676d..1e6ab1420e 100644 --- a/src/include/ibase.h +++ b/src/include/ibase.h @@ -1,7 +1,1188 @@ -#ifdef FB_COMPILING_WHY_CPP -#include "../dsql/sqlda_pub.h" -#include "../yvalve/why_proto.h" -#include "gen/iberror.h" -#else -#include "../jrd/ibase.h" +/* + * MODULE: ibase.h + * DESCRIPTION: OSRI entrypoints and defines + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * 2001.07.28: John Bellardo: Added blr_skip + * 2001.09.18: Ann Harrison: New info codes + * 17-Oct-2001 Mike Nordell: CPU affinity + * 2001-04-16 Paul Beach: ISC_TIME_SECONDS_PRECISION_SCALE modified for HP10 + * Compiler Compatibility + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports: + * - EPSON, XENIX, MAC (MAC_AUX), Cray and OS/2 + * 2002.10.29 Nickolay Samofatov: Added support for savepoints + * + * 2002.10.29 Sean Leyne - Removed support for obsolete IPX/SPX Protocol + * + * 2006.09.06 Steve Boyd - Added various prototypes required by Cobol ESQL + * isc_embed_dsql_length + * isc_event_block_a + * isc_sqlcode_s + * isc_embed_dsql_fetch_a + * isc_event_block_s + * isc_baddress + * isc_baddress_s + * + */ + +#ifndef FIREBIRD_IBASE_H +#define FIREBIRD_IBASE_H + +#define FB_API_VER 30 +#define isc_version4 + +#define ISC_TRUE 1 +#define ISC_FALSE 0 +#if !(defined __cplusplus) +#define ISC__TRUE ISC_TRUE +#define ISC__FALSE ISC_FALSE #endif + +#define ISC_FAR + +#if defined _MSC_VER && _MSC_VER >= 1300 +#define FB_API_DEPRECATED __declspec(deprecated) +#elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) +#define FB_API_DEPRECATED __attribute__((__deprecated__)) +#else +#define FB_API_DEPRECATED +#endif + +#include "./firebird/impl/types_pub.h" + +/***********************/ +/* Firebird misc types */ +/***********************/ + +typedef void (* isc_callback) (); +typedef ISC_LONG isc_resv_handle; + +typedef void (*ISC_PRINT_CALLBACK) (void*, ISC_SHORT, const char*); +typedef void (*ISC_VERSION_CALLBACK)(void*, const char*); +typedef void (*ISC_EVENT_CALLBACK)(void*, ISC_USHORT, const ISC_UCHAR*); + +/*******************************************************************/ +/* Blob id structure */ +/*******************************************************************/ + +#if !(defined __cplusplus) +typedef GDS_QUAD GDS__QUAD; +#endif /* !(defined __cplusplus) */ + +typedef struct +{ + short array_bound_lower; + short array_bound_upper; +} ISC_ARRAY_BOUND; + +typedef struct +{ + ISC_UCHAR array_desc_dtype; + ISC_SCHAR array_desc_scale; + unsigned short array_desc_length; + ISC_SCHAR array_desc_field_name[32]; + ISC_SCHAR array_desc_relation_name[32]; + short array_desc_dimensions; + short array_desc_flags; + ISC_ARRAY_BOUND array_desc_bounds[16]; +} ISC_ARRAY_DESC; + +typedef struct +{ + short blob_desc_subtype; + short blob_desc_charset; + short blob_desc_segment_size; + ISC_UCHAR blob_desc_field_name[32]; + ISC_UCHAR blob_desc_relation_name[32]; +} ISC_BLOB_DESC; + +/***************************/ +/* Blob control structure */ +/***************************/ + +typedef struct isc_blob_ctl +{ + ISC_STATUS (* ctl_source)(); /* Source filter */ + struct isc_blob_ctl* ctl_source_handle; /* Argument to pass to source filter */ + short ctl_to_sub_type; /* Target type */ + short ctl_from_sub_type; /* Source type */ + unsigned short ctl_buffer_length; /* Length of buffer */ + unsigned short ctl_segment_length; /* Length of current segment */ + unsigned short ctl_bpb_length; /* Length of blob parameter block */ + /* Internally, this is const UCHAR*, but this public struct probably can't change. */ + ISC_SCHAR* ctl_bpb; /* Address of blob parameter block */ + ISC_UCHAR* ctl_buffer; /* Address of segment buffer */ + ISC_LONG ctl_max_segment; /* Length of longest segment */ + ISC_LONG ctl_number_segments; /* Total number of segments */ + ISC_LONG ctl_total_length; /* Total length of blob */ + ISC_STATUS* ctl_status; /* Address of status vector */ + long ctl_data[8]; /* Application specific data */ +} * ISC_BLOB_CTL; + +/***************************/ +/* Blob stream definitions */ +/***************************/ + +typedef struct bstream +{ + isc_blob_handle bstr_blob; /* Blob handle */ + ISC_SCHAR * bstr_buffer; /* Address of buffer */ + ISC_SCHAR * bstr_ptr; /* Next character */ + short bstr_length; /* Length of buffer */ + short bstr_cnt; /* Characters in buffer */ + char bstr_mode; /* (mode) ? OUTPUT : INPUT */ +} BSTREAM, * FB_BLOB_STREAM; + +/* Three ugly macros, one even using octal radix... sigh... */ +#define getb(p) (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p)) +#define putb(x, p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) +#define putbx(x, p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) + +/********************************************************************/ +/* CVC: Public blob interface definition held in val.h. */ +/* For some unknown reason, it was only documented in langRef */ +/* and being the structure passed by the engine to UDFs it never */ +/* made its way into this public definitions file. */ +/* Being its original name "blob", I renamed it blobcallback here. */ +/* I did the full definition with the proper parameters instead of */ +/* the weak C declaration with any number and type of parameters. */ +/* Since the first parameter -BLB- is unknown outside the engine, */ +/* it's more accurate to use void* than int* as the blob pointer */ +/********************************************************************/ + +#if !defined(JRD_VAL_H) +/* Blob passing structure */ + +/* This enum applies to parameter "mode" in blob_lseek */ +enum blob_lseek_mode {blb_seek_relative = 1, blb_seek_from_tail = 2}; +/* This enum applies to the value returned by blob_get_segment */ +enum blob_get_result {blb_got_fragment = -1, blb_got_eof = 0, blb_got_full_segment = 1}; + +typedef struct blobcallback { + short (*blob_get_segment) + (void* hnd, ISC_UCHAR* buffer, ISC_USHORT buf_size, ISC_USHORT* result_len); + void* blob_handle; + ISC_LONG blob_number_segments; + ISC_LONG blob_max_segment; + ISC_LONG blob_total_length; + void (*blob_put_segment) + (void* hnd, const ISC_UCHAR* buffer, ISC_USHORT buf_size); + ISC_LONG (*blob_lseek) + (void* hnd, ISC_USHORT mode, ISC_LONG offset); +} *BLOBCALLBACK; +#endif /* !defined(JRD_VAL_H) */ + + +/********************************************************************/ +/* CVC: Public descriptor interface held in dsc2.h. */ +/* We need it documented to be able to recognize NULL in UDFs. */ +/* Being its original name "dsc", I renamed it paramdsc here. */ +/* Notice that I adjust to the original definition: contrary to */ +/* other cases, the typedef is the same struct not the pointer. */ +/* I included the enumeration of dsc_dtype possible values. */ +/* Ultimately, dsc2.h should be part of the public interface. */ +/********************************************************************/ + +#if !defined(JRD_DSC_H) +/* This is the famous internal descriptor that UDFs can use, too. */ +typedef struct paramdsc { + ISC_UCHAR dsc_dtype; + signed char dsc_scale; + ISC_USHORT dsc_length; + short dsc_sub_type; + ISC_USHORT dsc_flags; + ISC_UCHAR *dsc_address; +} PARAMDSC; + +#if !defined(JRD_VAL_H) +/* This is a helper struct to work with varchars. */ +typedef struct paramvary { + ISC_USHORT vary_length; + ISC_UCHAR vary_string[1]; +} PARAMVARY; +#endif /* !defined(JRD_VAL_H) */ + +#include "./firebird/impl/dsc_pub.h" + +#endif /* !defined(JRD_DSC_H) */ + +/***************************/ +/* Dynamic SQL definitions */ +/***************************/ + +#include "./firebird/impl/sqlda_pub.h" + +/***************************/ +/* OSRI database functions */ +/***************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +ISC_STATUS ISC_EXPORT isc_attach_database(ISC_STATUS*, + short, + const ISC_SCHAR*, + isc_db_handle*, + short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_array_gen_sdl(ISC_STATUS*, + const ISC_ARRAY_DESC*, + ISC_SHORT*, + ISC_UCHAR*, + ISC_SHORT*); + +ISC_STATUS ISC_EXPORT isc_array_get_slice(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + ISC_QUAD*, + const ISC_ARRAY_DESC*, + void*, + ISC_LONG*); + +ISC_STATUS ISC_EXPORT isc_array_lookup_bounds(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + const ISC_SCHAR*, + const ISC_SCHAR*, + ISC_ARRAY_DESC*); + +ISC_STATUS ISC_EXPORT isc_array_lookup_desc(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + const ISC_SCHAR*, + const ISC_SCHAR*, + ISC_ARRAY_DESC*); + +ISC_STATUS ISC_EXPORT isc_array_set_desc(ISC_STATUS*, + const ISC_SCHAR*, + const ISC_SCHAR*, + const short*, + const short*, + const short*, + ISC_ARRAY_DESC*); + +ISC_STATUS ISC_EXPORT isc_array_put_slice(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + ISC_QUAD*, + const ISC_ARRAY_DESC*, + void*, + ISC_LONG *); + +void ISC_EXPORT isc_blob_default_desc(ISC_BLOB_DESC*, + const ISC_UCHAR*, + const ISC_UCHAR*); + +ISC_STATUS ISC_EXPORT isc_blob_gen_bpb(ISC_STATUS*, + const ISC_BLOB_DESC*, + const ISC_BLOB_DESC*, + unsigned short, + ISC_UCHAR*, + unsigned short*); + +ISC_STATUS ISC_EXPORT isc_blob_info(ISC_STATUS*, + isc_blob_handle*, + short, + const ISC_SCHAR*, + short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_blob_lookup_desc(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + const ISC_UCHAR*, + const ISC_UCHAR*, + ISC_BLOB_DESC*, + ISC_UCHAR*); + +ISC_STATUS ISC_EXPORT isc_blob_set_desc(ISC_STATUS*, + const ISC_UCHAR*, + const ISC_UCHAR*, + short, + short, + short, + ISC_BLOB_DESC*); + +ISC_STATUS ISC_EXPORT isc_cancel_blob(ISC_STATUS *, + isc_blob_handle *); + +ISC_STATUS ISC_EXPORT isc_cancel_events(ISC_STATUS *, + isc_db_handle *, + ISC_LONG *); + +ISC_STATUS ISC_EXPORT isc_close_blob(ISC_STATUS *, + isc_blob_handle *); + +ISC_STATUS ISC_EXPORT isc_commit_retaining(ISC_STATUS *, + isc_tr_handle *); + +ISC_STATUS ISC_EXPORT isc_commit_transaction(ISC_STATUS *, + isc_tr_handle *); + +ISC_STATUS ISC_EXPORT isc_create_blob(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + isc_blob_handle*, + ISC_QUAD*); + +ISC_STATUS ISC_EXPORT isc_create_blob2(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + isc_blob_handle*, + ISC_QUAD*, + short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_create_database(ISC_STATUS*, + unsigned short, + const ISC_SCHAR*, + isc_db_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short); + +ISC_STATUS ISC_EXPORT isc_database_info(ISC_STATUS*, + isc_db_handle*, + short, + const ISC_SCHAR*, + short, + ISC_SCHAR*); + +void ISC_EXPORT isc_decode_date(const ISC_QUAD*, + void*); + +void ISC_EXPORT isc_decode_sql_date(const ISC_DATE*, + void*); + +void ISC_EXPORT isc_decode_sql_time(const ISC_TIME*, + void*); + +void ISC_EXPORT isc_decode_timestamp(const ISC_TIMESTAMP*, + void*); + +ISC_STATUS ISC_EXPORT isc_detach_database(ISC_STATUS *, + isc_db_handle *); + +ISC_STATUS ISC_EXPORT isc_drop_database(ISC_STATUS *, + isc_db_handle *); + +ISC_STATUS ISC_EXPORT isc_dsql_allocate_statement(ISC_STATUS *, + isc_db_handle *, + isc_stmt_handle *); + +ISC_STATUS ISC_EXPORT isc_dsql_alloc_statement2(ISC_STATUS *, + isc_db_handle *, + isc_stmt_handle *); + +ISC_STATUS ISC_EXPORT isc_dsql_describe(ISC_STATUS *, + isc_stmt_handle *, + unsigned short, + XSQLDA *); + +ISC_STATUS ISC_EXPORT isc_dsql_describe_bind(ISC_STATUS *, + isc_stmt_handle *, + unsigned short, + XSQLDA *); + +ISC_STATUS ISC_EXPORT isc_dsql_exec_immed2(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + const XSQLDA*, + const XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_dsql_execute(ISC_STATUS*, + isc_tr_handle*, + isc_stmt_handle*, + unsigned short, + const XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_dsql_execute2(ISC_STATUS*, + isc_tr_handle*, + isc_stmt_handle*, + unsigned short, + const XSQLDA*, + const XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + const XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_dsql_fetch(ISC_STATUS *, + isc_stmt_handle *, + unsigned short, + const XSQLDA *); + +ISC_STATUS ISC_EXPORT isc_dsql_finish(isc_db_handle *); + +ISC_STATUS ISC_EXPORT isc_dsql_free_statement(ISC_STATUS *, + isc_stmt_handle *, + unsigned short); + +ISC_STATUS ISC_EXPORT isc_dsql_insert(ISC_STATUS*, + isc_stmt_handle*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_dsql_prepare(ISC_STATUS*, + isc_tr_handle*, + isc_stmt_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_dsql_set_cursor_name(ISC_STATUS*, + isc_stmt_handle*, + const ISC_SCHAR*, + unsigned short); + +ISC_STATUS ISC_EXPORT isc_dsql_sql_info(ISC_STATUS*, + isc_stmt_handle*, + short, + const ISC_SCHAR*, + short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT fb_dsql_set_timeout(ISC_STATUS*, + isc_stmt_handle*, + ISC_ULONG); + +/*ISC_STATUS ISC_EXPORT fb_get_statement_interface(ISC_STATUS*, + FB_API_HANDLE*, + void**); + */ +void ISC_EXPORT isc_encode_date(const void*, + ISC_QUAD*); + +void ISC_EXPORT isc_encode_sql_date(const void*, + ISC_DATE*); + +void ISC_EXPORT isc_encode_sql_time(const void*, + ISC_TIME*); + +void ISC_EXPORT isc_encode_timestamp(const void*, + ISC_TIMESTAMP*); + +ISC_LONG ISC_EXPORT_VARARG isc_event_block(ISC_UCHAR**, + ISC_UCHAR**, + ISC_USHORT, ...); + +ISC_USHORT ISC_EXPORT isc_event_block_a(ISC_SCHAR**, + ISC_SCHAR**, + ISC_USHORT, + ISC_SCHAR**); + +void ISC_EXPORT isc_event_block_s(ISC_SCHAR**, + ISC_SCHAR**, + ISC_USHORT, + ISC_SCHAR**, + ISC_USHORT*); + +void ISC_EXPORT isc_event_counts(ISC_ULONG*, + short, + ISC_UCHAR*, + const ISC_UCHAR *); + +/* 17 May 2001 - isc_expand_dpb is DEPRECATED */ +void FB_API_DEPRECATED ISC_EXPORT_VARARG isc_expand_dpb(ISC_SCHAR**, + short*, ...); + +int ISC_EXPORT isc_modify_dpb(ISC_SCHAR**, + short*, + unsigned short, + const ISC_SCHAR*, + short); + +ISC_LONG ISC_EXPORT isc_free(ISC_SCHAR *); + +ISC_STATUS ISC_EXPORT isc_get_segment(ISC_STATUS *, + isc_blob_handle *, + unsigned short *, + unsigned short, + ISC_SCHAR *); + +ISC_STATUS ISC_EXPORT isc_get_slice(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + ISC_QUAD*, + unsigned short, + const ISC_UCHAR*, + unsigned short, + const ISC_LONG*, + ISC_LONG, + void*, + ISC_LONG*); + +/* CVC: This non-const signature is needed for compatibility, see gds.cpp. */ +ISC_LONG FB_API_DEPRECATED ISC_EXPORT isc_interprete(ISC_SCHAR*, + ISC_STATUS**); + +/* This const params version used in the engine and other places. */ +ISC_LONG ISC_EXPORT fb_interpret(ISC_SCHAR*, + unsigned int, + const ISC_STATUS**); + +ISC_STATUS ISC_EXPORT isc_open_blob(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + isc_blob_handle*, + ISC_QUAD*); + +ISC_STATUS ISC_EXPORT isc_open_blob2(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + isc_blob_handle*, + ISC_QUAD*, + ISC_USHORT, + const ISC_UCHAR*); + +ISC_STATUS ISC_EXPORT isc_prepare_transaction2(ISC_STATUS*, + isc_tr_handle*, + ISC_USHORT, + const ISC_UCHAR*); + +void ISC_EXPORT isc_print_sqlerror(ISC_SHORT, + const ISC_STATUS*); + +ISC_STATUS ISC_EXPORT isc_print_status(const ISC_STATUS*); + +ISC_STATUS ISC_EXPORT isc_put_segment(ISC_STATUS*, + isc_blob_handle*, + unsigned short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_put_slice(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + ISC_QUAD*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + const ISC_LONG*, + ISC_LONG, + void*); + +ISC_STATUS ISC_EXPORT isc_que_events(ISC_STATUS*, + isc_db_handle*, + ISC_LONG*, + unsigned short, + const ISC_UCHAR*, + ISC_EVENT_CALLBACK, + void*); + +ISC_STATUS ISC_EXPORT isc_rollback_retaining(ISC_STATUS*, + isc_tr_handle*); + +ISC_STATUS ISC_EXPORT isc_rollback_transaction(ISC_STATUS*, + isc_tr_handle*); + +ISC_STATUS ISC_EXPORT isc_start_multiple(ISC_STATUS*, + isc_tr_handle*, + short, + void *); + +ISC_STATUS ISC_EXPORT_VARARG isc_start_transaction(ISC_STATUS*, + isc_tr_handle*, + short, ...); + +ISC_STATUS ISC_EXPORT fb_disconnect_transaction(ISC_STATUS*, isc_tr_handle*); + +ISC_LONG ISC_EXPORT isc_sqlcode(const ISC_STATUS*); + +void ISC_EXPORT isc_sqlcode_s(const ISC_STATUS*, + ISC_ULONG*); + +void ISC_EXPORT fb_sqlstate(char*, + const ISC_STATUS*); + +void ISC_EXPORT isc_sql_interprete(short, + ISC_SCHAR*, + short); + +ISC_STATUS ISC_EXPORT isc_transaction_info(ISC_STATUS*, + isc_tr_handle*, + short, + const ISC_SCHAR*, + short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_transact_request(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + unsigned short, + ISC_SCHAR*, + unsigned short, + ISC_SCHAR*, + unsigned short, + ISC_SCHAR*); + +ISC_LONG ISC_EXPORT isc_vax_integer(const ISC_SCHAR*, + short); + +ISC_INT64 ISC_EXPORT isc_portable_integer(const ISC_UCHAR*, + short); + +/*************************************/ +/* Security Functions and structures */ +/*************************************/ + +#define sec_uid_spec 0x01 +#define sec_gid_spec 0x02 +#define sec_server_spec 0x04 +#define sec_password_spec 0x08 +#define sec_group_name_spec 0x10 +#define sec_first_name_spec 0x20 +#define sec_middle_name_spec 0x40 +#define sec_last_name_spec 0x80 +#define sec_dba_user_name_spec 0x100 +#define sec_dba_password_spec 0x200 + +#define sec_protocol_tcpip 1 +#define sec_protocol_netbeui 2 +#define sec_protocol_spx 3 /* -- Deprecated Protocol. Declaration retained for compatibility */ +#define sec_protocol_local 4 + +typedef struct { + short sec_flags; /* which fields are specified */ + int uid; /* the user's id */ + int gid; /* the user's group id */ + int protocol; /* protocol to use for connection */ + ISC_SCHAR *server; /* server to administer */ + ISC_SCHAR *user_name; /* the user's name */ + ISC_SCHAR *password; /* the user's password */ + ISC_SCHAR *group_name; /* the group name */ + ISC_SCHAR *first_name; /* the user's first name */ + ISC_SCHAR *middle_name; /* the user's middle name */ + ISC_SCHAR *last_name; /* the user's last name */ + ISC_SCHAR *dba_user_name; /* the dba user name */ + ISC_SCHAR *dba_password; /* the dba password */ +} USER_SEC_DATA; + +ISC_STATUS ISC_EXPORT isc_add_user(ISC_STATUS*, const USER_SEC_DATA*); + +ISC_STATUS ISC_EXPORT isc_delete_user(ISC_STATUS*, const USER_SEC_DATA*); + +ISC_STATUS ISC_EXPORT isc_modify_user(ISC_STATUS*, const USER_SEC_DATA*); + +/**********************************/ +/* Other OSRI functions */ +/**********************************/ + +ISC_STATUS ISC_EXPORT isc_compile_request(ISC_STATUS*, + isc_db_handle*, + isc_req_handle*, + ISC_USHORT, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_compile_request2(ISC_STATUS*, + isc_db_handle*, + isc_req_handle*, + unsigned short, + const ISC_SCHAR*); + +// This function always returns error since FB 3.0. +ISC_STATUS FB_API_DEPRECATED ISC_EXPORT isc_ddl(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_prepare_transaction(ISC_STATUS*, + isc_tr_handle*); + + +ISC_STATUS ISC_EXPORT isc_receive(ISC_STATUS*, + isc_req_handle*, + ISC_USHORT, + ISC_USHORT, + void*, + short); + +ISC_STATUS ISC_EXPORT isc_reconnect_transaction(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + unsigned short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_release_request(ISC_STATUS*, + isc_req_handle*); + +ISC_STATUS ISC_EXPORT isc_request_info(ISC_STATUS*, + isc_req_handle*, + short, + short, + const ISC_SCHAR*, + short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_seek_blob(ISC_STATUS*, + isc_blob_handle*, + short, + ISC_LONG, + ISC_LONG*); + +ISC_STATUS ISC_EXPORT isc_send(ISC_STATUS*, + isc_req_handle*, + unsigned short, + unsigned short, + const void*, + short); + +ISC_STATUS ISC_EXPORT isc_start_and_send(ISC_STATUS*, + isc_req_handle*, + isc_tr_handle*, + ISC_USHORT, + ISC_USHORT, + const void*, + short); + +ISC_STATUS ISC_EXPORT isc_start_request(ISC_STATUS *, + isc_req_handle *, + isc_tr_handle *, + short); + +ISC_STATUS ISC_EXPORT isc_unwind_request(ISC_STATUS *, + isc_tr_handle *, + short); + +ISC_STATUS ISC_EXPORT isc_wait_for_event(ISC_STATUS*, + isc_db_handle*, + unsigned short, + const ISC_UCHAR*, + ISC_UCHAR*); + + +/*****************************/ +/* Other Sql functions */ +/*****************************/ + +ISC_STATUS ISC_EXPORT isc_close(ISC_STATUS*, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_declare(ISC_STATUS*, + const ISC_SCHAR*, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_describe(ISC_STATUS*, + const ISC_SCHAR*, + XSQLDA *); + +ISC_STATUS ISC_EXPORT isc_describe_bind(ISC_STATUS*, + const ISC_SCHAR*, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_execute(ISC_STATUS*, + isc_tr_handle*, + const ISC_SCHAR*, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_execute_immediate(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + short*, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_fetch(ISC_STATUS*, + const ISC_SCHAR*, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_open(ISC_STATUS*, + isc_tr_handle*, + const ISC_SCHAR*, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_prepare(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + const ISC_SCHAR*, + const short*, + const ISC_SCHAR*, + XSQLDA*); + + +/*************************************/ +/* Other Dynamic sql functions */ +/*************************************/ + +ISC_STATUS ISC_EXPORT isc_dsql_execute_m(ISC_STATUS*, + isc_tr_handle*, + isc_stmt_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + unsigned short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_dsql_execute2_m(ISC_STATUS*, + isc_tr_handle*, + isc_stmt_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + unsigned short, + const ISC_SCHAR*, + unsigned short, + ISC_SCHAR*, + unsigned short, + unsigned short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate_m(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + unsigned short, + ISC_SCHAR*, + unsigned short, + unsigned short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_dsql_fetch_m(ISC_STATUS*, + isc_stmt_handle*, + unsigned short, + ISC_SCHAR*, + unsigned short, + unsigned short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_dsql_insert_m(ISC_STATUS*, + isc_stmt_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + unsigned short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_dsql_prepare_m(ISC_STATUS*, + isc_tr_handle*, + isc_stmt_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + unsigned short, + const ISC_SCHAR*, + unsigned short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_dsql_release(ISC_STATUS*, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_close(ISC_STATUS*, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_declare(ISC_STATUS*, + const ISC_SCHAR*, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_describe(ISC_STATUS*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_describe_bind(ISC_STATUS*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_execute(ISC_STATUS*, + isc_tr_handle*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_execute2(ISC_STATUS*, + isc_tr_handle*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_execute_immed(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch(ISC_STATUS*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch_a(ISC_STATUS*, + int*, + const ISC_SCHAR*, + ISC_USHORT, + XSQLDA*); + +void ISC_EXPORT isc_embed_dsql_length(const ISC_UCHAR*, + ISC_USHORT*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_open(ISC_STATUS*, + isc_tr_handle*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_open2(ISC_STATUS*, + isc_tr_handle*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_insert(ISC_STATUS*, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_prepare(ISC_STATUS*, + isc_db_handle*, + isc_tr_handle*, + const ISC_SCHAR*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + XSQLDA*); + +ISC_STATUS ISC_EXPORT isc_embed_dsql_release(ISC_STATUS*, + const ISC_SCHAR*); + + +/******************************/ +/* Other Blob functions */ +/******************************/ + +FB_BLOB_STREAM ISC_EXPORT BLOB_open(isc_blob_handle, + ISC_SCHAR*, + int); + +int ISC_EXPORT BLOB_put(ISC_SCHAR, + FB_BLOB_STREAM); + +int ISC_EXPORT BLOB_close(FB_BLOB_STREAM); + +int ISC_EXPORT BLOB_get(FB_BLOB_STREAM); + +int ISC_EXPORT BLOB_display(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + +int ISC_EXPORT BLOB_dump(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + +int ISC_EXPORT BLOB_edit(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + +int ISC_EXPORT BLOB_load(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + +int ISC_EXPORT BLOB_text_dump(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + +int ISC_EXPORT BLOB_text_load(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + +FB_BLOB_STREAM ISC_EXPORT Bopen(ISC_QUAD*, + isc_db_handle, + isc_tr_handle, + const ISC_SCHAR*); + + +/******************************/ +/* Other Misc functions */ +/******************************/ + +ISC_LONG ISC_EXPORT isc_ftof(const ISC_SCHAR*, + const unsigned short, + ISC_SCHAR*, + const unsigned short); + +ISC_STATUS ISC_EXPORT isc_print_blr(const ISC_SCHAR*, + ISC_PRINT_CALLBACK, + void*, + short); + +int ISC_EXPORT fb_print_blr(const ISC_UCHAR*, + ISC_ULONG, + ISC_PRINT_CALLBACK, + void*, + short); + +void ISC_EXPORT isc_set_debug(int); + +void ISC_EXPORT isc_qtoq(const ISC_QUAD*, + ISC_QUAD*); + +void ISC_EXPORT isc_vtof(const ISC_SCHAR*, + ISC_SCHAR*, + unsigned short); + +void ISC_EXPORT isc_vtov(const ISC_SCHAR*, + ISC_SCHAR*, + short); + +int ISC_EXPORT isc_version(isc_db_handle*, + ISC_VERSION_CALLBACK, + void*); + +ISC_LONG FB_API_DEPRECATED ISC_EXPORT isc_reset_fpe(ISC_USHORT); + +uintptr_t ISC_EXPORT isc_baddress(ISC_SCHAR*); +void ISC_EXPORT isc_baddress_s(const ISC_SCHAR*, + uintptr_t*); + +/*****************************************/ +/* Service manager functions */ +/*****************************************/ + +#define ADD_SPB_LENGTH(p, length) {*(p)++ = (length); \ + *(p)++ = (length) >> 8;} + +#define ADD_SPB_NUMERIC(p, data) {*(p)++ = (ISC_SCHAR) (ISC_UCHAR) (data); \ + *(p)++ = (ISC_SCHAR) (ISC_UCHAR) ((data) >> 8); \ + *(p)++ = (ISC_SCHAR) (ISC_UCHAR) ((data) >> 16); \ + *(p)++ = (ISC_SCHAR) (ISC_UCHAR) ((data) >> 24);} + +ISC_STATUS ISC_EXPORT isc_service_attach(ISC_STATUS*, + unsigned short, + const ISC_SCHAR*, + isc_svc_handle*, + unsigned short, + const ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_service_detach(ISC_STATUS *, + isc_svc_handle *); + +ISC_STATUS ISC_EXPORT isc_service_query(ISC_STATUS*, + isc_svc_handle*, + isc_resv_handle*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + const ISC_SCHAR*, + unsigned short, + ISC_SCHAR*); + +ISC_STATUS ISC_EXPORT isc_service_start(ISC_STATUS*, + isc_svc_handle*, + isc_resv_handle*, + unsigned short, + const ISC_SCHAR*); + +/***********************/ +/* Shutdown and cancel */ +/***********************/ + +int ISC_EXPORT fb_shutdown(unsigned int, const int); + +ISC_STATUS ISC_EXPORT fb_shutdown_callback(ISC_STATUS*, + FB_SHUTDOWN_CALLBACK, + const int, + void*); + +ISC_STATUS ISC_EXPORT fb_cancel_operation(ISC_STATUS*, + isc_db_handle*, + ISC_USHORT); + +/***********************/ +/* Ping the connection */ +/***********************/ + +ISC_STATUS ISC_EXPORT fb_ping(ISC_STATUS*, isc_db_handle*); + +/********************/ +/* Object interface */ +/********************/ + +ISC_STATUS ISC_EXPORT fb_get_database_handle(ISC_STATUS*, isc_db_handle*, void*); +ISC_STATUS ISC_EXPORT fb_get_transaction_handle(ISC_STATUS*, isc_tr_handle*, void*); + +/********************************/ +/* Client information functions */ +/********************************/ + +void ISC_EXPORT isc_get_client_version ( ISC_SCHAR *); +int ISC_EXPORT isc_get_client_major_version (); +int ISC_EXPORT isc_get_client_minor_version (); + +/*******************************************/ +/* Set callback for database crypt plugins */ +/*******************************************/ + +ISC_STATUS ISC_EXPORT fb_database_crypt_callback(ISC_STATUS*, void*); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +/***************************************************/ +/* Actions to pass to the blob filter (ctl_source) */ +/***************************************************/ + +#define isc_blob_filter_open 0 +#define isc_blob_filter_get_segment 1 +#define isc_blob_filter_close 2 +#define isc_blob_filter_create 3 +#define isc_blob_filter_put_segment 4 +#define isc_blob_filter_alloc 5 +#define isc_blob_filter_free 6 +#define isc_blob_filter_seek 7 + +/*******************/ +/* Blr definitions */ +/*******************/ + +#include "./firebird/impl/blr.h" + +#include "./firebird/impl/consts_pub.h" + +/*********************************/ +/* Information call declarations */ +/*********************************/ + +#include "./firebird/impl/inf_pub.h" + +#include "./iberror.h" + +#endif /* FIREBIRD_IBASE_H */ diff --git a/src/isql/extract.epp b/src/isql/extract.epp index 6fe76b5d75..d817f09752 100644 --- a/src/isql/extract.epp +++ b/src/isql/extract.epp @@ -46,7 +46,7 @@ #include #include // isdigit #include "../jrd/constants.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../common/intlobj_new.h" #include "../isql/isql.h" diff --git a/src/isql/isql.epp b/src/isql/isql.epp index a85782a95b..33f7e0df4b 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -100,7 +100,7 @@ enum literal_string_type #if defined(WIN_NT) #include #endif -#include "../jrd/ibase.h" +#include "ibase.h" #include "../isql/isql.h" #include "../yvalve/perf.h" #include "../jrd/license.h" diff --git a/src/isql/isqlswi.h b/src/isql/isqlswi.h index be5f244d87..6d0654ae75 100644 --- a/src/isql/isqlswi.h +++ b/src/isql/isqlswi.h @@ -25,7 +25,7 @@ #ifndef ISQL_ISQLSWI_H #define ISQL_ISQLSWI_H -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/constants.h" enum isql_switches diff --git a/src/isql/iutils.cpp b/src/isql/iutils.cpp index f898118571..39150a9ebd 100644 --- a/src/isql/iutils.cpp +++ b/src/isql/iutils.cpp @@ -31,7 +31,7 @@ //#include //#endif #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "isql.h" #include "../common/classes/MsgPrint.h" #include diff --git a/src/isql/show.epp b/src/isql/show.epp index 79bc22f3c5..77eced9e6b 100644 --- a/src/isql/show.epp +++ b/src/isql/show.epp @@ -41,7 +41,7 @@ #include #include "../yvalve/gds_proto.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../isql/isql.h" #include "../jrd/intl.h" #include "../common/intlobj_new.h" diff --git a/src/jrd/CryptoManager.cpp b/src/jrd/CryptoManager.cpp index 25dc3f47f0..cf2cd9c294 100644 --- a/src/jrd/CryptoManager.cpp +++ b/src/jrd/CryptoManager.cpp @@ -43,7 +43,7 @@ #include "../jrd/cch_proto.h" #include "../jrd/lck_proto.h" #include "../jrd/pag_proto.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../jrd/Monitoring.h" #include "../jrd/os/pio_proto.h" #include "../common/isc_proto.h" diff --git a/src/jrd/ExtEngineManager.cpp b/src/jrd/ExtEngineManager.cpp index 86bace596c..cbf5e69cb3 100644 --- a/src/jrd/ExtEngineManager.cpp +++ b/src/jrd/ExtEngineManager.cpp @@ -21,11 +21,11 @@ */ #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "iberror.h" -#include "inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../jrd/ExtEngineManager.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../common/dsc.h" #include "../jrd/align.h" #include "../jrd/jrd.h" diff --git a/src/jrd/PreparedStatement.cpp b/src/jrd/PreparedStatement.cpp index 021d66bbf4..4bcf02b7c7 100644 --- a/src/jrd/PreparedStatement.cpp +++ b/src/jrd/PreparedStatement.cpp @@ -27,7 +27,7 @@ #include "../jrd/req.h" #include "../dsql/dsql.h" #include "../common/classes/auto.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../dsql/dsql_proto.h" #include "../jrd/mov_proto.h" #include "../jrd/Attachment.h" diff --git a/src/jrd/ResultSet.cpp b/src/jrd/ResultSet.cpp index f7f3d9738a..187e83db22 100644 --- a/src/jrd/ResultSet.cpp +++ b/src/jrd/ResultSet.cpp @@ -26,7 +26,7 @@ #include "../jrd/jrd.h" #include "../jrd/req.h" #include "../dsql/dsql.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../dsql/dsql_proto.h" #include "../jrd/mov_proto.h" diff --git a/src/jrd/align.h b/src/jrd/align.h index 1237fc17c2..e8be9e6468 100644 --- a/src/jrd/align.h +++ b/src/jrd/align.h @@ -33,7 +33,7 @@ Maximum alignments for corresponding data types are defined in dsc.h */ #include "../common/DecFloat.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" /* The following macro must be defined as the highest-numericly-valued * blr which describes a datatype: arrays are sized based on this value. diff --git a/src/jrd/evl.cpp b/src/jrd/evl.cpp index 7639270eef..64ea89226b 100644 --- a/src/jrd/evl.cpp +++ b/src/jrd/evl.cpp @@ -80,7 +80,7 @@ #include "../jrd/intl_classes.h" #include "../jrd/rse.h" #include "../jrd/sort.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/tra.h" #include "../common/gdsassert.h" #include "../common/classes/auto.h" diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 9acb33c11e..66d5aa44a9 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -72,7 +72,7 @@ #include "../jrd/intl.h" #include "../jrd/sbm.h" #include "../jrd/blb.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../dsql/ExprNodes.h" #include "../dsql/StmtNodes.h" #include "../jrd/blb_proto.h" diff --git a/src/jrd/extds/InternalDS.cpp b/src/jrd/extds/InternalDS.cpp index 8c1cab5886..9057edf4e4 100644 --- a/src/jrd/extds/InternalDS.cpp +++ b/src/jrd/extds/InternalDS.cpp @@ -30,7 +30,7 @@ #include "../tra.h" #include "../common/dsc.h" #include "../../dsql/dsql.h" -#include "../../dsql/sqlda_pub.h" +#include "../firebird/impl/sqlda_pub.h" #include "../blb_proto.h" #include "../evl_proto.h" diff --git a/src/jrd/ibase.h b/src/jrd/ibase.h deleted file mode 100644 index 27db13583e..0000000000 --- a/src/jrd/ibase.h +++ /dev/null @@ -1,1206 +0,0 @@ -/* - * MODULE: ibase.h - * DESCRIPTION: OSRI entrypoints and defines - * - * The contents of this file are subject to the Interbase Public - * License Version 1.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy - * of the License at http://www.Inprise.com/IPL.html - * - * Software distributed under the License is distributed on an - * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express - * or implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code was created by Inprise Corporation - * and its predecessors. Portions created by Inprise Corporation are - * Copyright (C) Inprise Corporation. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * - * 2001.07.28: John Bellardo: Added blr_skip - * 2001.09.18: Ann Harrison: New info codes - * 17-Oct-2001 Mike Nordell: CPU affinity - * 2001-04-16 Paul Beach: ISC_TIME_SECONDS_PRECISION_SCALE modified for HP10 - * Compiler Compatibility - * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports: - * - EPSON, XENIX, MAC (MAC_AUX), Cray and OS/2 - * 2002.10.29 Nickolay Samofatov: Added support for savepoints - * - * 2002.10.29 Sean Leyne - Removed support for obsolete IPX/SPX Protocol - * - * 2006.09.06 Steve Boyd - Added various prototypes required by Cobol ESQL - * isc_embed_dsql_length - * isc_event_block_a - * isc_sqlcode_s - * isc_embed_dsql_fetch_a - * isc_event_block_s - * isc_baddress - * isc_baddress_s - * - */ - -#ifndef JRD_IBASE_H -#define JRD_IBASE_H - -#define FB_API_VER 30 -#define isc_version4 - -#define ISC_TRUE 1 -#define ISC_FALSE 0 -#if !(defined __cplusplus) -#define ISC__TRUE ISC_TRUE -#define ISC__FALSE ISC_FALSE -#endif - -#define ISC_FAR - -#if defined _MSC_VER && _MSC_VER >= 1300 -#define FB_API_DEPRECATED __declspec(deprecated) -#elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) -#define FB_API_DEPRECATED __attribute__((__deprecated__)) -#else -#define FB_API_DEPRECATED -#endif - -#include "types_pub.h" - -/***********************/ -/* Firebird misc types */ -/***********************/ - -typedef void (* isc_callback) (); -typedef ISC_LONG isc_resv_handle; - -typedef void (*ISC_PRINT_CALLBACK) (void*, ISC_SHORT, const char*); -typedef void (*ISC_VERSION_CALLBACK)(void*, const char*); -typedef void (*ISC_EVENT_CALLBACK)(void*, ISC_USHORT, const ISC_UCHAR*); - -/*******************************************************************/ -/* Blob id structure */ -/*******************************************************************/ - -#if !(defined __cplusplus) -typedef GDS_QUAD GDS__QUAD; -#endif /* !(defined __cplusplus) */ - -typedef struct -{ - short array_bound_lower; - short array_bound_upper; -} ISC_ARRAY_BOUND; - -typedef struct -{ - ISC_UCHAR array_desc_dtype; - ISC_SCHAR array_desc_scale; - unsigned short array_desc_length; - ISC_SCHAR array_desc_field_name[32]; - ISC_SCHAR array_desc_relation_name[32]; - short array_desc_dimensions; - short array_desc_flags; - ISC_ARRAY_BOUND array_desc_bounds[16]; -} ISC_ARRAY_DESC; - -typedef struct -{ - short blob_desc_subtype; - short blob_desc_charset; - short blob_desc_segment_size; - ISC_UCHAR blob_desc_field_name[32]; - ISC_UCHAR blob_desc_relation_name[32]; -} ISC_BLOB_DESC; - -/***************************/ -/* Blob control structure */ -/***************************/ - -typedef struct isc_blob_ctl -{ - ISC_STATUS (* ctl_source)(); /* Source filter */ - struct isc_blob_ctl* ctl_source_handle; /* Argument to pass to source filter */ - short ctl_to_sub_type; /* Target type */ - short ctl_from_sub_type; /* Source type */ - unsigned short ctl_buffer_length; /* Length of buffer */ - unsigned short ctl_segment_length; /* Length of current segment */ - unsigned short ctl_bpb_length; /* Length of blob parameter block */ - /* Internally, this is const UCHAR*, but this public struct probably can't change. */ - ISC_SCHAR* ctl_bpb; /* Address of blob parameter block */ - ISC_UCHAR* ctl_buffer; /* Address of segment buffer */ - ISC_LONG ctl_max_segment; /* Length of longest segment */ - ISC_LONG ctl_number_segments; /* Total number of segments */ - ISC_LONG ctl_total_length; /* Total length of blob */ - ISC_STATUS* ctl_status; /* Address of status vector */ - long ctl_data[8]; /* Application specific data */ -} * ISC_BLOB_CTL; - -/***************************/ -/* Blob stream definitions */ -/***************************/ - -typedef struct bstream -{ - isc_blob_handle bstr_blob; /* Blob handle */ - ISC_SCHAR * bstr_buffer; /* Address of buffer */ - ISC_SCHAR * bstr_ptr; /* Next character */ - short bstr_length; /* Length of buffer */ - short bstr_cnt; /* Characters in buffer */ - char bstr_mode; /* (mode) ? OUTPUT : INPUT */ -} BSTREAM, * FB_BLOB_STREAM; - -/* Three ugly macros, one even using octal radix... sigh... */ -#define getb(p) (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p)) -#define putb(x, p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) -#define putbx(x, p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x)))) - -/********************************************************************/ -/* CVC: Public blob interface definition held in val.h. */ -/* For some unknown reason, it was only documented in langRef */ -/* and being the structure passed by the engine to UDFs it never */ -/* made its way into this public definitions file. */ -/* Being its original name "blob", I renamed it blobcallback here. */ -/* I did the full definition with the proper parameters instead of */ -/* the weak C declaration with any number and type of parameters. */ -/* Since the first parameter -BLB- is unknown outside the engine, */ -/* it's more accurate to use void* than int* as the blob pointer */ -/********************************************************************/ - -#if !defined(JRD_VAL_H) -/* Blob passing structure */ - -/* This enum applies to parameter "mode" in blob_lseek */ -enum blob_lseek_mode {blb_seek_relative = 1, blb_seek_from_tail = 2}; -/* This enum applies to the value returned by blob_get_segment */ -enum blob_get_result {blb_got_fragment = -1, blb_got_eof = 0, blb_got_full_segment = 1}; - -typedef struct blobcallback { - short (*blob_get_segment) - (void* hnd, ISC_UCHAR* buffer, ISC_USHORT buf_size, ISC_USHORT* result_len); - void* blob_handle; - ISC_LONG blob_number_segments; - ISC_LONG blob_max_segment; - ISC_LONG blob_total_length; - void (*blob_put_segment) - (void* hnd, const ISC_UCHAR* buffer, ISC_USHORT buf_size); - ISC_LONG (*blob_lseek) - (void* hnd, ISC_USHORT mode, ISC_LONG offset); -} *BLOBCALLBACK; -#endif /* !defined(JRD_VAL_H) */ - - -/********************************************************************/ -/* CVC: Public descriptor interface held in dsc2.h. */ -/* We need it documented to be able to recognize NULL in UDFs. */ -/* Being its original name "dsc", I renamed it paramdsc here. */ -/* Notice that I adjust to the original definition: contrary to */ -/* other cases, the typedef is the same struct not the pointer. */ -/* I included the enumeration of dsc_dtype possible values. */ -/* Ultimately, dsc2.h should be part of the public interface. */ -/********************************************************************/ - -#if !defined(JRD_DSC_H) -/* This is the famous internal descriptor that UDFs can use, too. */ -typedef struct paramdsc { - ISC_UCHAR dsc_dtype; - signed char dsc_scale; - ISC_USHORT dsc_length; - short dsc_sub_type; - ISC_USHORT dsc_flags; - ISC_UCHAR *dsc_address; -} PARAMDSC; - -#if !defined(JRD_VAL_H) -/* This is a helper struct to work with varchars. */ -typedef struct paramvary { - ISC_USHORT vary_length; - ISC_UCHAR vary_string[1]; -} PARAMVARY; -#endif /* !defined(JRD_VAL_H) */ - -#include "../common/dsc_pub.h" - -#endif /* !defined(JRD_DSC_H) */ - -/***************************/ -/* Dynamic SQL definitions */ -/***************************/ - -#include "../dsql/sqlda_pub.h" - -/***************************/ -/* OSRI database functions */ -/***************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -ISC_STATUS ISC_EXPORT isc_attach_database(ISC_STATUS*, - short, - const ISC_SCHAR*, - isc_db_handle*, - short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_array_gen_sdl(ISC_STATUS*, - const ISC_ARRAY_DESC*, - ISC_SHORT*, - ISC_UCHAR*, - ISC_SHORT*); - -ISC_STATUS ISC_EXPORT isc_array_get_slice(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - ISC_QUAD*, - const ISC_ARRAY_DESC*, - void*, - ISC_LONG*); - -ISC_STATUS ISC_EXPORT isc_array_lookup_bounds(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - const ISC_SCHAR*, - const ISC_SCHAR*, - ISC_ARRAY_DESC*); - -ISC_STATUS ISC_EXPORT isc_array_lookup_desc(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - const ISC_SCHAR*, - const ISC_SCHAR*, - ISC_ARRAY_DESC*); - -ISC_STATUS ISC_EXPORT isc_array_set_desc(ISC_STATUS*, - const ISC_SCHAR*, - const ISC_SCHAR*, - const short*, - const short*, - const short*, - ISC_ARRAY_DESC*); - -ISC_STATUS ISC_EXPORT isc_array_put_slice(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - ISC_QUAD*, - const ISC_ARRAY_DESC*, - void*, - ISC_LONG *); - -void ISC_EXPORT isc_blob_default_desc(ISC_BLOB_DESC*, - const ISC_UCHAR*, - const ISC_UCHAR*); - -ISC_STATUS ISC_EXPORT isc_blob_gen_bpb(ISC_STATUS*, - const ISC_BLOB_DESC*, - const ISC_BLOB_DESC*, - unsigned short, - ISC_UCHAR*, - unsigned short*); - -ISC_STATUS ISC_EXPORT isc_blob_info(ISC_STATUS*, - isc_blob_handle*, - short, - const ISC_SCHAR*, - short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_blob_lookup_desc(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - const ISC_UCHAR*, - const ISC_UCHAR*, - ISC_BLOB_DESC*, - ISC_UCHAR*); - -ISC_STATUS ISC_EXPORT isc_blob_set_desc(ISC_STATUS*, - const ISC_UCHAR*, - const ISC_UCHAR*, - short, - short, - short, - ISC_BLOB_DESC*); - -ISC_STATUS ISC_EXPORT isc_cancel_blob(ISC_STATUS *, - isc_blob_handle *); - -ISC_STATUS ISC_EXPORT isc_cancel_events(ISC_STATUS *, - isc_db_handle *, - ISC_LONG *); - -ISC_STATUS ISC_EXPORT isc_close_blob(ISC_STATUS *, - isc_blob_handle *); - -ISC_STATUS ISC_EXPORT isc_commit_retaining(ISC_STATUS *, - isc_tr_handle *); - -ISC_STATUS ISC_EXPORT isc_commit_transaction(ISC_STATUS *, - isc_tr_handle *); - -ISC_STATUS ISC_EXPORT isc_create_blob(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - isc_blob_handle*, - ISC_QUAD*); - -ISC_STATUS ISC_EXPORT isc_create_blob2(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - isc_blob_handle*, - ISC_QUAD*, - short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_create_database(ISC_STATUS*, - short, - const ISC_SCHAR*, - isc_db_handle*, - short, - const ISC_SCHAR*, - short); - -ISC_STATUS ISC_EXPORT isc_database_info(ISC_STATUS*, - isc_db_handle*, - short, - const ISC_SCHAR*, - short, - ISC_SCHAR*); - -void ISC_EXPORT isc_decode_date(const ISC_QUAD*, - void*); - -void ISC_EXPORT isc_decode_sql_date(const ISC_DATE*, - void*); - -void ISC_EXPORT isc_decode_sql_time(const ISC_TIME*, - void*); - -void ISC_EXPORT isc_decode_timestamp(const ISC_TIMESTAMP*, - void*); - -ISC_STATUS ISC_EXPORT isc_detach_database(ISC_STATUS *, - isc_db_handle *); - -ISC_STATUS ISC_EXPORT isc_drop_database(ISC_STATUS *, - isc_db_handle *); - -ISC_STATUS ISC_EXPORT isc_dsql_allocate_statement(ISC_STATUS *, - isc_db_handle *, - isc_stmt_handle *); - -ISC_STATUS ISC_EXPORT isc_dsql_alloc_statement2(ISC_STATUS *, - isc_db_handle *, - isc_stmt_handle *); - -ISC_STATUS ISC_EXPORT isc_dsql_describe(ISC_STATUS *, - isc_stmt_handle *, - unsigned short, - XSQLDA *); - -ISC_STATUS ISC_EXPORT isc_dsql_describe_bind(ISC_STATUS *, - isc_stmt_handle *, - unsigned short, - XSQLDA *); - -ISC_STATUS ISC_EXPORT isc_dsql_exec_immed2(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - const XSQLDA*, - const XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_dsql_execute(ISC_STATUS*, - isc_tr_handle*, - isc_stmt_handle*, - unsigned short, - const XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_dsql_execute2(ISC_STATUS*, - isc_tr_handle*, - isc_stmt_handle*, - unsigned short, - const XSQLDA*, - const XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - const XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_dsql_fetch(ISC_STATUS *, - isc_stmt_handle *, - unsigned short, - const XSQLDA *); - -ISC_STATUS ISC_EXPORT isc_dsql_finish(isc_db_handle *); - -ISC_STATUS ISC_EXPORT isc_dsql_free_statement(ISC_STATUS *, - isc_stmt_handle *, - unsigned short); - -ISC_STATUS ISC_EXPORT isc_dsql_insert(ISC_STATUS*, - isc_stmt_handle*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_dsql_prepare(ISC_STATUS*, - isc_tr_handle*, - isc_stmt_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_dsql_set_cursor_name(ISC_STATUS*, - isc_stmt_handle*, - const ISC_SCHAR*, - unsigned short); - -ISC_STATUS ISC_EXPORT isc_dsql_sql_info(ISC_STATUS*, - isc_stmt_handle*, - short, - const ISC_SCHAR*, - short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT fb_dsql_set_timeout(ISC_STATUS*, - isc_stmt_handle*, - ISC_ULONG); - -/*ISC_STATUS ISC_EXPORT fb_get_statement_interface(ISC_STATUS*, - FB_API_HANDLE*, - void**); - */ -void ISC_EXPORT isc_encode_date(const void*, - ISC_QUAD*); - -void ISC_EXPORT isc_encode_sql_date(const void*, - ISC_DATE*); - -void ISC_EXPORT isc_encode_sql_time(const void*, - ISC_TIME*); - -void ISC_EXPORT isc_encode_timestamp(const void*, - ISC_TIMESTAMP*); - -ISC_LONG ISC_EXPORT_VARARG isc_event_block(ISC_UCHAR**, - ISC_UCHAR**, - ISC_USHORT, ...); - -ISC_USHORT ISC_EXPORT isc_event_block_a(ISC_SCHAR**, - ISC_SCHAR**, - ISC_USHORT, - ISC_SCHAR**); - -void ISC_EXPORT isc_event_block_s(ISC_SCHAR**, - ISC_SCHAR**, - ISC_USHORT, - ISC_SCHAR**, - ISC_USHORT*); - -void ISC_EXPORT isc_event_counts(ISC_ULONG*, - short, - ISC_UCHAR*, - const ISC_UCHAR *); - -/* 17 May 2001 - isc_expand_dpb is DEPRECATED */ -void FB_API_DEPRECATED ISC_EXPORT_VARARG isc_expand_dpb(ISC_SCHAR**, - short*, ...); - -int ISC_EXPORT isc_modify_dpb(ISC_SCHAR**, - short*, - unsigned short, - const ISC_SCHAR*, - short); - -ISC_LONG ISC_EXPORT isc_free(ISC_SCHAR *); - -ISC_STATUS ISC_EXPORT isc_get_segment(ISC_STATUS *, - isc_blob_handle *, - unsigned short *, - unsigned short, - ISC_SCHAR *); - -ISC_STATUS ISC_EXPORT isc_get_slice(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - ISC_QUAD*, - short, - const ISC_SCHAR*, - short, - const ISC_LONG*, - ISC_LONG, - void*, - ISC_LONG*); - -/* CVC: This non-const signature is needed for compatibility, see gds.cpp. */ -ISC_LONG FB_API_DEPRECATED ISC_EXPORT isc_interprete(ISC_SCHAR*, - ISC_STATUS**); - -/* This const params version used in the engine and other places. */ -ISC_LONG ISC_EXPORT fb_interpret(ISC_SCHAR*, - unsigned int, - const ISC_STATUS**); - -ISC_STATUS ISC_EXPORT isc_open_blob(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - isc_blob_handle*, - ISC_QUAD*); - -ISC_STATUS ISC_EXPORT isc_open_blob2(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - isc_blob_handle*, - ISC_QUAD*, - ISC_USHORT, - const ISC_UCHAR*); - -ISC_STATUS ISC_EXPORT isc_prepare_transaction2(ISC_STATUS*, - isc_tr_handle*, - ISC_USHORT, - const ISC_UCHAR*); - -void ISC_EXPORT isc_print_sqlerror(ISC_SHORT, - const ISC_STATUS*); - -ISC_STATUS ISC_EXPORT isc_print_status(const ISC_STATUS*); - -ISC_STATUS ISC_EXPORT isc_put_segment(ISC_STATUS*, - isc_blob_handle*, - unsigned short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_put_slice(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - ISC_QUAD*, - short, - const ISC_SCHAR*, - short, - const ISC_LONG*, - ISC_LONG, - void*); - -ISC_STATUS ISC_EXPORT isc_que_events(ISC_STATUS*, - isc_db_handle*, - ISC_LONG*, - short, - const ISC_UCHAR*, - ISC_EVENT_CALLBACK, - void*); - -ISC_STATUS ISC_EXPORT isc_rollback_retaining(ISC_STATUS*, - isc_tr_handle*); - -ISC_STATUS ISC_EXPORT isc_rollback_transaction(ISC_STATUS*, - isc_tr_handle*); - -ISC_STATUS ISC_EXPORT isc_start_multiple(ISC_STATUS*, - isc_tr_handle*, - short, - void *); - -ISC_STATUS ISC_EXPORT_VARARG isc_start_transaction(ISC_STATUS*, - isc_tr_handle*, - short, ...); - -ISC_STATUS ISC_EXPORT fb_disconnect_transaction(ISC_STATUS*, isc_tr_handle*); - -ISC_LONG ISC_EXPORT isc_sqlcode(const ISC_STATUS*); - -void ISC_EXPORT isc_sqlcode_s(const ISC_STATUS*, - ISC_ULONG*); - -void ISC_EXPORT fb_sqlstate(char*, - const ISC_STATUS*); - -void ISC_EXPORT isc_sql_interprete(short, - ISC_SCHAR*, - short); - -ISC_STATUS ISC_EXPORT isc_transaction_info(ISC_STATUS*, - isc_tr_handle*, - short, - const ISC_SCHAR*, - short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_transact_request(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - ISC_SCHAR*, - unsigned short, - ISC_SCHAR*, - unsigned short, - ISC_SCHAR*); - -ISC_LONG ISC_EXPORT isc_vax_integer(const ISC_SCHAR*, - short); - -ISC_INT64 ISC_EXPORT isc_portable_integer(const ISC_UCHAR*, - short); - -/*************************************/ -/* Security Functions and structures */ -/*************************************/ - -#define sec_uid_spec 0x01 -#define sec_gid_spec 0x02 -#define sec_server_spec 0x04 -#define sec_password_spec 0x08 -#define sec_group_name_spec 0x10 -#define sec_first_name_spec 0x20 -#define sec_middle_name_spec 0x40 -#define sec_last_name_spec 0x80 -#define sec_dba_user_name_spec 0x100 -#define sec_dba_password_spec 0x200 - -#define sec_protocol_tcpip 1 -#define sec_protocol_netbeui 2 -#define sec_protocol_spx 3 /* -- Deprecated Protocol. Declaration retained for compatibility */ -#define sec_protocol_local 4 - -typedef struct { - short sec_flags; /* which fields are specified */ - int uid; /* the user's id */ - int gid; /* the user's group id */ - int protocol; /* protocol to use for connection */ - ISC_SCHAR *server; /* server to administer */ - ISC_SCHAR *user_name; /* the user's name */ - ISC_SCHAR *password; /* the user's password */ - ISC_SCHAR *group_name; /* the group name */ - ISC_SCHAR *first_name; /* the user's first name */ - ISC_SCHAR *middle_name; /* the user's middle name */ - ISC_SCHAR *last_name; /* the user's last name */ - ISC_SCHAR *dba_user_name; /* the dba user name */ - ISC_SCHAR *dba_password; /* the dba password */ -} USER_SEC_DATA; - -ISC_STATUS ISC_EXPORT isc_add_user(ISC_STATUS*, const USER_SEC_DATA*); - -ISC_STATUS ISC_EXPORT isc_delete_user(ISC_STATUS*, const USER_SEC_DATA*); - -ISC_STATUS ISC_EXPORT isc_modify_user(ISC_STATUS*, const USER_SEC_DATA*); - -/**********************************/ -/* Other OSRI functions */ -/**********************************/ - -ISC_STATUS ISC_EXPORT isc_compile_request(ISC_STATUS*, - isc_db_handle*, - isc_req_handle*, - short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_compile_request2(ISC_STATUS*, - isc_db_handle*, - isc_req_handle*, - short, - const ISC_SCHAR*); - -// This function always returns error since FB 3.0. -ISC_STATUS FB_API_DEPRECATED ISC_EXPORT isc_ddl(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_prepare_transaction(ISC_STATUS*, - isc_tr_handle*); - - -ISC_STATUS ISC_EXPORT isc_receive(ISC_STATUS*, - isc_req_handle*, - short, - short, - void*, - short); - -ISC_STATUS ISC_EXPORT isc_reconnect_transaction(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_release_request(ISC_STATUS*, - isc_req_handle*); - -ISC_STATUS ISC_EXPORT isc_request_info(ISC_STATUS*, - isc_req_handle*, - short, - short, - const ISC_SCHAR*, - short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_seek_blob(ISC_STATUS*, - isc_blob_handle*, - short, - ISC_LONG, - ISC_LONG*); - -ISC_STATUS ISC_EXPORT isc_send(ISC_STATUS*, - isc_req_handle*, - short, - short, - const void*, - short); - -ISC_STATUS ISC_EXPORT isc_start_and_send(ISC_STATUS*, - isc_req_handle*, - isc_tr_handle*, - short, - short, - const void*, - short); - -ISC_STATUS ISC_EXPORT isc_start_request(ISC_STATUS *, - isc_req_handle *, - isc_tr_handle *, - short); - -ISC_STATUS ISC_EXPORT isc_unwind_request(ISC_STATUS *, - isc_tr_handle *, - short); - -ISC_STATUS ISC_EXPORT isc_wait_for_event(ISC_STATUS*, - isc_db_handle*, - short, - const ISC_UCHAR*, - ISC_UCHAR*); - - -/*****************************/ -/* Other Sql functions */ -/*****************************/ - -ISC_STATUS ISC_EXPORT isc_close(ISC_STATUS*, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_declare(ISC_STATUS*, - const ISC_SCHAR*, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_describe(ISC_STATUS*, - const ISC_SCHAR*, - XSQLDA *); - -ISC_STATUS ISC_EXPORT isc_describe_bind(ISC_STATUS*, - const ISC_SCHAR*, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_execute(ISC_STATUS*, - isc_tr_handle*, - const ISC_SCHAR*, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_execute_immediate(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - short*, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_fetch(ISC_STATUS*, - const ISC_SCHAR*, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_open(ISC_STATUS*, - isc_tr_handle*, - const ISC_SCHAR*, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_prepare(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - const ISC_SCHAR*, - const short*, - const ISC_SCHAR*, - XSQLDA*); - - -/*************************************/ -/* Other Dynamic sql functions */ -/*************************************/ - -ISC_STATUS ISC_EXPORT isc_dsql_execute_m(ISC_STATUS*, - isc_tr_handle*, - isc_stmt_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_execute2_m(ISC_STATUS*, - isc_tr_handle*, - isc_stmt_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate_m(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_exec_immed3_m(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - const ISC_SCHAR*, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_fetch_m(ISC_STATUS*, - isc_stmt_handle*, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_insert_m(ISC_STATUS*, - isc_stmt_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_prepare_m(ISC_STATUS*, - isc_tr_handle*, - isc_stmt_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - const ISC_SCHAR*, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_dsql_release(ISC_STATUS*, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_close(ISC_STATUS*, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_declare(ISC_STATUS*, - const ISC_SCHAR*, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_describe(ISC_STATUS*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_describe_bind(ISC_STATUS*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_execute(ISC_STATUS*, - isc_tr_handle*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_execute2(ISC_STATUS*, - isc_tr_handle*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_execute_immed(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch(ISC_STATUS*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch_a(ISC_STATUS*, - int*, - const ISC_SCHAR*, - ISC_USHORT, - XSQLDA*); - -void ISC_EXPORT isc_embed_dsql_length(const ISC_UCHAR*, - ISC_USHORT*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_open(ISC_STATUS*, - isc_tr_handle*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_open2(ISC_STATUS*, - isc_tr_handle*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_insert(ISC_STATUS*, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_prepare(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - const ISC_SCHAR*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - XSQLDA*); - -ISC_STATUS ISC_EXPORT isc_embed_dsql_release(ISC_STATUS*, - const ISC_SCHAR*); - - -/******************************/ -/* Other Blob functions */ -/******************************/ - -FB_BLOB_STREAM ISC_EXPORT BLOB_open(isc_blob_handle, - ISC_SCHAR*, - int); - -int ISC_EXPORT BLOB_put(ISC_SCHAR, - FB_BLOB_STREAM); - -int ISC_EXPORT BLOB_close(FB_BLOB_STREAM); - -int ISC_EXPORT BLOB_get(FB_BLOB_STREAM); - -int ISC_EXPORT BLOB_display(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - -int ISC_EXPORT BLOB_dump(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - -int ISC_EXPORT BLOB_edit(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - -int ISC_EXPORT BLOB_load(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - -int ISC_EXPORT BLOB_text_dump(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - -int ISC_EXPORT BLOB_text_load(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - -FB_BLOB_STREAM ISC_EXPORT Bopen(ISC_QUAD*, - isc_db_handle, - isc_tr_handle, - const ISC_SCHAR*); - - -/******************************/ -/* Other Misc functions */ -/******************************/ - -ISC_LONG ISC_EXPORT isc_ftof(const ISC_SCHAR*, - const unsigned short, - ISC_SCHAR*, - const unsigned short); - -ISC_STATUS ISC_EXPORT isc_print_blr(const ISC_SCHAR*, - ISC_PRINT_CALLBACK, - void*, - short); - -int ISC_EXPORT fb_print_blr(const ISC_UCHAR*, - ISC_ULONG, - ISC_PRINT_CALLBACK, - void*, - short); - -void ISC_EXPORT isc_set_debug(int); - -void ISC_EXPORT isc_qtoq(const ISC_QUAD*, - ISC_QUAD*); - -void ISC_EXPORT isc_vtof(const ISC_SCHAR*, - ISC_SCHAR*, - unsigned short); - -void ISC_EXPORT isc_vtov(const ISC_SCHAR*, - ISC_SCHAR*, - short); - -int ISC_EXPORT isc_version(isc_db_handle*, - ISC_VERSION_CALLBACK, - void*); - -ISC_LONG FB_API_DEPRECATED ISC_EXPORT isc_reset_fpe(ISC_USHORT); - -uintptr_t ISC_EXPORT isc_baddress(ISC_SCHAR*); -void ISC_EXPORT isc_baddress_s(const ISC_SCHAR*, - uintptr_t*); - -/*****************************************/ -/* Service manager functions */ -/*****************************************/ - -#define ADD_SPB_LENGTH(p, length) {*(p)++ = (length); \ - *(p)++ = (length) >> 8;} - -#define ADD_SPB_NUMERIC(p, data) {*(p)++ = (ISC_SCHAR) (ISC_UCHAR) (data); \ - *(p)++ = (ISC_SCHAR) (ISC_UCHAR) ((data) >> 8); \ - *(p)++ = (ISC_SCHAR) (ISC_UCHAR) ((data) >> 16); \ - *(p)++ = (ISC_SCHAR) (ISC_UCHAR) ((data) >> 24);} - -ISC_STATUS ISC_EXPORT isc_service_attach(ISC_STATUS*, - unsigned short, - const ISC_SCHAR*, - isc_svc_handle*, - unsigned short, - const ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_service_detach(ISC_STATUS *, - isc_svc_handle *); - -ISC_STATUS ISC_EXPORT isc_service_query(ISC_STATUS*, - isc_svc_handle*, - isc_resv_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - ISC_SCHAR*); - -ISC_STATUS ISC_EXPORT isc_service_start(ISC_STATUS*, - isc_svc_handle*, - isc_resv_handle*, - unsigned short, - const ISC_SCHAR*); - -/***********************/ -/* Shutdown and cancel */ -/***********************/ - -int ISC_EXPORT fb_shutdown(unsigned int, const int); - -ISC_STATUS ISC_EXPORT fb_shutdown_callback(ISC_STATUS*, - FB_SHUTDOWN_CALLBACK, - const int, - void*); - -ISC_STATUS ISC_EXPORT fb_cancel_operation(ISC_STATUS*, - isc_db_handle*, - ISC_USHORT); - -/***********************/ -/* Ping the connection */ -/***********************/ - -ISC_STATUS ISC_EXPORT fb_ping(ISC_STATUS*, isc_db_handle*); - -/********************/ -/* Object interface */ -/********************/ - -ISC_STATUS ISC_EXPORT fb_get_database_handle(ISC_STATUS*, isc_db_handle*, void*); -ISC_STATUS ISC_EXPORT fb_get_transaction_handle(ISC_STATUS*, isc_tr_handle*, void*); - -/********************************/ -/* Client information functions */ -/********************************/ - -void ISC_EXPORT isc_get_client_version ( ISC_SCHAR *); -int ISC_EXPORT isc_get_client_major_version (); -int ISC_EXPORT isc_get_client_minor_version (); - -/*******************************************/ -/* Set callback for database crypt plugins */ -/*******************************************/ - -ISC_STATUS ISC_EXPORT fb_database_crypt_callback(ISC_STATUS*, void*); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -/***************************************************/ -/* Actions to pass to the blob filter (ctl_source) */ -/***************************************************/ - -#define isc_blob_filter_open 0 -#define isc_blob_filter_get_segment 1 -#define isc_blob_filter_close 2 -#define isc_blob_filter_create 3 -#define isc_blob_filter_put_segment 4 -#define isc_blob_filter_alloc 5 -#define isc_blob_filter_free 6 -#define isc_blob_filter_seek 7 - -/*******************/ -/* Blr definitions */ -/*******************/ - -#include "blr.h" - -#include "consts_pub.h" - -/*********************************/ -/* Information call declarations */ -/*********************************/ - -#include "../jrd/inf_pub.h" - -#include "iberror.h" - -#endif /* JRD_IBASE_H */ - diff --git a/src/jrd/recsrc/RecordSource.h b/src/jrd/recsrc/RecordSource.h index 7e48b8d590..c16441eb69 100644 --- a/src/jrd/recsrc/RecordSource.h +++ b/src/jrd/recsrc/RecordSource.h @@ -29,7 +29,7 @@ #include "../jrd/RecordSourceNodes.h" #include "../jrd/req.h" #include "../jrd/rse.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../jrd/evl_proto.h" namespace Jrd diff --git a/src/jrd/replication/Applier.cpp b/src/jrd/replication/Applier.cpp index ac21c3977b..a326481dc2 100644 --- a/src/jrd/replication/Applier.cpp +++ b/src/jrd/replication/Applier.cpp @@ -27,7 +27,7 @@ #include "../jrd/blb.h" #include "../jrd/req.h" #include "../jrd/ini.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/btr_proto.h" #include "../jrd/cch_proto.h" #include "../jrd/cmp_proto.h" @@ -41,7 +41,7 @@ #include "../jrd/tra_proto.h" #include "../jrd/vio_proto.h" #include "../dsql/dsql_proto.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "Applier.h" #include "Protocol.h" diff --git a/src/jrd/replication/Publisher.cpp b/src/jrd/replication/Publisher.cpp index 28f3ac4f3d..63bb4dd138 100644 --- a/src/jrd/replication/Publisher.cpp +++ b/src/jrd/replication/Publisher.cpp @@ -25,7 +25,7 @@ #include "../jrd/ods.h" #include "../jrd/req.h" #include "../jrd/tra.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../jrd/trig.h" #include "../jrd/Database.h" #include "../jrd/blb_proto.h" diff --git a/src/jrd/svc.h b/src/jrd/svc.h index d56ba61870..dd528101dc 100644 --- a/src/jrd/svc.h +++ b/src/jrd/svc.h @@ -27,7 +27,7 @@ #include #include "fb_blk.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "../jrd/svc_undoc.h" #include "../common/ThreadStart.h" @@ -201,7 +201,7 @@ public: // external interface with service return svc_sql_role; } - // return true if user have admin privileges in security database used + // return true if user have admin privileges in security database used // for service user authentication bool getUserAdminFlag() const; diff --git a/src/jrd/trace/TraceCmdLine.cpp b/src/jrd/trace/TraceCmdLine.cpp index a053fe87ca..9c9a739f1a 100644 --- a/src/jrd/trace/TraceCmdLine.cpp +++ b/src/jrd/trace/TraceCmdLine.cpp @@ -25,7 +25,7 @@ */ #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "fb_exception.h" #include "iberror.h" #include "../../common/classes/fb_string.h" diff --git a/src/jrd/trace/TraceService.cpp b/src/jrd/trace/TraceService.cpp index a7d2267aed..0de27f126b 100644 --- a/src/jrd/trace/TraceService.cpp +++ b/src/jrd/trace/TraceService.cpp @@ -25,7 +25,7 @@ */ #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "fb_exception.h" #include "iberror.h" #include "../../common/classes/fb_string.h" @@ -359,7 +359,7 @@ bool TraceSvcJrd::checkPrivileges(TraceSession& session) if (m_admin || m_user.hasData() && (m_user == session.ses_user)) return true; - // Other session is fully authorized - try to map our auth info using other's + // Other session is fully authorized - try to map our auth info using other's // security database if (session.ses_auth.hasData()) { @@ -370,7 +370,7 @@ bool TraceSvcJrd::checkPrivileges(TraceSession& session) PathName dummy; RefPtr config; - expandDatabaseName(info.secDb.hasData() ? + expandDatabaseName(info.secDb.hasData() ? info.secDb.ToPathName() : m_svc.getExpectedDb(), dummy, &config); Mapping mapping(Mapping::MAP_NO_FLAGS, m_svc.getCryptCallback()); diff --git a/src/jrd/trace/TraceService.h b/src/jrd/trace/TraceService.h index 29069f7432..1a950bdc84 100644 --- a/src/jrd/trace/TraceService.h +++ b/src/jrd/trace/TraceService.h @@ -28,7 +28,7 @@ #define JRD_TRACESERVICE_H #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "fb_exception.h" #include "iberror.h" #include "../../common/classes/fb_string.h" diff --git a/src/jrd/validation.cpp b/src/jrd/validation.cpp index ab13de5a30..3d0f5d2d4b 100644 --- a/src/jrd/validation.cpp +++ b/src/jrd/validation.cpp @@ -545,7 +545,7 @@ VI. ADDITIONAL NOTES #include #include "../jrd/jrd.h" #include "../jrd/pag.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../jrd/val.h" #include "../jrd/btr.h" #include "../jrd/btn.h" diff --git a/src/misc/codes.epp b/src/misc/codes.epp index 2bbbd13919..cd96a95f9a 100644 --- a/src/misc/codes.epp +++ b/src/misc/codes.epp @@ -28,7 +28,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/msg_encode.h" // The MSG.GDB database is found under the /msgs component subdirectory. diff --git a/src/misc/headers.sed b/src/misc/headers.sed deleted file mode 100644 index ddc5db327b..0000000000 --- a/src/misc/headers.sed +++ /dev/null @@ -1,9 +0,0 @@ -s/#include "types_pub.h"//g -s/#include "blr.h"//g -s/#include "iberror.h"//g -s/#include "sqlda_pub.h"//g -s/#include "..\/dsql\/sqlda_pub.h"//g -s/#include "inf_pub.h"//g -s/#include "..\/jrd\/inf_pub.h"//g -s/#include "dsc_pub.h"//g -s/#include "..\/common\/dsc_pub.h"//g diff --git a/src/misc/ibase_header.txt b/src/misc/ibase_header.txt deleted file mode 100644 index f37db06c3f..0000000000 --- a/src/misc/ibase_header.txt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Module: ibase.h - * - * The content of this file was generated by the Firebird project - * and is a concatenation of several header source files, that may - * also explain the unusual #ifdef structures within this file. - * - * - * This file is automatically generated - do not edit! - * - */ diff --git a/src/misc/makeHeader.cpp b/src/misc/makeHeader.cpp deleted file mode 100644 index c5a76516c2..0000000000 --- a/src/misc/makeHeader.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include -#include -#include -//#ifdef HAVE_UNISTD_H -#include -//#endif - - - -void ProcessFile(FILE *in, bool stripFirstComment) -{ - char s[256]; - bool striping = false; - while (fgets(s, sizeof(s), in)) - { - if (stripFirstComment) - { - char *x = strstr(s, "/*"); - if (x) - { - striping = true; - stripFirstComment = false; - continue; - } - } - if (striping) - { - char *x = strstr(s, "*/"); - if (x) { - striping = false; - } - continue; - } - const char* include = "#include"; - if (memcmp(s, include, strlen(include))) - { - fputs(s, stdout); - continue; - } - char *p = strchr(s, '<'); - if (p) - { - fputs(s, stdout); - continue; - } - p = strchr(s, '"'); - if (! p) { - throw "#include misses \" - start of filename"; - } - ++p; - char *p2 = strchr(p, '"'); - if (! p2) { - throw "#include misses \" - end of filename"; - } - *p2 = 0; - p2 = strrchr(p, '/'); // always open files in current directory - if (p2) { - p = p2 + 1; - } - FILE *newIn = fopen(p, "rt"); - if (! newIn) { - continue; - } - ProcessFile(newIn, true); - fclose(newIn); - // clean after Makefile's cp - unlink(p); - } -} - - -int main() -{ - try { - ProcessFile(stdin, false); - } - catch (const char* x) - { - fprintf(stderr, "%s\n", x); - return 1; - } - return 0; -} diff --git a/src/msgs/build_file.epp b/src/msgs/build_file.epp index 5eda8649b6..460fdd92f2 100644 --- a/src/msgs/build_file.epp +++ b/src/msgs/build_file.epp @@ -31,7 +31,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/msg.h" #include "../yvalve/gds_proto.h" diff --git a/src/msgs/change_msgs.epp b/src/msgs/change_msgs.epp index 443c5e54a5..2e0ab8486e 100644 --- a/src/msgs/change_msgs.epp +++ b/src/msgs/change_msgs.epp @@ -23,7 +23,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include diff --git a/src/msgs/check_msgs.epp b/src/msgs/check_msgs.epp index 39c8d76774..24da292099 100644 --- a/src/msgs/check_msgs.epp +++ b/src/msgs/check_msgs.epp @@ -38,7 +38,7 @@ # endif #endif -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" DATABASE DB = "msg.fdb"; diff --git a/src/msgs/enter_msgs.epp b/src/msgs/enter_msgs.epp index e1dab7c32d..34ffc76b60 100644 --- a/src/msgs/enter_msgs.epp +++ b/src/msgs/enter_msgs.epp @@ -24,7 +24,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #ifdef HAVE_STRING_H #include diff --git a/src/msgs/load.epp b/src/msgs/load.epp index fe21b7c2d1..ad4ff58839 100644 --- a/src/msgs/load.epp +++ b/src/msgs/load.epp @@ -17,7 +17,7 @@ * Contributor(s): ______________________________________. */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" DATABASE DB = "msg.fdb"; diff --git a/src/msgs/modify_msgs.epp b/src/msgs/modify_msgs.epp index 0a9dc71fb1..e41b6fa73c 100644 --- a/src/msgs/modify_msgs.epp +++ b/src/msgs/modify_msgs.epp @@ -23,7 +23,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include diff --git a/src/plugins/udr_engine/UdrEngine.cpp b/src/plugins/udr_engine/UdrEngine.cpp index 8fb0ab68d1..f2484dc48a 100644 --- a/src/plugins/udr_engine/UdrEngine.cpp +++ b/src/plugins/udr_engine/UdrEngine.cpp @@ -21,7 +21,7 @@ */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "firebird/Interface.h" #include "../common/classes/alloc.h" #include "../common/classes/array.h" diff --git a/src/qli/command.cpp b/src/qli/command.cpp index fbbf4fb274..d9abad1c20 100644 --- a/src/qli/command.cpp +++ b/src/qli/command.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/dtr.h" #include "../qli/parse.h" #include "../qli/compile.h" diff --git a/src/qli/dtr.cpp b/src/qli/dtr.cpp index f8d42c0204..65c5ddf6a7 100644 --- a/src/qli/dtr.cpp +++ b/src/qli/dtr.cpp @@ -38,7 +38,7 @@ #include "../qli/compile.h" #include "../yvalve/perf.h" #include "../jrd/license.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/exe.h" #include "../qli/all_proto.h" #include "../qli/compi_proto.h" diff --git a/src/qli/eval.cpp b/src/qli/eval.cpp index 6c0f84c94a..b8febb699b 100644 --- a/src/qli/eval.cpp +++ b/src/qli/eval.cpp @@ -24,7 +24,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/dtr.h" #include "../qli/exe.h" #include "../qli/parse.h" diff --git a/src/qli/exe.cpp b/src/qli/exe.cpp index f2fbaca91d..e1ec994ab7 100644 --- a/src/qli/exe.cpp +++ b/src/qli/exe.cpp @@ -25,7 +25,7 @@ #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/why_proto.h" #include "../qli/dtr.h" #include "../qli/exe.h" diff --git a/src/qli/format.cpp b/src/qli/format.cpp index 0fe9c7b719..3bdd853a44 100644 --- a/src/qli/format.cpp +++ b/src/qli/format.cpp @@ -26,7 +26,7 @@ #include #include "../qli/dtr.h" #include "../qli/exe.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/compile.h" #include "../qli/report.h" #include "../qli/format.h" diff --git a/src/qli/gener.cpp b/src/qli/gener.cpp index 8d6ea5f2b8..14e0ea35ba 100644 --- a/src/qli/gener.cpp +++ b/src/qli/gener.cpp @@ -25,7 +25,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/dtr.h" #include "../jrd/align.h" #include "../qli/exe.h" diff --git a/src/qli/help.epp b/src/qli/help.epp index 10ffd51ba0..be0d24f9a2 100644 --- a/src/qli/help.epp +++ b/src/qli/help.epp @@ -27,7 +27,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/dtr.h" #include "../qli/compile.h" #include "../qli/parse.h" diff --git a/src/qli/lex.cpp b/src/qli/lex.cpp index 1af4e7426d..60f0185077 100644 --- a/src/qli/lex.cpp +++ b/src/qli/lex.cpp @@ -31,7 +31,7 @@ #include #include "../qli/dtr.h" #include "../qli/parse.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/all_proto.h" #include "../qli/err_proto.h" #include "../qli/hsh_proto.h" diff --git a/src/qli/meta.epp b/src/qli/meta.epp index 2d557161b9..663f50e668 100644 --- a/src/qli/meta.epp +++ b/src/qli/meta.epp @@ -29,7 +29,7 @@ #include "../qli/compile.h" #include "../qli/exe.h" #include "../jrd/flags.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/reqs.h" #include "../qli/all_proto.h" #include "../qli/err_proto.h" diff --git a/src/qli/proc.epp b/src/qli/proc.epp index 908def746f..5621f3a517 100644 --- a/src/qli/proc.epp +++ b/src/qli/proc.epp @@ -27,7 +27,7 @@ #include "firebird.h" #include "dyn_consts.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/dtr.h" #include "../qli/parse.h" #include "../qli/compile.h" diff --git a/src/qli/qliswi.h b/src/qli/qliswi.h index 243e225f94..59d928c849 100644 --- a/src/qli/qliswi.h +++ b/src/qli/qliswi.h @@ -25,7 +25,7 @@ #ifndef QLI_QLISWI_H #define QLI_QLISWI_H -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/constants.h" enum qli_switches diff --git a/src/qli/show.epp b/src/qli/show.epp index cb26851c71..b30d4f6a06 100644 --- a/src/qli/show.epp +++ b/src/qli/show.epp @@ -24,7 +24,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../qli/dtr.h" #include "../qli/parse.h" #include "../qli/compile.h" diff --git a/src/remote/client/BlrFromMessage.cpp b/src/remote/client/BlrFromMessage.cpp index 6d85429354..e486d37377 100644 --- a/src/remote/client/BlrFromMessage.cpp +++ b/src/remote/client/BlrFromMessage.cpp @@ -30,7 +30,7 @@ #include "BlrFromMessage.h" #include "../common/StatusHolder.h" #include "../jrd/align.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../remote/protocol.h" using namespace Firebird; diff --git a/src/remote/client/interface.cpp b/src/remote/client/interface.cpp index a112dcf2d1..32c9eabef7 100644 --- a/src/remote/client/interface.cpp +++ b/src/remote/client/interface.cpp @@ -43,7 +43,7 @@ #include #endif -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/ThreadStart.h" #include "../jrd/license.h" #include "../remote/inet_proto.h" diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 1a9190f3bb..2f5c6e672b 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -101,7 +101,7 @@ const int INET_RETRY_CALL = 5; #include "../remote/remote.h" #include "../remote/SockAddr.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../remote/inet_proto.h" #include "../remote/proto_proto.h" #include "../remote/remot_proto.h" diff --git a/src/remote/merge.cpp b/src/remote/merge.cpp index 8dc424a41a..8a06725b11 100644 --- a/src/remote/merge.cpp +++ b/src/remote/merge.cpp @@ -23,7 +23,7 @@ #include "firebird.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../remote/remote.h" #include "../remote/merge_proto.h" #include "../yvalve/gds_proto.h" diff --git a/src/remote/os/win32/wnet.cpp b/src/remote/os/win32/wnet.cpp index f60f319024..b28e2d4e66 100644 --- a/src/remote/os/win32/wnet.cpp +++ b/src/remote/os/win32/wnet.cpp @@ -30,7 +30,7 @@ #include #include #include "../remote/remote.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../utilities/install/install_nt.h" diff --git a/src/remote/os/win32/xnet.cpp b/src/remote/os/win32/xnet.cpp index fecc604649..2a45d326d4 100644 --- a/src/remote/os/win32/xnet.cpp +++ b/src/remote/os/win32/xnet.cpp @@ -26,7 +26,7 @@ #include "firebird.h" #include #include "../../../remote/remote.h" -#include "../../../jrd/ibase.h" +#include "ibase.h" #include "../../../remote/os/win32/xnet.h" #include "../../../utilities/install/install_nt.h" #include "../../../remote/proto_proto.h" diff --git a/src/remote/parser.cpp b/src/remote/parser.cpp index 11069451ae..de7c3a76af 100644 --- a/src/remote/parser.cpp +++ b/src/remote/parser.cpp @@ -25,7 +25,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../remote/remote.h" #include "../jrd/align.h" #include "../common/gdsassert.h" diff --git a/src/remote/remote.cpp b/src/remote/remote.cpp index f18a12133c..5e80d4dd16 100644 --- a/src/remote/remote.cpp +++ b/src/remote/remote.cpp @@ -24,7 +24,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../remote/remote.h" #include "../common/file_params.h" #include "../common/gdsassert.h" diff --git a/src/remote/server/ReplServer.cpp b/src/remote/server/ReplServer.cpp index c7a993f2f4..a43c26c801 100644 --- a/src/remote/server/ReplServer.cpp +++ b/src/remote/server/ReplServer.cpp @@ -24,7 +24,7 @@ #include "firebird/Message.h" #include "../common/common.h" #include "../jrd/constants.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/license.h" #include "../jrd/ods.h" #include "../common/os/guid.h" diff --git a/src/remote/server/os/posix/inet_server.cpp b/src/remote/server/os/posix/inet_server.cpp index f9fca41df5..1667ebf968 100644 --- a/src/remote/server/os/posix/inet_server.cpp +++ b/src/remote/server/os/posix/inet_server.cpp @@ -36,7 +36,7 @@ #include #include "../common/isc_proto.h" #include "../common/os/divorce.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/classes/init.h" #include "../common/config/config.h" #include "../common/os/fbsyslog.h" @@ -75,7 +75,7 @@ #endif #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../remote/remote.h" #include "../jrd/license.h" diff --git a/src/remote/server/os/win32/chop.cpp b/src/remote/server/os/win32/chop.cpp index ce546a48d6..3eb4b15a33 100644 --- a/src/remote/server/os/win32/chop.cpp +++ b/src/remote/server/os/win32/chop.cpp @@ -23,7 +23,7 @@ */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #define PATHSEP(c) ((c) == '\\' || (c) == '/') diff --git a/src/remote/server/os/win32/cntl.cpp b/src/remote/server/os/win32/cntl.cpp index 892d8cbdd6..7a3c58dd5b 100644 --- a/src/remote/server/os/win32/cntl.cpp +++ b/src/remote/server/os/win32/cntl.cpp @@ -32,7 +32,7 @@ #include "../common/isc_proto.h" #include "../jrd/jrd_proto.h" #include "../common/classes/init.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include diff --git a/src/remote/server/os/win32/property.cpp b/src/remote/server/os/win32/property.cpp index d8ece573ff..94a3eab1d0 100644 --- a/src/remote/server/os/win32/property.cpp +++ b/src/remote/server/os/win32/property.cpp @@ -46,7 +46,7 @@ #include "../../remote/server/os/win32/window_proto.h" #include "../../remote/server/os/win32/chop_proto.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/StatusHolder.h" diff --git a/src/remote/server/os/win32/window.cpp b/src/remote/server/os/win32/window.cpp index 9d4a099568..b20caf10c6 100644 --- a/src/remote/server/os/win32/window.cpp +++ b/src/remote/server/os/win32/window.cpp @@ -29,7 +29,7 @@ #include "../../remote/server/os/win32/window.rh" #include "../../remote/server/os/win32/property.rh" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/jrd_proto.h" #include "../../remote/server/os/win32/window_proto.h" #include "../../remote/server/os/win32/propty_proto.h" diff --git a/src/remote/server/server.cpp b/src/remote/server/server.cpp index 9b2be2a89d..5510396db4 100644 --- a/src/remote/server/server.cpp +++ b/src/remote/server/server.cpp @@ -31,7 +31,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" // fb_shutdown_callback() is used from it +#include "ibase.h" // fb_shutdown_callback() is used from it #include "../common/gdsassert.h" #ifdef UNIX #include "../common/file_params.h" @@ -54,7 +54,7 @@ #endif #include "../common/isc_proto.h" #include "../jrd/constants.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../common/classes/init.h" #include "../common/classes/semaphore.h" #include "../common/classes/ClumpletWriter.h" diff --git a/src/utilities/cache.cpp b/src/utilities/cache.cpp index a8450ee836..3ebe276cb2 100644 --- a/src/utilities/cache.cpp +++ b/src/utilities/cache.cpp @@ -26,7 +26,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/license.h" #include "../yvalve/gds_proto.h" #include "../yvalve/why_proto.h" diff --git a/src/utilities/create_db.cpp b/src/utilities/create_db.cpp index 4ae0973a2f..bd2ab37da2 100644 --- a/src/utilities/create_db.cpp +++ b/src/utilities/create_db.cpp @@ -1,7 +1,7 @@ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/classes/ClumpletWriter.h" #include diff --git a/src/utilities/fbcpl/stdafx.h b/src/utilities/fbcpl/stdafx.h index c189fb7447..85c631f89f 100644 --- a/src/utilities/fbcpl/stdafx.h +++ b/src/utilities/fbcpl/stdafx.h @@ -50,7 +50,7 @@ #include "fb_pthread.h" #endif -#include "../../jrd/ibase.h" +#include "../ibase.h" //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. diff --git a/src/utilities/fbsvcmgr/fbsvcmgr.cpp b/src/utilities/fbsvcmgr/fbsvcmgr.cpp index b8412b81fa..cb1bd5286f 100644 --- a/src/utilities/fbsvcmgr/fbsvcmgr.cpp +++ b/src/utilities/fbsvcmgr/fbsvcmgr.cpp @@ -36,7 +36,7 @@ #include #include #include "../yvalve/gds_proto.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/classes/ClumpletWriter.h" #include "../common/classes/timestamp.h" #include "../common/utils_proto.h" diff --git a/src/utilities/fbtracemgr/traceMgrMain.cpp b/src/utilities/fbtracemgr/traceMgrMain.cpp index 92a2593452..1eb6d639bf 100644 --- a/src/utilities/fbtracemgr/traceMgrMain.cpp +++ b/src/utilities/fbtracemgr/traceMgrMain.cpp @@ -34,7 +34,7 @@ #include "../../common/utils_proto.h" #include "../../common/os/os_utils.h" #include "../../jrd/trace/TraceService.h" -#include "../../jrd/ibase.h" +#include "../ibase.h" #ifdef HAVE_LOCALE_H #include diff --git a/src/utilities/gsec/gsec.cpp b/src/utilities/gsec/gsec.cpp index 600a5650d6..40cd436d22 100644 --- a/src/utilities/gsec/gsec.cpp +++ b/src/utilities/gsec/gsec.cpp @@ -28,7 +28,7 @@ #include #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../common/msg_encode.h" #include "../common/isc_f_proto.h" diff --git a/src/utilities/gstat/dba.epp b/src/utilities/gstat/dba.epp index a9f71b074d..23823c9cc3 100644 --- a/src/utilities/gstat/dba.epp +++ b/src/utilities/gstat/dba.epp @@ -38,7 +38,7 @@ #include #include "../jrd/ibsetjmp.h" #include "../common/classes/timestamp.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/ods.h" #include "../jrd/btn.h" #include "../jrd/license.h" diff --git a/src/utilities/gstat/ppg.cpp b/src/utilities/gstat/ppg.cpp index 7289d1e7e5..a706c2015e 100644 --- a/src/utilities/gstat/ppg.cpp +++ b/src/utilities/gstat/ppg.cpp @@ -28,7 +28,7 @@ #include #include #include "../common/classes/timestamp.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/ods.h" #include "../jrd/ods_proto.h" #include "../common/os/guid.h" diff --git a/src/utilities/ibmgr/ibmgr.cpp b/src/utilities/ibmgr/ibmgr.cpp index 918b30c4bd..d114d954fc 100644 --- a/src/utilities/ibmgr/ibmgr.cpp +++ b/src/utilities/ibmgr/ibmgr.cpp @@ -42,7 +42,7 @@ #ifdef HAVE_PWD_H #include #endif -#include "../jrd/ibase.h" +#include "ibase.h" #include "../utilities/ibmgr/ibmgr.h" #include "../utilities/ibmgr/ibmgrswi.h" #include "../jrd/license.h" diff --git a/src/utilities/ibmgr/srvrmgr.cpp b/src/utilities/ibmgr/srvrmgr.cpp index ea2c9fe976..6fda9e7979 100644 --- a/src/utilities/ibmgr/srvrmgr.cpp +++ b/src/utilities/ibmgr/srvrmgr.cpp @@ -36,7 +36,7 @@ #endif -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../common/gdsassert.h" #include "../jrd/svc_undoc.h" diff --git a/src/utilities/nbackup/nbackup.cpp b/src/utilities/nbackup/nbackup.cpp index 9f203f44f0..e63ab0a6fb 100644 --- a/src/utilities/nbackup/nbackup.cpp +++ b/src/utilities/nbackup/nbackup.cpp @@ -40,7 +40,7 @@ #include "../yvalve/gds_proto.h" #include "../common/os/path_utils.h" #include "../common/os/guid.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../common/utils_proto.h" #include "../common/classes/array.h" #include "../common/classes/ClumpletWriter.h" diff --git a/src/utilities/ntrace/TracePluginImpl.cpp b/src/utilities/ntrace/TracePluginImpl.cpp index a799d65f0f..d4793ebf81 100644 --- a/src/utilities/ntrace/TracePluginImpl.cpp +++ b/src/utilities/ntrace/TracePluginImpl.cpp @@ -32,7 +32,7 @@ #include "TracePluginImpl.h" #include "PluginLogWriter.h" #include "os/platform.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "codetext.h" #include "../../common/isc_f_proto.h" #include "../../jrd/RuntimeStatistics.h" @@ -42,8 +42,8 @@ #include "../../jrd/svc_undoc.h" #include "../../jrd/constants.h" #include "../../common/os/path_utils.h" -#include "../../jrd/inf_pub.h" -#include "../../dsql/sqlda_pub.h" +#include "firebird/impl/inf_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../../common/classes/ImplementHelper.h" #include "../../common/SimpleStatusVector.h" #include "../../jrd/status.h" diff --git a/src/utilities/print_pool.cpp b/src/utilities/print_pool.cpp index c515db51c1..bb02cffb1a 100644 --- a/src/utilities/print_pool.cpp +++ b/src/utilities/print_pool.cpp @@ -19,7 +19,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/svc_undoc.h" #include "../common/stuff.h" #include "../common/utils_proto.h" diff --git a/src/utilities/rebuild/rebuild.cpp b/src/utilities/rebuild/rebuild.cpp index be4ad68cd6..df5d187708 100644 --- a/src/utilities/rebuild/rebuild.cpp +++ b/src/utilities/rebuild/rebuild.cpp @@ -27,7 +27,7 @@ #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/jrd.h" #include "../jrd/jrd_time.h" #include "../jrd/pag.h" diff --git a/src/utilities/rebuild/rmet.epp b/src/utilities/rebuild/rmet.epp index 84d28e16e0..91d2c2efdd 100644 --- a/src/utilities/rebuild/rmet.epp +++ b/src/utilities/rebuild/rmet.epp @@ -22,7 +22,7 @@ */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/jrd.h" #include "../jrd/tra.h" #include "../jrd/pag.h" diff --git a/src/utilities/rebuild/rstore.epp b/src/utilities/rebuild/rstore.epp index b07e54c8fe..4d5dbadeb7 100644 --- a/src/utilities/rebuild/rstore.epp +++ b/src/utilities/rebuild/rstore.epp @@ -22,7 +22,7 @@ */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/ods.h" #include "../utilities/rebuild/rebuild.h" #include "../utilities/rebuild/rebui_proto.h" diff --git a/src/utilities/run_service.cpp b/src/utilities/run_service.cpp index 3ba5fd5cb2..b4a067eb7f 100644 --- a/src/utilities/run_service.cpp +++ b/src/utilities/run_service.cpp @@ -24,7 +24,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" static const SCHAR recv_items[] = { isc_info_svc_to_eof }; diff --git a/src/utilities/stats.epp b/src/utilities/stats.epp index 423de77ce1..0dc19a39e5 100644 --- a/src/utilities/stats.epp +++ b/src/utilities/stats.epp @@ -22,7 +22,7 @@ */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" DATABASE DB = "yachts.lnk"; diff --git a/src/yvalve/DistributedTransaction.cpp b/src/yvalve/DistributedTransaction.cpp index ab645f8eb0..61272b6296 100644 --- a/src/yvalve/DistributedTransaction.cpp +++ b/src/yvalve/DistributedTransaction.cpp @@ -32,7 +32,7 @@ #include "../yvalve/MasterImplementation.h" #include "../common/classes/rwlock.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #include "../common/isc_proto.h" #include "../jrd/acl.h" diff --git a/src/yvalve/MasterImplementation.cpp b/src/yvalve/MasterImplementation.cpp index 70d3be94bc..bb97ca2f88 100644 --- a/src/yvalve/MasterImplementation.cpp +++ b/src/yvalve/MasterImplementation.cpp @@ -44,7 +44,7 @@ #include "../common/ThreadStart.h" #include "../common/utils_proto.h" #include "../common/dllinst.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/utl_proto.h" using namespace Firebird; diff --git a/src/yvalve/PluginManager.cpp b/src/yvalve/PluginManager.cpp index c98d919c5d..bd63166db4 100644 --- a/src/yvalve/PluginManager.cpp +++ b/src/yvalve/PluginManager.cpp @@ -21,12 +21,12 @@ */ #include "firebird.h" -#include "consts_pub.h" +#include "firebird/impl/consts_pub.h" #include "iberror.h" #include "../yvalve/PluginManager.h" #include "../yvalve/MasterImplementation.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../yvalve/why_proto.h" #include "../common/os/path_utils.h" diff --git a/src/yvalve/YObjects.h b/src/yvalve/YObjects.h index f04db24b33..ec52aa27f9 100644 --- a/src/yvalve/YObjects.h +++ b/src/yvalve/YObjects.h @@ -236,7 +236,7 @@ public: YRequest(YAttachment* aAttachment, Firebird::IRequest* aNext); void destroy(unsigned dstrFlags); - FB_API_HANDLE& getHandle(); + isc_req_handle& getHandle(); // IRequest implementation void receive(Firebird::CheckStatusWrapper* status, int level, unsigned int msgType, @@ -253,7 +253,7 @@ public: public: AtomicAttPtr attachment; - FB_API_HANDLE* userHandle; + isc_req_handle* userHandle; }; class YTransaction FB_FINAL : @@ -265,7 +265,7 @@ public: YTransaction(YAttachment* aAttachment, Firebird::ITransaction* aNext); void destroy(unsigned dstrFlags); - FB_API_HANDLE& getHandle(); + isc_tr_handle& getHandle(); // ITransaction implementation void getInfo(Firebird::CheckStatusWrapper* status, unsigned int itemsLength, @@ -318,7 +318,7 @@ public: YBlob(YAttachment* aAttachment, YTransaction* aTransaction, Firebird::IBlob* aNext); void destroy(unsigned dstrFlags); - FB_API_HANDLE& getHandle(); + isc_blob_handle& getHandle(); // IBlob implementation void getInfo(Firebird::CheckStatusWrapper* status, unsigned int itemsLength, @@ -502,7 +502,7 @@ public: void destroy(unsigned dstrFlags); void shutdown(); - FB_API_HANDLE& getHandle(); + isc_db_handle& getHandle(); // IAttachment implementation void getInfo(Firebird::CheckStatusWrapper* status, unsigned int itemsLength, @@ -548,7 +548,7 @@ public: void addCleanupHandler(Firebird::CheckStatusWrapper* status, CleanupCallback* callback); YTransaction* getTransaction(Firebird::CheckStatusWrapper* status, Firebird::ITransaction* tra); void getNextTransaction(Firebird::CheckStatusWrapper* status, Firebird::ITransaction* tra, NextTransaction& next); - void execute(Firebird::CheckStatusWrapper* status, FB_API_HANDLE* traHandle, + void execute(Firebird::CheckStatusWrapper* status, isc_tr_handle* traHandle, unsigned int stmtLength, const char* sqlStmt, unsigned int dialect, Firebird::IMessageMetadata* inMetadata, void* inBuffer, Firebird::IMessageMetadata* outMetadata, void* outBuffer); @@ -587,7 +587,7 @@ public: void shutdown(); void destroy(unsigned dstrFlags); - FB_API_HANDLE& getHandle(); + isc_svc_handle& getHandle(); // IService implementation void detach(Firebird::CheckStatusWrapper* status); diff --git a/src/yvalve/alt.cpp b/src/yvalve/alt.cpp index b26af67728..2199c7dc11 100644 --- a/src/yvalve/alt.cpp +++ b/src/yvalve/alt.cpp @@ -36,7 +36,7 @@ #include "../common/classes/init.h" #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/gds_proto.h" #include "../yvalve/utl_proto.h" #include "../yvalve/why_proto.h" @@ -418,7 +418,7 @@ ISC_STATUS API_ROUTINE gds__get_slice(ISC_STATUS* status_vector, void* slice, SLONG* return_length) { return isc_get_slice(status_vector, db_handle, tra_handle, array_id, - sdl_length, sdl, parameters_leng, parameters, + sdl_length, reinterpret_cast(sdl), parameters_leng, parameters, slice_length, (SCHAR *) slice, return_length); } diff --git a/src/yvalve/array.epp b/src/yvalve/array.epp index 6348a85c95..cd3a41a180 100644 --- a/src/yvalve/array.epp +++ b/src/yvalve/array.epp @@ -35,7 +35,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/array_proto.h" #include "../yvalve/gds_proto.h" #include "../common/StatusArg.h" @@ -134,7 +134,7 @@ ISC_STATUS API_ROUTINE isc_array_get_slice(ISC_STATUS* status, // SD: I do not complain but in ibase.h sdl is a plain char in functions' // declaration while it is UCHAR in the functions' implementations. Damned legacy! isc_get_slice(status, db_handle, trans_handle, array_id, - sdl_length, reinterpret_cast(sdl), + sdl_length, sdl, 0, NULL, *slice_length, array, slice_length); if (sdl != sdl_buffer) diff --git a/src/yvalve/blob.epp b/src/yvalve/blob.epp index bc9f50c2f9..17d47a67bb 100644 --- a/src/yvalve/blob.epp +++ b/src/yvalve/blob.epp @@ -30,7 +30,7 @@ */ #include "firebird.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../jrd/intl.h" #include "../yvalve/blob_proto.h" #include "../common/StatusArg.h" diff --git a/src/yvalve/gds.cpp b/src/yvalve/gds.cpp index dc9b449c6a..44282a7438 100644 --- a/src/yvalve/gds.cpp +++ b/src/yvalve/gds.cpp @@ -94,9 +94,9 @@ #include "gen/sql_code.h" #include "gen/sql_state.h" #include "gen/iberror.h" -#include "../jrd/ibase.h" +#include "ibase.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../yvalve/msg.h" #include "../common/isc_proto.h" #include "../common/os/isc_i_proto.h" diff --git a/src/yvalve/perf.cpp b/src/yvalve/perf.cpp index 964cb3be33..55fc2deea8 100644 --- a/src/yvalve/perf.cpp +++ b/src/yvalve/perf.cpp @@ -30,7 +30,7 @@ #include "firebird.h" #include #include -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/perf.h" #include "../yvalve/gds_proto.h" #include "../yvalve/perf_proto.h" diff --git a/src/yvalve/utl.cpp b/src/yvalve/utl.cpp index ea1b58532c..8a394df9c0 100644 --- a/src/yvalve/utl.cpp +++ b/src/yvalve/utl.cpp @@ -48,7 +48,7 @@ #include #include "../common/gdsassert.h" -#include "../jrd/ibase.h" +#include "ibase.h" #include "../yvalve/msg.h" #include "../jrd/event.h" #include "../yvalve/gds_proto.h" diff --git a/src/yvalve/why.cpp b/src/yvalve/why.cpp index b18cb3c507..941a68c47b 100644 --- a/src/yvalve/why.cpp +++ b/src/yvalve/why.cpp @@ -27,7 +27,7 @@ * */ -#define FB_COMPILING_WHY_CPP +//#define FB_COMPILING_WHY_CPP #include "firebird.h" #include "firebird/Interface.h" @@ -36,7 +36,7 @@ #include "gen/msg_facs.h" #include "../yvalve/YObjects.h" #include "../dsql/sqlda.h" -#include "../dsql/sqlda_pub.h" +#include "firebird/impl/sqlda_pub.h" #include "../common/gdsassert.h" #include "../common/db_alias.h" #include "../common/StatementMetadata.h" @@ -68,9 +68,9 @@ #include "../yvalve/PluginManager.h" #include "../jrd/acl.h" #include "../jrd/align.h" -#include "../jrd/blr.h" +#include "firebird/impl/blr.h" #include "../common/msg_encode.h" -#include "../jrd/inf_pub.h" +#include "firebird/impl/inf_pub.h" #ifdef HAVE_SIGNAL_H #include @@ -87,8 +87,8 @@ static void nullCheck(const FB_API_HANDLE* ptr, ISC_STATUS code); static void badSqldaVersion(const short version); static int sqldaTruncateString(char* buffer, FB_SIZE_T size, const char* s); static void sqldaDescribeParameters(XSQLDA* sqlda, IMessageMetadata* parameters); -static ISC_STATUS openOrCreateBlob(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, FB_API_HANDLE* blobHandle, ISC_QUAD* blobId, +static ISC_STATUS openOrCreateBlob(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, isc_blob_handle* blobHandle, ISC_QUAD* blobId, USHORT bpbLength, const UCHAR* bpb, bool createFlag); @@ -655,13 +655,13 @@ int SQLDAMetadata::detach() GlobalPtr handleMappingLock; -GlobalPtr > > > services; -GlobalPtr > > > attachments; +GlobalPtr > > > services; +GlobalPtr > > > attachments; GlobalPtr > > > events; -GlobalPtr > > > transactions; -GlobalPtr > > > statements; -GlobalPtr > > > requests; -GlobalPtr > > > blobs; +GlobalPtr > > > transactions; +GlobalPtr > > > statements; +GlobalPtr > > > requests; +GlobalPtr > > > blobs; bool shutdownStarted = false; @@ -1233,16 +1233,16 @@ namespace Why ~IscStatement() override; - FB_API_HANDLE& getHandle(); + isc_stmt_handle& getHandle(); void destroy(unsigned); - void openCursor(CheckStatusWrapper* status, FB_API_HANDLE* traHandle, + void openCursor(CheckStatusWrapper* status, isc_tr_handle* traHandle, IMessageMetadata* inMetadata, UCHAR* buffer, IMessageMetadata* outMetadata); void closeCursor(CheckStatusWrapper* status, bool raise); void closeStatement(CheckStatusWrapper* status); - void execute(CheckStatusWrapper* status, FB_API_HANDLE* traHandle, + void execute(CheckStatusWrapper* status, isc_tr_handle* traHandle, IMessageMetadata* inMetadata, UCHAR* inBuffer, IMessageMetadata* outMetadata, UCHAR* outBuffer); FB_BOOLEAN fetch(CheckStatusWrapper* status, IMessageMetadata* outMetadata, UCHAR* outBuffer); @@ -1275,7 +1275,7 @@ namespace Why AtomicAttPtr attachment; string cursorName; YStatement* statement; - FB_API_HANDLE* userHandle; + isc_stmt_handle* userHandle; bool pseudoOpened, delayedFormat; }; @@ -1344,7 +1344,7 @@ namespace Why struct TEB { - FB_API_HANDLE* teb_database; + isc_db_handle* teb_database; int teb_tpb_length; const UCHAR* teb_tpb; }; @@ -1463,8 +1463,8 @@ static void sqldaDescribeParameters(XSQLDA* sqlda, IMessageMetadata* parameters) } // Open or create an existing blob (extended edition). -static ISC_STATUS openOrCreateBlob(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, FB_API_HANDLE* blobHandle, ISC_QUAD* blobId, +static ISC_STATUS openOrCreateBlob(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, isc_blob_handle* blobHandle, ISC_QUAD* blobId, USHORT bpbLength, const UCHAR* bpb, bool createFlag) { StatusVector status(userStatus); @@ -1521,7 +1521,7 @@ ISC_STATUS API_ROUTINE fb_database_crypt_callback(ISC_STATUS* userStatus, void* //------------------------------------- -Firebird::IAttachment* handleToIAttachment(Firebird::CheckStatusWrapper* status, FB_API_HANDLE* handle) +Firebird::IAttachment* handleToIAttachment(Firebird::CheckStatusWrapper* status, isc_db_handle* handle) { try { @@ -1538,7 +1538,7 @@ Firebird::IAttachment* handleToIAttachment(Firebird::CheckStatusWrapper* status, } -Firebird::ITransaction* handleToITransaction(Firebird::CheckStatusWrapper* status, FB_API_HANDLE* handle) +Firebird::ITransaction* handleToITransaction(Firebird::CheckStatusWrapper* status, isc_tr_handle* handle) { try { @@ -1560,7 +1560,7 @@ Firebird::ITransaction* handleToITransaction(Firebird::CheckStatusWrapper* statu // Attach a database through the first subsystem that recognizes it. ISC_STATUS API_ROUTINE isc_attach_database(ISC_STATUS* userStatus, SSHORT fileLength, - const TEXT* filename, FB_API_HANDLE* publicHandle, SSHORT dpbLength, const SCHAR* dpb) + const TEXT* filename, isc_db_handle* publicHandle, SSHORT dpbLength, const SCHAR* dpb) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1597,7 +1597,7 @@ ISC_STATUS API_ROUTINE isc_attach_database(ISC_STATUS* userStatus, SSHORT fileLe // Provide information on blob object. -ISC_STATUS API_ROUTINE isc_blob_info(ISC_STATUS* userStatus, FB_API_HANDLE* blobHandle, +ISC_STATUS API_ROUTINE isc_blob_info(ISC_STATUS* userStatus, isc_blob_handle* blobHandle, SSHORT itemLength, const SCHAR* items, SSHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); @@ -1620,7 +1620,7 @@ ISC_STATUS API_ROUTINE isc_blob_info(ISC_STATUS* userStatus, FB_API_HANDLE* blob // Abort a partially completed blob. -ISC_STATUS API_ROUTINE isc_cancel_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blobHandle) +ISC_STATUS API_ROUTINE isc_cancel_blob(ISC_STATUS* userStatus, isc_blob_handle* blobHandle) { if (!*blobHandle) { @@ -1652,7 +1652,7 @@ ISC_STATUS API_ROUTINE isc_cancel_blob(ISC_STATUS* userStatus, FB_API_HANDLE* bl // Try to cancel an event. -ISC_STATUS API_ROUTINE isc_cancel_events(ISC_STATUS* userStatus, FB_API_HANDLE* handle, SLONG* id) +ISC_STATUS API_ROUTINE isc_cancel_events(ISC_STATUS* userStatus, isc_db_handle* handle, SLONG* id) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1695,7 +1695,7 @@ ISC_STATUS API_ROUTINE isc_cancel_events(ISC_STATUS* userStatus, FB_API_HANDLE* // Try to cancel an operation. -ISC_STATUS API_ROUTINE fb_cancel_operation(ISC_STATUS* userStatus, FB_API_HANDLE* handle, +ISC_STATUS API_ROUTINE fb_cancel_operation(ISC_STATUS* userStatus, isc_db_handle* handle, USHORT option) { StatusVector status(userStatus); @@ -1716,7 +1716,7 @@ ISC_STATUS API_ROUTINE fb_cancel_operation(ISC_STATUS* userStatus, FB_API_HANDLE // Close a blob opened either for reading or writing (creation). -ISC_STATUS API_ROUTINE isc_close_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blobHandle) +ISC_STATUS API_ROUTINE isc_close_blob(ISC_STATUS* userStatus, isc_blob_handle* blobHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1740,7 +1740,7 @@ ISC_STATUS API_ROUTINE isc_close_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blo // Commit a transaction. -ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle) +ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS* userStatus, isc_tr_handle* traHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1765,7 +1765,7 @@ ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS* userStatus, FB_API_HAN // Do a commit retaining. // N.B., the transaction cleanup handlers are NOT called here since, conceptually, the transaction // is still running. -ISC_STATUS API_ROUTINE isc_commit_retaining(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle) +ISC_STATUS API_ROUTINE isc_commit_retaining(ISC_STATUS* userStatus, isc_tr_handle* traHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1784,8 +1784,8 @@ ISC_STATUS API_ROUTINE isc_commit_retaining(ISC_STATUS* userStatus, FB_API_HANDL } -ISC_STATUS API_ROUTINE isc_compile_request(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* reqHandle, USHORT blrLength, const SCHAR* blr) +ISC_STATUS API_ROUTINE isc_compile_request(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_req_handle* reqHandle, ISC_USHORT blrLength, const ISC_SCHAR* blr) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1822,8 +1822,8 @@ ISC_STATUS API_ROUTINE isc_compile_request(ISC_STATUS* userStatus, FB_API_HANDLE } -ISC_STATUS API_ROUTINE isc_compile_request2(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* reqHandle, USHORT blrLength, const SCHAR* blr) +ISC_STATUS API_ROUTINE isc_compile_request2(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_req_handle* reqHandle, USHORT blrLength, const SCHAR* blr) { ISC_STATUS rc = isc_compile_request(userStatus, dbHandle, reqHandle, blrLength, blr); if (rc) @@ -1851,26 +1851,26 @@ ISC_STATUS API_ROUTINE isc_compile_request2(ISC_STATUS* userStatus, FB_API_HANDL // Open an existing blob. -ISC_STATUS API_ROUTINE isc_create_blob(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, FB_API_HANDLE* blobHandle, ISC_QUAD* blobId) +ISC_STATUS API_ROUTINE isc_create_blob(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, isc_blob_handle* blobHandle, ISC_QUAD* blobId) { return openOrCreateBlob(userStatus, dbHandle, traHandle, blobHandle, blobId, 0, NULL, true); } // Create a new blob. -ISC_STATUS API_ROUTINE isc_create_blob2(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, FB_API_HANDLE* blobHandle, ISC_QUAD* blobId, - SSHORT bpbLength, const UCHAR* bpb) +ISC_STATUS API_ROUTINE isc_create_blob2(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, isc_blob_handle* blobHandle, ISC_QUAD* blobId, + SSHORT bpbLength, const SCHAR* bpb) { return openOrCreateBlob(userStatus, dbHandle, traHandle, blobHandle, blobId, - bpbLength, bpb, true); + bpbLength, reinterpret_cast(bpb), true); } // Create a nice, squeaky clean database, uncorrupted by user data. ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS* userStatus, USHORT fileLength, - const TEXT* filename, FB_API_HANDLE* publicHandle, SSHORT dpbLength, const UCHAR* dpb, + const TEXT* filename, isc_db_handle* publicHandle, USHORT dpbLength, const SCHAR* dpb, USHORT /*db_type*/) { StatusVector status(userStatus); @@ -1891,11 +1891,11 @@ ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS* userStatus, USHORT fileLe if (status.getState() & Firebird::IStatus::STATE_ERRORS) return status[1]; - ClumpletWriter newDpb(ClumpletReader::dpbList, MAX_DPB_SIZE, dpb, dpbLength); + ClumpletWriter newDpb(ClumpletReader::dpbList, MAX_DPB_SIZE, reinterpret_cast(dpb), dpbLength); if (!newDpb.find(isc_dpb_sql_dialect)) { newDpb.insertInt(isc_dpb_sql_dialect, 1); // legacy behavior in legacy interface - dpb = newDpb.getBuffer(); + dpb = reinterpret_cast(newDpb.getBuffer()); dpbLength = newDpb.getBufferLength(); } @@ -1916,7 +1916,7 @@ ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS* userStatus, USHORT fileLe // Register an attachment specific cleanup handler. -ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS* userStatus, FB_API_HANDLE* handle, +ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS* userStatus, isc_db_handle* handle, AttachmentCleanupRoutine* routine, void* arg) { StatusVector status(userStatus); @@ -1944,7 +1944,7 @@ ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS* userStatus, FB_API_HANDL // Provide information on database object. -ISC_STATUS API_ROUTINE isc_database_info(ISC_STATUS* userStatus, FB_API_HANDLE* handle, +ISC_STATUS API_ROUTINE isc_database_info(ISC_STATUS* userStatus, isc_db_handle* handle, SSHORT itemLength, const SCHAR* items, SSHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); @@ -1966,8 +1966,8 @@ ISC_STATUS API_ROUTINE isc_database_info(ISC_STATUS* userStatus, FB_API_HANDLE* // Do meta-data update. -ISC_STATUS API_ROUTINE isc_ddl(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, SSHORT length, const UCHAR* dyn) +ISC_STATUS API_ROUTINE isc_ddl(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, SSHORT length, const SCHAR* dyn) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -1977,7 +1977,7 @@ ISC_STATUS API_ROUTINE isc_ddl(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, RefPtr attachment(translateHandle(attachments, dbHandle)); RefPtr transaction(translateHandle(transactions, traHandle)); - attachment->executeDyn(&statusWrapper, transaction, length, dyn); + attachment->executeDyn(&statusWrapper, transaction, length, reinterpret_cast(dyn)); } catch (const Exception& e) { @@ -1989,7 +1989,7 @@ ISC_STATUS API_ROUTINE isc_ddl(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, // Close down an attachment. -ISC_STATUS API_ROUTINE isc_detach_database(ISC_STATUS* userStatus, FB_API_HANDLE* handle) +ISC_STATUS API_ROUTINE isc_detach_database(ISC_STATUS* userStatus, isc_db_handle* handle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -2020,7 +2020,7 @@ int API_ROUTINE gds__disable_subsystem(TEXT* /*subsystem*/) // Close down a database and then purge it. -ISC_STATUS API_ROUTINE isc_drop_database(ISC_STATUS* userStatus, FB_API_HANDLE* handle) +ISC_STATUS API_ROUTINE isc_drop_database(ISC_STATUS* userStatus, isc_db_handle* handle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -2045,16 +2045,16 @@ ISC_STATUS API_ROUTINE isc_drop_database(ISC_STATUS* userStatus, FB_API_HANDLE* } -ISC_STATUS API_ROUTINE isc_dsql_alloc_statement(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* stmtHandle) +ISC_STATUS API_ROUTINE isc_dsql_alloc_statement(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_stmt_handle* stmtHandle) { return isc_dsql_allocate_statement(userStatus, dbHandle, stmtHandle); } // Allocate a statement handle. -ISC_STATUS API_ROUTINE isc_dsql_alloc_statement2(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* stmtHandle) +ISC_STATUS API_ROUTINE isc_dsql_alloc_statement2(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_stmt_handle* stmtHandle) { ISC_STATUS rc = isc_dsql_alloc_statement(userStatus, dbHandle, stmtHandle); if (rc) @@ -2082,8 +2082,8 @@ ISC_STATUS API_ROUTINE isc_dsql_alloc_statement2(ISC_STATUS* userStatus, FB_API_ // Allocate a statement handle. -ISC_STATUS API_ROUTINE isc_dsql_allocate_statement(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* stmtHandle) +ISC_STATUS API_ROUTINE isc_dsql_allocate_statement(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_stmt_handle* stmtHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -2115,7 +2115,7 @@ ISC_STATUS API_ROUTINE isc_dsql_allocate_statement(ISC_STATUS* userStatus, FB_AP // Describe output parameters (columns) for a prepared statement. -ISC_STATUS API_ROUTINE isc_dsql_describe(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_describe(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, USHORT /*dialect*/, XSQLDA* sqlda) { StatusVector status(userStatus); @@ -2143,7 +2143,7 @@ ISC_STATUS API_ROUTINE isc_dsql_describe(ISC_STATUS* userStatus, FB_API_HANDLE* // Describe input parameters for a prepared statement. -ISC_STATUS API_ROUTINE isc_dsql_describe_bind(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_describe_bind(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, USHORT /*dialect*/, XSQLDA* sqlda) { StatusVector status(userStatus); @@ -2171,16 +2171,16 @@ ISC_STATUS API_ROUTINE isc_dsql_describe_bind(ISC_STATUS* userStatus, FB_API_HAN // Execute a non-SELECT dynamic SQL statement. -ISC_STATUS API_ROUTINE isc_dsql_execute(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - FB_API_HANDLE* stmtHandle, USHORT dialect, const XSQLDA* sqlda) +ISC_STATUS API_ROUTINE isc_dsql_execute(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + isc_stmt_handle* stmtHandle, USHORT dialect, const XSQLDA* sqlda) { return isc_dsql_execute2(userStatus, traHandle, stmtHandle, dialect, sqlda, NULL); } // Execute a non-SELECT dynamic SQL statement. -ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - FB_API_HANDLE* stmtHandle, USHORT dialect, const XSQLDA* inSqlda, const XSQLDA* outSqlda) +ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + isc_stmt_handle* stmtHandle, USHORT dialect, const XSQLDA* inSqlda, const XSQLDA* outSqlda) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -2234,8 +2234,8 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS* userStatus, FB_API_HANDLE* // Execute a non-SELECT dynamic SQL statement. -ISC_STATUS API_ROUTINE isc_dsql_execute_m(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - FB_API_HANDLE* stmtHandle, USHORT blrLength, const SCHAR* blr, +ISC_STATUS API_ROUTINE isc_dsql_execute_m(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + isc_stmt_handle* stmtHandle, USHORT blrLength, const SCHAR* blr, USHORT msgType, USHORT msgLength, SCHAR* msg) { return isc_dsql_execute2_m(userStatus, traHandle, stmtHandle, blrLength, blr, @@ -2244,8 +2244,8 @@ ISC_STATUS API_ROUTINE isc_dsql_execute_m(ISC_STATUS* userStatus, FB_API_HANDLE* // Execute a non-SELECT dynamic SQL statement. -ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - FB_API_HANDLE* stmtHandle, USHORT inBlrLength, const SCHAR* inBlr, USHORT inMsgType, +ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + isc_stmt_handle* stmtHandle, USHORT inBlrLength, const SCHAR* inBlr, USHORT inMsgType, USHORT inMsgLength, const SCHAR* inMsg, USHORT outBlrLength, SCHAR* outBlr, USHORT /*outMsgType*/, USHORT outMsgLength, SCHAR* outMsg) { @@ -2264,8 +2264,8 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* userStatus, FB_API_HANDLE statement->checkPrepared(); - InternalMessageBuffer inMsgBuffer(inBlrLength, (const UCHAR*)inBlr, inMsgLength, (UCHAR*)inMsg); - InternalMessageBuffer outMsgBuffer(outBlrLength, (const UCHAR*)outBlr, outMsgLength, (UCHAR*)outMsg); + InternalMessageBuffer inMsgBuffer(inBlrLength, (const UCHAR*) inBlr, inMsgLength, (UCHAR*) inMsg); + InternalMessageBuffer outMsgBuffer(outBlrLength, (const UCHAR*) outBlr, outMsgLength, (UCHAR*) outMsg); const unsigned flags = statement->statement->getFlags(&statusWrapper); if (!(status.getState() & Firebird::IStatus::STATE_ERRORS)) @@ -2293,8 +2293,8 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* userStatus, FB_API_HANDLE // Is this really API function? Where is it declared? -ISC_STATUS API_ROUTINE isc_dsql_exec_immediate(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_exec_immediate(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, const XSQLDA* sqlda) { return isc_dsql_execute_immediate(userStatus, dbHandle, traHandle, stmtLength, sqlStmt, @@ -2303,8 +2303,8 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immediate(ISC_STATUS* userStatus, FB_API_HA // Prepare a statement for execution. -ISC_STATUS API_ROUTINE isc_dsql_execute_immediate(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_execute_immediate(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, const XSQLDA* sqlda) { return isc_dsql_exec_immed2(userStatus, dbHandle, traHandle, stmtLength, sqlStmt, @@ -2313,8 +2313,8 @@ ISC_STATUS API_ROUTINE isc_dsql_execute_immediate(ISC_STATUS* userStatus, FB_API // Prepare a statement for execution. -ISC_STATUS API_ROUTINE isc_dsql_exec_immed2(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_exec_immed2(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, const XSQLDA* inSqlda, const XSQLDA* outSqlda) { StatusVector status(userStatus); @@ -2365,8 +2365,8 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed2(ISC_STATUS* userStatus, FB_API_HANDL // Is this really API function? Where is it declared? -ISC_STATUS API_ROUTINE isc_dsql_exec_immediate_m(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_exec_immediate_m(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, USHORT blrLength, USHORT msgType, USHORT msgLength, SCHAR* blr, SCHAR* msg) { return isc_dsql_execute_immediate_m(userStatus, dbHandle, traHandle, stmtLength, sqlStmt, @@ -2375,8 +2375,8 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immediate_m(ISC_STATUS* userStatus, FB_API_ // Prepare a statement for execution. -ISC_STATUS API_ROUTINE isc_dsql_execute_immediate_m(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_execute_immediate_m(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, USHORT blrLength, SCHAR* blr, USHORT msgType, USHORT msgLength, SCHAR* msg) { return isc_dsql_exec_immed2_m(userStatus, dbHandle, traHandle, stmtLength, sqlStmt, dialect, @@ -2385,8 +2385,8 @@ ISC_STATUS API_ROUTINE isc_dsql_execute_immediate_m(ISC_STATUS* userStatus, FB_A // Prepare a statement for execution. -ISC_STATUS API_ROUTINE isc_dsql_exec_immed2_m(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_exec_immed2_m(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, USHORT inBlrLength, SCHAR* inBlr, USHORT inMsgType, USHORT inMsgLength, const SCHAR* inMsg, USHORT outBlrLength, SCHAR* outBlr, USHORT outMsgType, USHORT outMsgLength, SCHAR* outMsg) { @@ -2412,8 +2412,8 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed2_m(ISC_STATUS* userStatus, FB_API_HAN // Execute statement immediately. -ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, USHORT inBlrLength, const SCHAR* inBlr, USHORT inMsgType, USHORT inMsgLength, const SCHAR* inMsg, USHORT outBlrLength, SCHAR* outBlr, USHORT /*outMsgType*/, USHORT outMsgLength, SCHAR* outMsg) { @@ -2442,7 +2442,7 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS* userStatus, FB_API_HAN } // Fetch next record from a dynamic SQL cursor -ISC_STATUS API_ROUTINE isc_dsql_fetch(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_fetch(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, USHORT dialect, const XSQLDA* sqlda) { StatusVector status(userStatus); @@ -2472,7 +2472,7 @@ ISC_STATUS API_ROUTINE isc_dsql_fetch(ISC_STATUS* userStatus, FB_API_HANDLE* stm // Fetch next record from a dynamic SQL cursor -ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, USHORT blrLength, SCHAR* blr, USHORT /*msgType*/, USHORT msgLength, SCHAR* msg) { StatusVector status(userStatus); @@ -2506,7 +2506,7 @@ ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS* userStatus, FB_API_HANDLE* s // Release request for an sql statement -ISC_STATUS API_ROUTINE isc_dsql_free_statement(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_free_statement(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, USHORT option) { StatusVector status(userStatus); @@ -2549,7 +2549,7 @@ ISC_STATUS API_ROUTINE isc_dsql_free_statement(ISC_STATUS* userStatus, FB_API_HA // Insert a BLOB into a dynamic SQL cursor. (deprecated) -ISC_STATUS API_ROUTINE isc_dsql_insert(ISC_STATUS* userStatus, FB_API_HANDLE* /*stmtHandle*/, +ISC_STATUS API_ROUTINE isc_dsql_insert(ISC_STATUS* userStatus, isc_stmt_handle* /*stmtHandle*/, USHORT /*dialect*/, XSQLDA* /*sqlda*/) { (Arg::Gds(isc_feature_removed) << Arg::Str("isc_dsql_insert")).copyTo(userStatus); @@ -2558,7 +2558,7 @@ ISC_STATUS API_ROUTINE isc_dsql_insert(ISC_STATUS* userStatus, FB_API_HANDLE* /* // Insert a BLOB into a dynamic SQL cursor. (deprecated) -ISC_STATUS API_ROUTINE isc_dsql_insert_m(ISC_STATUS* userStatus, FB_API_HANDLE* /*stmtHandle*/, +ISC_STATUS API_ROUTINE isc_dsql_insert_m(ISC_STATUS* userStatus, isc_stmt_handle* /*stmtHandle*/, USHORT /*blrLength*/, const SCHAR* /*blr*/, USHORT /*msgType*/, USHORT /*msgLength*/, const SCHAR* /*msg*/) { @@ -2568,8 +2568,8 @@ ISC_STATUS API_ROUTINE isc_dsql_insert_m(ISC_STATUS* userStatus, FB_API_HANDLE* // Prepare a statement for execution. -ISC_STATUS API_ROUTINE isc_dsql_prepare(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - FB_API_HANDLE* stmtHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_prepare(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + isc_stmt_handle* stmtHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, XSQLDA* sqlda) { StatusVector status(userStatus); @@ -2617,8 +2617,8 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare(ISC_STATUS* userStatus, FB_API_HANDLE* t // Prepare a statement for execution. -ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - FB_API_HANDLE* stmtHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, +ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + isc_stmt_handle* stmtHandle, USHORT stmtLength, const SCHAR* sqlStmt, USHORT dialect, USHORT itemLength, const SCHAR* items, USHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); @@ -2667,7 +2667,7 @@ ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS* userStatus, FB_API_HANDLE* // Set a cursor name for a dynamic request. -ISC_STATUS API_ROUTINE isc_dsql_set_cursor_name(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_set_cursor_name(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, const SCHAR* cursorName, USHORT /*cursorType*/) { StatusVector status(userStatus); @@ -2697,7 +2697,7 @@ ISC_STATUS API_ROUTINE isc_dsql_set_cursor_name(ISC_STATUS* userStatus, FB_API_H // Set statement timeout. -ISC_STATUS API_ROUTINE fb_dsql_set_timeout(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE fb_dsql_set_timeout(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, ULONG timeout) { StatusVector status(userStatus); @@ -2720,7 +2720,7 @@ ISC_STATUS API_ROUTINE fb_dsql_set_timeout(ISC_STATUS* userStatus, FB_API_HANDLE // Get interface by legacy handle -/*ISC_STATUS API_ROUTINE fb_get_statement_interface(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +/*ISC_STATUS API_ROUTINE fb_get_statement_interface(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, void** stmtIface) { StatusVector status(userStatus); @@ -2746,7 +2746,7 @@ ISC_STATUS API_ROUTINE fb_dsql_set_timeout(ISC_STATUS* userStatus, FB_API_HANDLE */ // Provide information on sql statement. -ISC_STATUS API_ROUTINE isc_dsql_sql_info(ISC_STATUS* userStatus, FB_API_HANDLE* stmtHandle, +ISC_STATUS API_ROUTINE isc_dsql_sql_info(ISC_STATUS* userStatus, isc_stmt_handle* stmtHandle, SSHORT itemLength, const SCHAR* items, SSHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); @@ -2819,7 +2819,7 @@ namespace } // Que request for event notification. -ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, +ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS* userStatus, isc_db_handle* dbHandle, USHORT length, const UCHAR* eventsData, UCHAR* buffer) { StatusVector status(userStatus); @@ -2918,7 +2918,7 @@ namespace } // Que request for event notification. -ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, SLONG* id, +ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS* userStatus, isc_db_handle* dbHandle, SLONG* id, USHORT length, const UCHAR* eventsData, FPTR_EVENT_CALLBACK ast, void* arg) { StatusVector status(userStatus); @@ -2956,8 +2956,8 @@ ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS* userStatus, FB_API_HANDLE* dbH // Get a segment from a blob opened for reading. -ISC_STATUS API_ROUTINE isc_get_segment(ISC_STATUS* userStatus, FB_API_HANDLE* blobHandle, - USHORT* returnLength, USHORT bufferLength, UCHAR* buffer) +ISC_STATUS API_ROUTINE isc_get_segment(ISC_STATUS* userStatus, isc_blob_handle* blobHandle, + USHORT* returnLength, USHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -2966,7 +2966,7 @@ ISC_STATUS API_ROUTINE isc_get_segment(ISC_STATUS* userStatus, FB_API_HANDLE* bl { RefPtr blob(translateHandle(blobs, blobHandle)); unsigned int length; - int cc = blob->getSegment(&statusWrapper, bufferLength, buffer, &length); + int cc = blob->getSegment(&statusWrapper, bufferLength, reinterpret_cast(buffer), &length); if (!(status.getState() & Firebird::IStatus::STATE_ERRORS)) *returnLength = length; @@ -2992,9 +2992,9 @@ ISC_STATUS API_ROUTINE isc_get_segment(ISC_STATUS* userStatus, FB_API_HANDLE* bl // Snatch a slice of an array. -ISC_STATUS API_ROUTINE isc_get_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, ISC_QUAD* arrayId, USHORT sdlLength, const UCHAR* sdl, - USHORT paramLength, const UCHAR* param, SLONG sliceLength, UCHAR* slice, SLONG* returnLength) +ISC_STATUS API_ROUTINE isc_get_slice(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, ISC_QUAD* arrayId, USHORT sdlLength, const UCHAR* sdl, + USHORT paramLength, const SLONG* param, SLONG sliceLength, void* slice, SLONG* returnLength) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3005,7 +3005,7 @@ ISC_STATUS API_ROUTINE isc_get_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHa RefPtr transaction(translateHandle(transactions, traHandle)); int length = attachment->getSlice(&statusWrapper, transaction, arrayId, sdlLength, sdl, - paramLength, param, sliceLength, slice); + paramLength, reinterpret_cast(param), sliceLength, reinterpret_cast(slice)); if (!(status.getState() & Firebird::IStatus::STATE_ERRORS) && returnLength) *returnLength = length; @@ -3020,7 +3020,7 @@ ISC_STATUS API_ROUTINE isc_get_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHa // Clean up a dangling transaction handle. -ISC_STATUS API_ROUTINE fb_disconnect_transaction(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle) +ISC_STATUS API_ROUTINE fb_disconnect_transaction(ISC_STATUS* userStatus, isc_tr_handle* traHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3043,17 +3043,17 @@ ISC_STATUS API_ROUTINE fb_disconnect_transaction(ISC_STATUS* userStatus, FB_API_ // Open an existing blob. -ISC_STATUS API_ROUTINE isc_open_blob(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, FB_API_HANDLE* blobHandle, ISC_QUAD* blobId) +ISC_STATUS API_ROUTINE isc_open_blob(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, isc_blob_handle* blobHandle, ISC_QUAD* blobId) { return openOrCreateBlob(userStatus, dbHandle, traHandle, blobHandle, blobId, 0, 0, false); } // Open an existing blob (extended edition). -ISC_STATUS API_ROUTINE isc_open_blob2(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, FB_API_HANDLE* blobHandle, ISC_QUAD* blobId, - SSHORT bpbLength, const UCHAR* bpb) +ISC_STATUS API_ROUTINE isc_open_blob2(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, isc_blob_handle* blobHandle, ISC_QUAD* blobId, + ISC_USHORT bpbLength, const UCHAR* bpb) { return openOrCreateBlob(userStatus, dbHandle, traHandle, blobHandle, blobId, bpbLength, bpb, false); @@ -3061,14 +3061,14 @@ ISC_STATUS API_ROUTINE isc_open_blob2(ISC_STATUS* userStatus, FB_API_HANDLE* dbH // Prepare a transaction for commit. First phase of a two phase commit. -ISC_STATUS API_ROUTINE isc_prepare_transaction(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle) +ISC_STATUS API_ROUTINE isc_prepare_transaction(ISC_STATUS* userStatus, isc_tr_handle* traHandle) { return isc_prepare_transaction2(userStatus, traHandle, 0, NULL); } // Prepare a transaction for commit. First phase of a two phase commit. -ISC_STATUS API_ROUTINE isc_prepare_transaction2(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, +ISC_STATUS API_ROUTINE isc_prepare_transaction2(ISC_STATUS* userStatus, isc_tr_handle* traHandle, USHORT msgLength, const UCHAR* msg) { StatusVector status(userStatus); @@ -3089,8 +3089,8 @@ ISC_STATUS API_ROUTINE isc_prepare_transaction2(ISC_STATUS* userStatus, FB_API_H // Put a segment in a blob opened for writing (creation). -ISC_STATUS API_ROUTINE isc_put_segment(ISC_STATUS* userStatus, FB_API_HANDLE* blobHandle, - USHORT bufferLength, const UCHAR* buffer) +ISC_STATUS API_ROUTINE isc_put_segment(ISC_STATUS* userStatus, isc_blob_handle* blobHandle, + USHORT bufferLength, const SCHAR* buffer) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3098,7 +3098,7 @@ ISC_STATUS API_ROUTINE isc_put_segment(ISC_STATUS* userStatus, FB_API_HANDLE* bl try { RefPtr blob(translateHandle(blobs, blobHandle)); - blob->putSegment(&statusWrapper, bufferLength, buffer); + blob->putSegment(&statusWrapper, bufferLength, reinterpret_cast(buffer)); } catch (const Exception& e) { @@ -3110,9 +3110,9 @@ ISC_STATUS API_ROUTINE isc_put_segment(ISC_STATUS* userStatus, FB_API_HANDLE* bl // Put a slice in an array. -ISC_STATUS API_ROUTINE isc_put_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, ISC_QUAD* arrayId, USHORT sdlLength, const UCHAR* sdl, - USHORT paramLength, const SLONG* param, SLONG sliceLength, UCHAR* slice) +ISC_STATUS API_ROUTINE isc_put_slice(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, ISC_QUAD* arrayId, USHORT sdlLength, const SCHAR* sdl, + USHORT paramLength, const SLONG* param, SLONG sliceLength, void* slice) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3122,8 +3122,8 @@ ISC_STATUS API_ROUTINE isc_put_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHa RefPtr attachment(translateHandle(attachments, dbHandle)); RefPtr transaction(translateHandle(transactions, traHandle)); - attachment->putSlice(&statusWrapper, transaction, arrayId, sdlLength, sdl, - paramLength, reinterpret_cast(param), sliceLength, slice); + attachment->putSlice(&statusWrapper, transaction, arrayId, sdlLength, reinterpret_cast(sdl), + paramLength, reinterpret_cast(param), sliceLength, static_cast(slice)); } catch (const Exception& e) { @@ -3135,8 +3135,8 @@ ISC_STATUS API_ROUTINE isc_put_slice(ISC_STATUS* userStatus, FB_API_HANDLE* dbHa // Send a record to the host program. -ISC_STATUS API_ROUTINE isc_receive(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle, USHORT msgType, - USHORT msgLength, SCHAR* msg, SSHORT level) +ISC_STATUS API_ROUTINE isc_receive(ISC_STATUS* userStatus, isc_req_handle* reqHandle, USHORT msgType, + USHORT msgLength, void* msg, SSHORT level) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3156,8 +3156,8 @@ ISC_STATUS API_ROUTINE isc_receive(ISC_STATUS* userStatus, FB_API_HANDLE* reqHan // Connect to a transaction in limbo. -ISC_STATUS API_ROUTINE isc_reconnect_transaction(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, SSHORT length, const UCHAR* id) +ISC_STATUS API_ROUTINE isc_reconnect_transaction(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT length, const SCHAR* id) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3168,7 +3168,8 @@ ISC_STATUS API_ROUTINE isc_reconnect_transaction(ISC_STATUS* userStatus, FB_API_ RefPtr attachment(translateHandle(attachments, dbHandle)); - YTransaction* transaction = attachment->reconnectTransaction(&statusWrapper, length, id); + YTransaction* transaction = attachment->reconnectTransaction(&statusWrapper, length, + reinterpret_cast(id)); if (status.getState() & Firebird::IStatus::STATE_ERRORS) status_exception::raise(status); @@ -3185,7 +3186,7 @@ ISC_STATUS API_ROUTINE isc_reconnect_transaction(ISC_STATUS* userStatus, FB_API_ // Release a request. -ISC_STATUS API_ROUTINE isc_release_request(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle) +ISC_STATUS API_ROUTINE isc_release_request(ISC_STATUS* userStatus, isc_req_handle* reqHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3208,7 +3209,7 @@ ISC_STATUS API_ROUTINE isc_release_request(ISC_STATUS* userStatus, FB_API_HANDLE // Provide information on blob object. -ISC_STATUS API_ROUTINE isc_request_info(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle, +ISC_STATUS API_ROUTINE isc_request_info(ISC_STATUS* userStatus, isc_req_handle* reqHandle, SSHORT level, SSHORT itemLength, const SCHAR* items, SSHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); @@ -3250,7 +3251,7 @@ SLONG API_ROUTINE isc_reset_fpe(USHORT /*fpe_status*/) // Abort a transaction, but keep all cursors open. -ISC_STATUS API_ROUTINE isc_rollback_retaining(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle) +ISC_STATUS API_ROUTINE isc_rollback_retaining(ISC_STATUS* userStatus, isc_tr_handle* traHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3270,7 +3271,7 @@ ISC_STATUS API_ROUTINE isc_rollback_retaining(ISC_STATUS* userStatus, FB_API_HAN // Abort a transaction. -ISC_STATUS API_ROUTINE isc_rollback_transaction(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle) +ISC_STATUS API_ROUTINE isc_rollback_transaction(ISC_STATUS* userStatus, isc_tr_handle* traHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3293,7 +3294,7 @@ ISC_STATUS API_ROUTINE isc_rollback_transaction(ISC_STATUS* userStatus, FB_API_H // Seek a blob. -ISC_STATUS API_ROUTINE isc_seek_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blobHandle, +ISC_STATUS API_ROUTINE isc_seek_blob(ISC_STATUS* userStatus, isc_blob_handle* blobHandle, SSHORT mode, SLONG offset, SLONG* result) { StatusVector status(userStatus); @@ -3317,8 +3318,8 @@ ISC_STATUS API_ROUTINE isc_seek_blob(ISC_STATUS* userStatus, FB_API_HANDLE* blob // Get a record from the host program. -ISC_STATUS API_ROUTINE isc_send(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle, USHORT msgType, - USHORT msgLength, const SCHAR* msg, SSHORT level) +ISC_STATUS API_ROUTINE isc_send(ISC_STATUS* userStatus, isc_req_handle* reqHandle, USHORT msgType, + USHORT msgLength, const void* msg, SSHORT level) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3327,7 +3328,7 @@ ISC_STATUS API_ROUTINE isc_send(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle { RefPtr request(translateHandle(requests, reqHandle)); request->send(&statusWrapper, level, msgType, - msgLength, reinterpret_cast(msg)); + msgLength, static_cast(msg)); } catch (const Exception& e) { @@ -3340,7 +3341,7 @@ ISC_STATUS API_ROUTINE isc_send(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle // Attach a service through the first subsystem that recognizes it. ISC_STATUS API_ROUTINE isc_service_attach(ISC_STATUS* userStatus, USHORT serviceLength, - const TEXT* serviceName, FB_API_HANDLE* publicHandle, USHORT spbLength, const SCHAR* spb) + const TEXT* serviceName, isc_svc_handle* publicHandle, USHORT spbLength, const SCHAR* spb) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3385,7 +3386,7 @@ ISC_STATUS API_ROUTINE isc_service_attach(ISC_STATUS* userStatus, USHORT service // Close down a service. -ISC_STATUS API_ROUTINE isc_service_detach(ISC_STATUS* userStatus, FB_API_HANDLE* handle) +ISC_STATUS API_ROUTINE isc_service_detach(ISC_STATUS* userStatus, isc_svc_handle* handle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3411,8 +3412,8 @@ ISC_STATUS API_ROUTINE isc_service_detach(ISC_STATUS* userStatus, FB_API_HANDLE* // NOTE: The parameter RESERVED must not be used for any purpose as there are networking issues // involved (as with any handle that goes over the network). This parameter will be implemented at // a later date. -ISC_STATUS API_ROUTINE isc_service_query(ISC_STATUS* userStatus, FB_API_HANDLE* handle, - ULONG* /*reserved*/, USHORT sendItemLength, const SCHAR* sendItems, USHORT recvItemLength, +ISC_STATUS API_ROUTINE isc_service_query(ISC_STATUS* userStatus, isc_svc_handle* handle, + isc_resv_handle* /*reserved*/, USHORT sendItemLength, const SCHAR* sendItems, USHORT recvItemLength, const SCHAR* recvItems, USHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); @@ -3439,8 +3440,8 @@ ISC_STATUS API_ROUTINE isc_service_query(ISC_STATUS* userStatus, FB_API_HANDLE* // NOTE: The parameter RESERVED must not be used for any purpose as there are networking issues // involved (as with any handle that goes over the network). This parameter will be implemented at // a later date. -ISC_STATUS API_ROUTINE isc_service_start(ISC_STATUS* userStatus, FB_API_HANDLE* handle, - ULONG* /*reserved*/, USHORT spbLength, const SCHAR* spb) +ISC_STATUS API_ROUTINE isc_service_start(ISC_STATUS* userStatus, isc_svc_handle* handle, + isc_resv_handle* /*reserved*/, USHORT spbLength, const SCHAR* spb) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3460,8 +3461,8 @@ ISC_STATUS API_ROUTINE isc_service_start(ISC_STATUS* userStatus, FB_API_HANDLE* // Get a record from the host program. -ISC_STATUS API_ROUTINE isc_start_and_send(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle, - FB_API_HANDLE* traHandle, USHORT msgType, USHORT msgLength, const SCHAR* msg, SSHORT level) +ISC_STATUS API_ROUTINE isc_start_and_send(ISC_STATUS* userStatus, isc_req_handle* reqHandle, + isc_tr_handle* traHandle, USHORT msgType, USHORT msgLength, const void* msg, SSHORT level) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3484,8 +3485,8 @@ ISC_STATUS API_ROUTINE isc_start_and_send(ISC_STATUS* userStatus, FB_API_HANDLE* // Get a record from the host program. -ISC_STATUS API_ROUTINE isc_start_request(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle, - FB_API_HANDLE* traHandle, SSHORT level) +ISC_STATUS API_ROUTINE isc_start_request(ISC_STATUS* userStatus, isc_req_handle* reqHandle, + isc_tr_handle* traHandle, SSHORT level) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3507,7 +3508,7 @@ ISC_STATUS API_ROUTINE isc_start_request(ISC_STATUS* userStatus, FB_API_HANDLE* // Start a transaction. -ISC_STATUS API_ROUTINE isc_start_multiple(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, +ISC_STATUS API_ROUTINE isc_start_multiple(ISC_STATUS* userStatus, isc_tr_handle* traHandle, SSHORT count, void* vec) { StatusVector status(userStatus); @@ -3575,7 +3576,7 @@ ISC_STATUS API_ROUTINE isc_start_multiple(ISC_STATUS* userStatus, FB_API_HANDLE* // Start a transaction.. ISC_STATUS API_ROUTINE_VARARG isc_start_transaction(ISC_STATUS* userStatus, - FB_API_HANDLE* traHandle, SSHORT count, ...) + isc_tr_handle* traHandle, SSHORT count, ...) { try { @@ -3588,7 +3589,7 @@ ISC_STATUS API_ROUTINE_VARARG isc_start_transaction(ISC_STATUS* userStatus, for (TEB* teb_iter = teb; teb_iter < end; teb_iter++) { - teb_iter->teb_database = va_arg(ptr, FB_API_HANDLE*); + teb_iter->teb_database = va_arg(ptr, isc_db_handle*); teb_iter->teb_tpb_length = va_arg(ptr, int); teb_iter->teb_tpb = va_arg(ptr, UCHAR *); } @@ -3609,8 +3610,8 @@ ISC_STATUS API_ROUTINE_VARARG isc_start_transaction(ISC_STATUS* userStatus, // Execute a procedure. -ISC_STATUS API_ROUTINE isc_transact_request(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle, - FB_API_HANDLE* traHandle, USHORT blrLength, SCHAR* blr, USHORT inMsgLength, SCHAR* inMsg, +ISC_STATUS API_ROUTINE isc_transact_request(ISC_STATUS* userStatus, isc_db_handle* dbHandle, + isc_tr_handle* traHandle, USHORT blrLength, SCHAR* blr, USHORT inMsgLength, SCHAR* inMsg, USHORT outMsgLength, SCHAR* outMsg) { StatusVector status(userStatus); @@ -3636,7 +3637,7 @@ ISC_STATUS API_ROUTINE isc_transact_request(ISC_STATUS* userStatus, FB_API_HANDL // Register a transaction specific cleanup handler. -ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, +ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS* userStatus, isc_tr_handle* traHandle, TransactionCleanupRoutine* routine, void* arg) { StatusVector status(userStatus); @@ -3664,8 +3665,8 @@ ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS* userStatus, FB_API_H // Provide information on transaction object. -ISC_STATUS API_ROUTINE isc_transaction_info(ISC_STATUS* userStatus, FB_API_HANDLE* traHandle, - SSHORT itemLength, const SCHAR* items, SSHORT bufferLength, UCHAR* buffer) +ISC_STATUS API_ROUTINE isc_transaction_info(ISC_STATUS* userStatus, isc_tr_handle* traHandle, + SSHORT itemLength, const SCHAR* items, SSHORT bufferLength, SCHAR* buffer) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3687,7 +3688,7 @@ ISC_STATUS API_ROUTINE isc_transaction_info(ISC_STATUS* userStatus, FB_API_HANDL // Unwind a running request. This is potentially nasty since it can be called asynchronously. -ISC_STATUS API_ROUTINE isc_unwind_request(ISC_STATUS* userStatus, FB_API_HANDLE* reqHandle, +ISC_STATUS API_ROUTINE isc_unwind_request(ISC_STATUS* userStatus, isc_req_handle* reqHandle, SSHORT level) { StatusVector status(userStatus); @@ -3741,7 +3742,7 @@ ISC_STATUS API_ROUTINE fb_shutdown_callback(ISC_STATUS* userStatus, FB_SHUTDOWN_ // Check the attachment handle for persistent errors. -ISC_STATUS API_ROUTINE fb_ping(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle) +ISC_STATUS API_ROUTINE fb_ping(ISC_STATUS* userStatus, isc_db_handle* dbHandle) { StatusVector status(userStatus); CheckStatusWrapper statusWrapper(&status); @@ -3761,7 +3762,7 @@ ISC_STATUS API_ROUTINE fb_ping(ISC_STATUS* userStatus, FB_API_HANDLE* dbHandle) // Get the legacy handle of a database. -ISC_STATUS API_ROUTINE fb_get_database_handle(ISC_STATUS* userStatus, FB_API_HANDLE* handle, +ISC_STATUS API_ROUTINE fb_get_database_handle(ISC_STATUS* userStatus, isc_db_handle* handle, void* obj) { StatusVector status(userStatus); @@ -3786,7 +3787,7 @@ ISC_STATUS API_ROUTINE fb_get_database_handle(ISC_STATUS* userStatus, FB_API_HAN // Get the legacy handle of a transaction. -ISC_STATUS API_ROUTINE fb_get_transaction_handle(ISC_STATUS* userStatus, FB_API_HANDLE* handle, +ISC_STATUS API_ROUTINE fb_get_transaction_handle(ISC_STATUS* userStatus, isc_tr_handle* handle, void* obj) { StatusVector status(userStatus); @@ -3912,7 +3913,7 @@ YRequest::YRequest(YAttachment* aAttachment, IRequest* aNext) attachment.get()->childRequests.add(this); } -FB_API_HANDLE& YRequest::getHandle() +isc_req_handle& YRequest::getHandle() { if (!handle) makeHandle(&requests, this, handle); @@ -4055,7 +4056,7 @@ YBlob::YBlob(YAttachment* aAttachment, YTransaction* aTransaction, IBlob* aNext) aTransaction->childBlobs.add(this); } -FB_API_HANDLE& YBlob::getHandle() +isc_blob_handle& YBlob::getHandle() { if (!handle) makeHandle(&blobs, this, handle); @@ -4481,14 +4482,14 @@ void IscStatement::destroy(unsigned) release(); } -FB_API_HANDLE& IscStatement::getHandle() +isc_stmt_handle& IscStatement::getHandle() { if (!handle) makeHandle(&statements, this, handle); return handle; } -void IscStatement::openCursor(CheckStatusWrapper* status, FB_API_HANDLE* traHandle, +void IscStatement::openCursor(CheckStatusWrapper* status, isc_tr_handle* traHandle, IMessageMetadata* inMetadata, UCHAR* buffer, IMessageMetadata* outMetadata) { checkCursorClosed(); @@ -4536,7 +4537,7 @@ void IscStatement::closeStatement(CheckStatusWrapper* status) } } -void IscStatement::execute(CheckStatusWrapper* status, FB_API_HANDLE* traHandle, +void IscStatement::execute(CheckStatusWrapper* status, isc_tr_handle* traHandle, IMessageMetadata* inMetadata, UCHAR* inBuffer, IMessageMetadata* outMetadata, UCHAR* outBuffer) { @@ -5078,7 +5079,7 @@ YTransaction::YTransaction(YAttachment* aAttachment, ITransaction* aNext) aAttachment->childTransactions.add(this); } -FB_API_HANDLE& YTransaction::getHandle() +isc_tr_handle& YTransaction::getHandle() { // Not assigning handle in ctor is essential for correct operation // of YTransaction::destroy - change it when changing handle behavior. @@ -5349,7 +5350,7 @@ YAttachment::YAttachment(IProvider* aProvider, IAttachment* aNext, const PathNam makeHandle(&attachments, this, handle); } -FB_API_HANDLE& YAttachment::getHandle() +isc_db_handle& YAttachment::getHandle() { fb_assert(handle); return handle; @@ -5726,7 +5727,7 @@ ITransaction* YAttachment::execute(CheckStatusWrapper* status, ITransaction* tra } -void YAttachment::execute(Firebird::CheckStatusWrapper* status, FB_API_HANDLE* traHandle, +void YAttachment::execute(Firebird::CheckStatusWrapper* status, isc_tr_handle* traHandle, unsigned int stmtLength, const char* sqlStmt, unsigned int dialect, Firebird::IMessageMetadata* inMetadata, void* inBuffer, Firebird::IMessageMetadata* outMetadata, void* outBuffer) @@ -6038,7 +6039,7 @@ YService::YService(IProvider* aProvider, IService* aNext, bool utf8) makeHandle(&services, this, handle); } -FB_API_HANDLE& YService::getHandle() +isc_svc_handle& YService::getHandle() { fb_assert(handle); return handle; @@ -6450,7 +6451,7 @@ void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout, Stack svcStack; { WriteLockGuard sync(handleMappingLock, FB_FUNCTION); - GenericMap > >::Accessor accessor(&services); + GenericMap > >::Accessor accessor(&services); if (accessor.getFirst()) { @@ -6481,7 +6482,7 @@ void Dispatcher::shutdown(CheckStatusWrapper* userStatus, unsigned int timeout, Stack attStack; { WriteLockGuard sync(handleMappingLock, FB_FUNCTION); - GenericMap > >::Accessor accessor(&attachments); + GenericMap > >::Accessor accessor(&attachments); if (accessor.getFirst()) { diff --git a/src/yvalve/why_proto.h b/src/yvalve/why_proto.h index 31c4c1d809..f47e9a540f 100644 --- a/src/yvalve/why_proto.h +++ b/src/yvalve/why_proto.h @@ -26,236 +26,31 @@ extern "C" { -#ifndef JRD_IBASE_H - -ISC_STATUS API_ROUTINE isc_dsql_allocate_statement(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*); -ISC_STATUS API_ROUTINE isc_dsql_alloc_statement2(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*); -ISC_STATUS API_ROUTINE isc_dsql_describe(ISC_STATUS *, FB_API_HANDLE*, USHORT, XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_describe_bind(ISC_STATUS*, FB_API_HANDLE*, - USHORT, XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_execute(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - USHORT, const XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_execute_m(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, USHORT, - const SCHAR*, USHORT, USHORT, SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, USHORT, - const XSQLDA*, const XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - USHORT, const SCHAR*, - USHORT, USHORT, const SCHAR*, - USHORT, SCHAR*, - USHORT, USHORT, SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_execute_immediate(ISC_STATUS*, FB_API_HANDLE*, - FB_API_HANDLE*, USHORT, - const SCHAR*, USHORT, - const XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_exec_immed2(ISC_STATUS*, FB_API_HANDLE*, - FB_API_HANDLE*, USHORT, - const SCHAR*, USHORT, const XSQLDA*, - const XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_execute_immediate_m(ISC_STATUS*, - FB_API_HANDLE*, - FB_API_HANDLE*, USHORT, - const SCHAR*, USHORT, - USHORT, SCHAR*, - USHORT, USHORT, - SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_exec_immed2_m(ISC_STATUS*, FB_API_HANDLE*, - FB_API_HANDLE*, USHORT, +ISC_STATUS API_ROUTINE isc_dsql_exec_immed2_m(ISC_STATUS*, isc_db_handle*, + isc_tr_handle*, USHORT, const SCHAR*, USHORT, USHORT, SCHAR*, USHORT, USHORT, const SCHAR*, USHORT, SCHAR*, USHORT, USHORT, SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS*, FB_API_HANDLE*, - FB_API_HANDLE*, + +ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS*, isc_db_handle*, + isc_tr_handle*, USHORT, const SCHAR*, USHORT, USHORT, const SCHAR*, USHORT, USHORT, const SCHAR*, USHORT, SCHAR*, USHORT, USHORT, SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_fetch(ISC_STATUS*, FB_API_HANDLE*, USHORT, const XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS*, FB_API_HANDLE*, USHORT, - SCHAR*, USHORT, USHORT, SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_free_statement(ISC_STATUS*, FB_API_HANDLE*, USHORT); -ISC_STATUS API_ROUTINE isc_dsql_insert(ISC_STATUS*, FB_API_HANDLE*, USHORT, XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_insert_m(ISC_STATUS*, FB_API_HANDLE*, USHORT, - const SCHAR*, USHORT, - USHORT, const SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_prepare(ISC_STATUS*, FB_API_HANDLE*, - FB_API_HANDLE*, USHORT, const SCHAR*, - USHORT, XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_prepare_m(ISC_STATUS*, FB_API_HANDLE*, - FB_API_HANDLE*, USHORT, const SCHAR*, - USHORT, USHORT, const SCHAR*, USHORT, - SCHAR*); -ISC_STATUS API_ROUTINE isc_dsql_set_cursor_name(ISC_STATUS*, FB_API_HANDLE*, - const SCHAR*, USHORT); -ISC_STATUS API_ROUTINE fb_dsql_set_timeout(ISC_STATUS*, FB_API_HANDLE*, ULONG timeout); -//ISC_STATUS API_ROUTINE fb_get_statement_interface(ISC_STATUS*, FB_API_HANDLE*, void**); -ISC_STATUS API_ROUTINE isc_dsql_sql_info(ISC_STATUS*, FB_API_HANDLE*, SSHORT, - const SCHAR*, SSHORT, SCHAR*); -//ISC_STATUS API_ROUTINE isc_prepare_transaction2(ISC_STATUS*, FB_API_HANDLE*, USHORT, -// UCHAR*); -// Deprecated in favor of FPTR_EVENT_CALLBACK -//typedef void event_ast_routine(UCHAR*, USHORT, UCHAR*); -//ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS*, FB_API_HANDLE*, SLONG*, -// USHORT, const UCHAR*, -// FPTR_EVENT_CALLBACK, void*); -//ISC_STATUS API_ROUTINE isc_rollback_transaction(ISC_STATUS*, FB_API_HANDLE*); -//ISC_STATUS API_ROUTINE_VARARG isc_start_transaction(ISC_STATUS*, -// FB_API_HANDLE*, SSHORT, -// ...); +typedef void AttachmentCleanupRoutine(isc_db_handle*, void*); +typedef void TransactionCleanupRoutine(isc_tr_handle, void*); -ISC_STATUS API_ROUTINE isc_attach_database(ISC_STATUS*, SSHORT, const TEXT*, - FB_API_HANDLE* , SSHORT, const SCHAR*); - -ISC_STATUS API_ROUTINE isc_blob_info(ISC_STATUS*, FB_API_HANDLE*, SSHORT, const SCHAR*, - SSHORT, SCHAR*); - -ISC_STATUS API_ROUTINE isc_cancel_blob(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_cancel_events(ISC_STATUS*, FB_API_HANDLE*, SLONG*); - -ISC_STATUS API_ROUTINE isc_close_blob(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_commit_retaining(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_compile_request(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - USHORT, const SCHAR*); - -ISC_STATUS API_ROUTINE isc_compile_request2(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - USHORT, const SCHAR*); - -ISC_STATUS API_ROUTINE isc_create_blob(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - FB_API_HANDLE*, ISC_QUAD*); - -ISC_STATUS API_ROUTINE isc_create_blob2(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - FB_API_HANDLE*, ISC_QUAD*, SSHORT, const UCHAR*); - -ISC_STATUS API_ROUTINE isc_create_database(ISC_STATUS*, USHORT, const TEXT*, - FB_API_HANDLE*, SSHORT, const UCHAR*, - USHORT); - -ISC_STATUS API_ROUTINE isc_database_info(ISC_STATUS*, FB_API_HANDLE*, SSHORT, - const SCHAR*, SSHORT, SCHAR*); - -ISC_STATUS API_ROUTINE isc_ddl(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, SSHORT, const UCHAR*); - -ISC_STATUS API_ROUTINE isc_detach_database(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_drop_database(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_get_segment(ISC_STATUS*, FB_API_HANDLE*, USHORT*, USHORT, - UCHAR*); - -ISC_STATUS API_ROUTINE isc_get_slice(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, ISC_QUAD*, - USHORT, const UCHAR*, USHORT, const UCHAR*, - SLONG, UCHAR*, SLONG*); - -ISC_STATUS API_ROUTINE isc_open_blob(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, FB_API_HANDLE*, - ISC_QUAD*); - -ISC_STATUS API_ROUTINE isc_open_blob2(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, FB_API_HANDLE*, - ISC_QUAD*, SSHORT, const UCHAR*); - -ISC_STATUS API_ROUTINE isc_prepare_transaction(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_prepare_transaction2(ISC_STATUS*, FB_API_HANDLE*, USHORT, - const UCHAR*); - -ISC_STATUS API_ROUTINE isc_put_segment(ISC_STATUS*, FB_API_HANDLE*, USHORT, const UCHAR*); - -ISC_STATUS API_ROUTINE isc_put_slice(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, ISC_QUAD*, - USHORT, const UCHAR*, USHORT, const SLONG*, - SLONG, UCHAR*); - -ISC_STATUS API_ROUTINE isc_que_events(ISC_STATUS*, FB_API_HANDLE*, SLONG*, USHORT, - const UCHAR*, - FPTR_EVENT_CALLBACK, void*); - -ISC_STATUS API_ROUTINE isc_receive(ISC_STATUS*, FB_API_HANDLE*, USHORT, USHORT, - SCHAR*, SSHORT); - -ISC_STATUS API_ROUTINE isc_reconnect_transaction(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - SSHORT, const UCHAR*); - -ISC_STATUS API_ROUTINE isc_release_request(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_request_info(ISC_STATUS*, FB_API_HANDLE*, SSHORT, SSHORT, - const SCHAR*, SSHORT, SCHAR*); - -ISC_STATUS API_ROUTINE isc_rollback_retaining(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_rollback_transaction(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_seek_blob(ISC_STATUS*, FB_API_HANDLE*, SSHORT, SLONG, - SLONG*); - -ISC_STATUS API_ROUTINE isc_send(ISC_STATUS*, FB_API_HANDLE*, USHORT, USHORT, const SCHAR*, - SSHORT); - -ISC_STATUS API_ROUTINE isc_service_attach(ISC_STATUS*, USHORT, const TEXT*, FB_API_HANDLE*, - USHORT, const SCHAR*); - -ISC_STATUS API_ROUTINE isc_service_detach(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE isc_service_query(ISC_STATUS*, FB_API_HANDLE*, ULONG*, USHORT, - const SCHAR*, USHORT, const SCHAR*, - USHORT, SCHAR*); - -ISC_STATUS API_ROUTINE isc_service_start(ISC_STATUS*, FB_API_HANDLE*, ULONG*, USHORT, - const SCHAR*); - -ISC_STATUS API_ROUTINE isc_start_and_send(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - USHORT, USHORT, const SCHAR*, SSHORT); - -ISC_STATUS API_ROUTINE isc_start_request(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, SSHORT); - -ISC_STATUS API_ROUTINE isc_start_multiple(ISC_STATUS*, FB_API_HANDLE*, SSHORT, void*); - -ISC_STATUS API_ROUTINE_VARARG isc_start_transaction(ISC_STATUS*, FB_API_HANDLE*, - SSHORT, ...); - -ISC_STATUS API_ROUTINE isc_transact_request(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, - USHORT, SCHAR*, USHORT, - SCHAR*, USHORT, SCHAR*); - -ISC_STATUS API_ROUTINE isc_transaction_info(ISC_STATUS*, FB_API_HANDLE*, SSHORT, - const SCHAR*, SSHORT, UCHAR*); - -ISC_STATUS API_ROUTINE isc_unwind_request(ISC_STATUS*, FB_API_HANDLE*, SSHORT); -ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS*, FB_API_HANDLE*, USHORT, - const UCHAR*, UCHAR*); - -SLONG API_ROUTINE isc_reset_fpe(USHORT); - -#endif /* JRD_IBASE_H */ - -ISC_STATUS API_ROUTINE fb_cancel_operation(ISC_STATUS*, FB_API_HANDLE*, USHORT); - -ISC_STATUS API_ROUTINE fb_disconnect_transaction(ISC_STATUS*, FB_API_HANDLE*); - -int API_ROUTINE fb_shutdown(unsigned int timeout, const int reason); -ISC_STATUS API_ROUTINE fb_shutdown_callback(ISC_STATUS* user_status, FB_SHUTDOWN_CALLBACK callBack, - const int mask, void* arg); - -ISC_STATUS API_ROUTINE fb_ping(ISC_STATUS*, FB_API_HANDLE*); - -ISC_STATUS API_ROUTINE fb_get_database_handle(ISC_STATUS*, FB_API_HANDLE*, void*); -ISC_STATUS API_ROUTINE fb_get_transaction_handle(ISC_STATUS*, FB_API_HANDLE*, void*); -ISC_STATUS API_ROUTINE fb_database_crypt_callback(ISC_STATUS*, void*); - -typedef void AttachmentCleanupRoutine(FB_API_HANDLE*, void*); -typedef void TransactionCleanupRoutine(FB_API_HANDLE, void*); - -ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS*, FB_API_HANDLE*, +ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS*, isc_db_handle*, AttachmentCleanupRoutine*, void*); + int API_ROUTINE gds__disable_subsystem(TEXT*); int API_ROUTINE gds__enable_subsystem(TEXT*); -ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS*, FB_API_HANDLE*, +ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS*, isc_tr_handle*, TransactionCleanupRoutine*, void*); } /* extern "C"*/