8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Postfix for #6886, thanks to Adriano for very useful comments and suggestions

This commit is contained in:
AlexPeshkoff 2021-09-01 19:04:35 +03:00
parent 861b16fcc6
commit 6a9d2aa3fa
27 changed files with 1464 additions and 488 deletions

View File

@ -29,7 +29,7 @@ OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP))
C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter
CXX_FLAGS := $(C_FLAGS)
FPC_FLAGS := -Mdelphi
FPC_FLAGS := -Mdelphi -Cg
ifeq ($(shell uname),FreeBSD)
DL_LIB :=
@ -47,6 +47,7 @@ endif
ifeq ($(TARGET),debug)
FPC_FLAGS += -g
LD_FLAGS += -ggdb
endif
vpath %.c $(SRC_DIRS)
@ -85,6 +86,7 @@ $(foreach bdir,$(OBJ_DIRS),$(eval $(call compile,$(bdir))))
-include $(addsuffix .d,$(basename $(OBJS_CPP)))
$(BIN_DIR)/cloop: \
$(OBJ_DIR)/cloop/Action.o \
$(OBJ_DIR)/cloop/Expr.o \
$(OBJ_DIR)/cloop/Generator.o \
$(OBJ_DIR)/cloop/Lexer.o \

133
extern/cloop/src/cloop/Action.cpp vendored Normal file
View File

@ -0,0 +1,133 @@
/*
* The contents of this file are subject to the Initial
* Developer's 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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* 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 Alexander Peshkov.
*
* Copyright (c) 2021 Alexander Peshkov <peshkoff@mail.ru>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#include "Action.h"
#include "Parser.h"
#include "Generator.h"
#include <stdio.h>
using std::string;
inline void identify(const ActionParametersBlock& apb, unsigned ident)
{
identify(apb.out, ident);
}
void IfThenElseAction::generate(const ActionParametersBlock& apb, unsigned ident)
{
switch(apb.language)
{
case LANGUAGE_C:
case LANGUAGE_CPP:
identify(apb, ident);
fprintf(apb.out, "if (%s) {\n", exprIf->generate(apb.language, apb.prefix).c_str());
actThen->generate(apb, ident + 1);
identify(apb, ident);
fprintf(apb.out, "}\n");
if (actElse)
{
identify(apb, ident);
fprintf(apb.out, "else {\n");
actElse->generate(apb, ident + 1);
identify(apb, ident);
fprintf(apb.out, "}\n");
}
break;
case LANGUAGE_PASCAL:
identify(apb, ident);
fprintf(apb.out, "if %s then begin\n", exprIf->generate(apb.language, apb.prefix).c_str());
actThen->generate(apb, ident + 1);
identify(apb, ident);
fprintf(apb.out, "end\n");
if (actElse)
{
identify(apb, ident);
fprintf(apb.out, "else begin\n");
actElse->generate(apb, ident + 1);
identify(apb, ident);
fprintf(apb.out, "end\n");
}
break;
}
}
void CallAction::generate(const ActionParametersBlock& apb, unsigned ident)
{
identify(apb, ident);
fprintf(apb.out, "%s(", name.c_str());
for (auto itr = parameters.begin(); itr != parameters.end(); ++itr)
{
fprintf(apb.out, "%s%s", itr == parameters.begin() ? "" : ", ", itr->c_str());
}
fprintf(apb.out, ");\n");
}
void DefAction::generate(const ActionParametersBlock& apb, unsigned ident)
{
switch(defType)
{
case DEF_NOT_IMPLEMENTED:
switch(apb.language)
{
case LANGUAGE_C:
if (!apb.statusName.empty())
{
identify(apb, ident);
fprintf(apb.out, "CLOOP_setVersionError(%s, \"%s%s\", cloopVTable->version, %d);\n",
apb.statusName.c_str(), apb.prefix.c_str(),
apb.interface->name.c_str(), apb.method->version);
}
break;
case LANGUAGE_CPP:
if (!apb.statusName.empty())
{
identify(apb, ident);
fprintf(apb.out, "%s::setVersionError(%s, \"%s%s\", cloopVTable->version, %d);\n",
apb.exceptionClass.c_str(), apb.statusName.c_str(), apb.prefix.c_str(),
apb.interface->name.c_str(), apb.method->version);
identify(apb, ident);
fprintf(apb.out, "%s::checkException(%s);\n",
apb.exceptionClass.c_str(), apb.statusName.c_str());
}
break;
case LANGUAGE_PASCAL:
if (!apb.statusName.empty() && !apb.exceptionClass.empty())
{
identify(apb, ident);
fprintf(apb.out, "%s.setVersionError(%s, \'%s%s\', vTable.version, %d);\n",
apb.exceptionClass.c_str(), apb.statusName.c_str(), apb.prefix.c_str(),
apb.interface->name.c_str(), apb.method->version);
}
break;
}
break;
}
}

105
extern/cloop/src/cloop/Action.h vendored Normal file
View File

@ -0,0 +1,105 @@
/*
* The contents of this file are subject to the Initial
* Developer's 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.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* 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 Alexander Peshkov.
*
* Copyright (c) 2021 Alexander Peshkov <peshkoff@mail.ru>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#ifndef CLOOP_ACTION_H
#define CLOOP_ACTION_H
#include "Expr.h"
#include <string>
#include <vector>
#include <stdio.h>
class Method;
class Interface;
struct ActionParametersBlock
{
FILE* out;
Language language;
const std::string& prefix;
const std::string& exceptionClass;
const std::string& statusName;
Interface* interface;
Method* method;
};
class Action
{
public:
virtual ~Action()
{ }
virtual void generate(const ActionParametersBlock& apb, unsigned ident) = 0;
};
class IfThenElseAction : public Action
{
public:
IfThenElseAction()
: exprIf(nullptr), actThen(nullptr), actElse(nullptr)
{ }
IfThenElseAction(const IfThenElseAction&) = default;
void generate(const ActionParametersBlock& apb, unsigned ident) override;
Expr* exprIf;
Action* actThen;
Action* actElse;
};
class CallAction : public Action
{
public:
CallAction() = default;
CallAction(const CallAction&) = default;
void generate(const ActionParametersBlock& apb, unsigned ident) override;
void addParam(const std::string& parName)
{
parameters.push_back(parName);
}
std::string name;
std::vector<std::string> parameters;
};
class DefAction : public Action
{
public:
enum DefType { DEF_NOT_IMPLEMENTED };
DefAction(DefType dt)
: defType(dt)
{ }
void generate(const ActionParametersBlock& apb, unsigned ident) override;
DefType defType;
};
#endif //CLOOP_ACTION_H

View File

@ -86,19 +86,22 @@ string ConstantExpr::generate(Language language, const string& prefix)
{
string retPrefix;
switch (language)
if (interface)
{
case LANGUAGE_C:
retPrefix = prefix + interface->name + "_";
break;
switch (language)
{
case LANGUAGE_C:
retPrefix = prefix + interface->name + "_";
break;
case LANGUAGE_CPP:
retPrefix = prefix + interface->name + "::";
break;
case LANGUAGE_CPP:
retPrefix = prefix + interface->name + "::";
break;
case LANGUAGE_PASCAL:
retPrefix = prefix + interface->name + ".";
break;
case LANGUAGE_PASCAL:
retPrefix = prefix + interface->name + ".";
break;
}
}
return retPrefix + name;

View File

@ -44,6 +44,16 @@ const char* const Generator::AUTOGEN_MSG =
//--------------------------------------
static const char* tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
void identify(FILE* out, unsigned ident)
{
fprintf(out, "%.*s", ident, tabs);
}
//--------------------------------------
FileGenerator::FileGenerator(const string& filename, const string& prefix)
: prefix(prefix)
{
@ -333,17 +343,12 @@ void CppGenerator::generate()
fprintf(out, "\t\t\tif (cloopVTable->version < %d)\n", method->version);
fprintf(out, "\t\t\t{\n");
if (!statusName.empty())
{
fprintf(out,
"\t\t\t\tStatusType::setVersionError(%s, \"%s%s\", cloopVTable->version, %d);\n",
statusName.c_str(),
prefix.c_str(),
interface->name.c_str(),
method->version);
ActionParametersBlock apb = {out, LANGUAGE_CPP, prefix, "StatusType", statusName, interface, method};
fprintf(out, "\t\t\t\tStatusType::checkException(%s);\n", statusName.c_str());
}
if (method->notImplementedAction)
method->notImplementedAction->generate(apb, 4);
else
DefAction(DefAction::DEF_NOT_IMPLEMENTED).generate(apb, 4);
fprintf(out, "\t\t\t\treturn");
@ -1144,6 +1149,15 @@ void PascalGenerator::generate()
bool isProcedure = method->returnTypeRef.token.type == Token::TYPE_VOID &&
!method->returnTypeRef.isPointer;
string statusName;
if (!method->parameters.empty() &&
parser->exceptionInterface &&
method->parameters.front()->typeRef.token.text == parser->exceptionInterface->name)
{
statusName = method->parameters.front()->name;
}
fprintf(out, "%s %s.%s(",
(isProcedure ? "procedure" : "function"),
escapeName(interface->name, true).c_str(),
@ -1168,10 +1182,35 @@ void PascalGenerator::generate()
fprintf(out, ";\n");
fprintf(out, "begin\n");
fprintf(out, "\t");
//// TODO: checkVersion
unsigned ident = 1;
if (method->version - (interface->super ? interface->super->version : 0) != 1)
{
fprintf(out, "\tif (vTable.version < %d) then begin\n", method->version);
ActionParametersBlock apb = {out, LANGUAGE_PASCAL, prefix, exceptionClass,
statusName, interface, method};
if (method->notImplementedAction)
method->notImplementedAction->generate(apb, 2);
else
DefAction(DefAction::DEF_NOT_IMPLEMENTED).generate(apb, 2);
if (method->returnTypeRef.token.type != Token::TYPE_VOID ||
method->returnTypeRef.isPointer)
{
fprintf(out, "\t\tResult := %s;\n",
method->notImplementedExpr ?
method->notImplementedExpr->generate(LANGUAGE_PASCAL, prefix).c_str() :
method->returnTypeRef.valueIsPointer() ? "nil" :
method->returnTypeRef.token.type == Token::TYPE_BOOLEAN ? "false" : "0");
}
fprintf(out, "\tend\n\telse begin\n");
ident = 2;
}
identify(out, ident);
if (!isProcedure)
fprintf(out, "Result := ");
@ -1188,14 +1227,11 @@ void PascalGenerator::generate()
fprintf(out, ");\n");
if (!method->parameters.empty() &&
parser->exceptionInterface &&
method->parameters.front()->typeRef.token.text == parser->exceptionInterface->name &&
!exceptionClass.empty())
{
fprintf(out, "\t%s.checkException(%s);\n", exceptionClass.c_str(),
escapeName(method->parameters.front()->name).c_str());
}
if (ident > 1)
fprintf(out, "\tend;\n");
if (!statusName.empty() && !exceptionClass.empty())
fprintf(out, "\t%s.checkException(%s);\n", exceptionClass.c_str(), escapeName(statusName).c_str());
fprintf(out, "end;\n\n");
}

View File

@ -146,4 +146,7 @@ private:
};
void identify(FILE* out, unsigned ident);
#endif // CLOOP_GENERATOR_H

View File

@ -90,6 +90,8 @@ Token& Lexer::getToken(Token& token)
token.type = Token::TYPE_INTERFACE;
else if (token.text == "notImplemented")
token.type = Token::TYPE_NOT_IMPLEMENTED;
else if (token.text == "notImplementedAction")
token.type = Token::TYPE_NOT_IMPLEMENTED_ACTION;
else if (token.text == "struct")
token.type = Token::TYPE_STRUCT;
else if (token.text == "typedef")
@ -98,6 +100,18 @@ Token& Lexer::getToken(Token& token)
token.type = Token::TYPE_VERSION;
else if (token.text == "onError")
token.type = Token::TYPE_ON_ERROR;
else if (token.text == "if")
token.type = Token::TYPE_IF;
else if (token.text == "then")
token.type = Token::TYPE_THEN;
else if (token.text == "else")
token.type = Token::TYPE_ELSE;
else if (token.text == "endif")
token.type = Token::TYPE_ENDIF;
else if (token.text == "call")
token.type = Token::TYPE_CALL;
else if (token.text == "defaultAction")
token.type = Token::TYPE_DEFAULT_ACTION;
// types
else if (token.text == "void")
token.type = Token::TYPE_VOID;

View File

@ -46,10 +46,17 @@ struct Token
TYPE_EXCEPTION,
TYPE_INTERFACE,
TYPE_NOT_IMPLEMENTED,
TYPE_NOT_IMPLEMENTED_ACTION,
TYPE_STRUCT,
TYPE_TYPEDEF,
TYPE_VERSION,
TYPE_ON_ERROR,
TYPE_IF,
TYPE_THEN,
TYPE_ELSE,
TYPE_ENDIF,
TYPE_CALL,
TYPE_DEFAULT_ACTION,
// types
TYPE_VOID,
TYPE_BOOLEAN,

View File

@ -82,6 +82,12 @@ void Parser::parse()
parseTypedef();
break;
case Token::TYPE_BOOLEAN:
if (exception)
error(token, "Cannot use attribute exception in boolean.");
parseBoolean();
break;
default:
syntaxError(token);
break;
@ -164,6 +170,16 @@ void Parser::parseStruct()
getToken(token, TOKEN(';'));
}
void Parser::parseBoolean()
{
Boolean* b = new Boolean();
b->name = getToken(token, Token::TYPE_IDENTIFIER).text;
typesByName.insert(pair<string, BaseType*>(b->name, b));
getToken(token, TOKEN(';'));
}
void Parser::parseTypedef()
{
Typedef* typeDef = new Typedef();
@ -176,7 +192,8 @@ void Parser::parseTypedef()
void Parser::parseItem()
{
Expr* notImplementedExpr = NULL;
Expr* notImplementedExpr = nullptr;
Action* notImplementedAction = nullptr;
std::string onError;
while (lexer->getToken(token).type == TOKEN('['))
@ -190,7 +207,6 @@ void Parser::parseItem()
getToken(token, TOKEN('('));
notImplementedExpr = parseExpr();
getToken(token, TOKEN(')'));
getToken(token, TOKEN(']'));
break;
case Token::TYPE_ON_ERROR:
@ -200,13 +216,19 @@ void Parser::parseItem()
if (token.type != Token::TYPE_IDENTIFIER)
syntaxError(token);
onError = token.text;
getToken(token, TOKEN(']'));
break;
case Token::TYPE_NOT_IMPLEMENTED_ACTION:
if (notImplementedAction)
syntaxError(token);
notImplementedAction = parseAction(DefAction::DEF_NOT_IMPLEMENTED);
break;
default:
syntaxError(token);
break;
}
getToken(token, TOKEN(']'));
}
lexer->pushToken(token);
@ -226,7 +248,7 @@ void Parser::parseItem()
}
getToken(token, TOKEN('('));
parseMethod(typeRef, name, notImplementedExpr, onError);
parseMethod(typeRef, name, notImplementedExpr, onError, notImplementedAction);
}
void Parser::parseConstant(const TypeRef& typeRef, const string& name)
@ -241,7 +263,70 @@ void Parser::parseConstant(const TypeRef& typeRef, const string& name)
getToken(token, TOKEN(';'));
}
void Parser::parseMethod(const TypeRef& returnTypeRef, const string& name, Expr* notImplementedExpr, const string& onError)
Action* Parser::parseAction(DefAction::DefType dt)
{
switch (lexer->getToken(token).type)
{
case Token::TYPE_IF:
return parseIfThenElseAction(dt);
case Token::TYPE_CALL:
return parseCallAction();
case Token::TYPE_DEFAULT_ACTION:
return parseDefAction(dt);
default:
break;
}
syntaxError(token);
}
Action* Parser::parseIfThenElseAction(DefAction::DefType dt)
{
IfThenElseAction act;
act.exprIf = parseLogicalExpr();
getToken(token, Token::TYPE_THEN);
act.actThen = parseAction(dt);
lexer->getToken(token);
if (token.type == Token::TYPE_ELSE)
act.actElse = parseAction(dt);
else
lexer->pushToken(token);
getToken(token, Token::TYPE_ENDIF);
return new IfThenElseAction(act);
}
Action* Parser::parseCallAction()
{
CallAction act;
act.name = getToken(token, Token::TYPE_IDENTIFIER).text;
getToken(token, TOKEN('('));
do
{
act.addParam(getToken(token, Token::TYPE_IDENTIFIER).text);
} while(lexer->getToken(token).type == ',');
if (token.type == ')')
return new CallAction(act);
syntaxError(token);
}
Action* Parser::parseDefAction(DefAction::DefType dt)
{
return new DefAction(dt);
}
void Parser::parseMethod(const TypeRef& returnTypeRef, const string& name, Expr* notImplementedExpr,
const string& onError, Action* notImplementedAction)
{
Method* method = new Method();
interface->methods.push_back(method);
@ -250,6 +335,7 @@ void Parser::parseMethod(const TypeRef& returnTypeRef, const string& name, Expr*
method->name = name;
method->version = interface->version;
method->notImplementedExpr = notImplementedExpr;
method->notImplementedAction = notImplementedAction;
method->onErrorFunction = onError;
if (lexer->getToken(token).type != TOKEN(')'))
@ -354,6 +440,10 @@ Expr* Parser::parsePrimaryExpr()
}
}
case Token::TYPE_DOUBLE_COLON:
getToken(token, Token::TYPE_IDENTIFIER);
return new ConstantExpr(nullptr, token.text);
default:
syntaxError(token);
return NULL; // warning
@ -436,3 +526,26 @@ void Parser::error(const Token& token, const string& msg)
lexer->filename.c_str(), token.line, token.column, msg.c_str());
throw runtime_error(buffer);
}
bool TypeRef::valueIsPointer()
{
if (isPointer)
return true;
switch (token.type)
{
case Token::TYPE_STRING:
return true;
case Token::TYPE_IDENTIFIER:
if (type == BaseType::TYPE_INTERFACE)
return true;
break;
default:
break;
}
return false;
}

View File

@ -23,6 +23,7 @@
#define CLOOP_PARSER_H
#include "Lexer.h"
#include "Action.h"
#include <map>
#include <string>
#include <vector>
@ -38,7 +39,8 @@ public:
{
TYPE_INTERFACE,
TYPE_STRUCT,
TYPE_TYPEDEF
TYPE_TYPEDEF,
TYPE_BOOLEAN
};
protected:
@ -71,6 +73,8 @@ public:
bool isConst;
bool isPointer;
BaseType::Type type;
bool valueIsPointer();
};
@ -96,6 +100,7 @@ class Method
public:
Method()
: notImplementedExpr(NULL),
notImplementedAction(NULL),
version(0),
isConst(false)
{
@ -105,6 +110,7 @@ public:
TypeRef returnTypeRef;
std::vector<Parameter*> parameters;
Expr* notImplementedExpr;
Action* notImplementedAction;
unsigned version;
bool isConst;
std::string onErrorFunction;
@ -139,6 +145,16 @@ public:
};
class Boolean : public BaseType
{
public:
Boolean()
: BaseType(TYPE_BOOLEAN)
{
}
};
class Typedef : public BaseType
{
public:
@ -158,15 +174,22 @@ public:
void parseInterface(bool exception);
void parseStruct();
void parseTypedef();
void parseBoolean();
void parseItem();
void parseConstant(const TypeRef& typeRef, const std::string& name);
void parseMethod(const TypeRef& returnTypeRef, const std::string& name, Expr* notImplementedExpr, const std::string& onErrorFunction);
void parseMethod(const TypeRef& returnTypeRef, const std::string& name, Expr* notImplementedExpr,
const std::string& onErrorFunction, Action* notImplementedAction);
Expr* parseExpr();
Expr* parseLogicalExpr();
Expr* parseUnaryExpr();
Expr* parsePrimaryExpr();
Action* parseAction(DefAction::DefType dt);
Action* parseIfThenElseAction(DefAction::DefType dt);
Action* parseCallAction();
Action* parseDefAction(DefAction::DefType dt);
private:
void checkType(TypeRef& typeRef);
@ -174,8 +197,8 @@ private:
TypeRef parseTypeRef();
void syntaxError(const Token& token);
void error(const Token& token, const std::string& msg);
[[noreturn]] void syntaxError(const Token& token);
[[noreturn]] void error(const Token& token, const std::string& msg);
public:
std::vector<Interface*> interfaces;

View File

@ -25,3 +25,9 @@ begin
else
status.setCode(-1);
end;
class procedure CalcException.setVersionError(status: Status; interfaceName: string;
currentVersion, expectedVersion: NativeInt);
begin
status.setCode(Status.ERROR_1);
end;

View File

@ -6,6 +6,8 @@ public
class procedure checkException(status: Status);
class procedure catchException(status: Status; e: Exception);
class procedure setVersionError(status: Status; interfaceName: string;
currentVersion, expectedVersion: NativeInt);
private
code: Integer;

View File

@ -30,6 +30,8 @@ public
class procedure checkException(status: Status);
class procedure catchException(status: Status; e: Exception);
class procedure setVersionError(status: Status; interfaceName: string;
currentVersion, expectedVersion: NativeInt);
private
code: Integer;
@ -221,17 +223,31 @@ end;
function Calculator.getMemory(): Integer;
begin
Result := CalculatorVTable(vTable).getMemory(Self);
if (vTable.version < 3) then begin
Result := Status.ERROR_1;
end
else begin
Result := CalculatorVTable(vTable).getMemory(Self);
end;
end;
procedure Calculator.setMemory(n: Integer);
begin
CalculatorVTable(vTable).setMemory(Self, n);
if (vTable.version < 3) then begin
end
else begin
CalculatorVTable(vTable).setMemory(Self, n);
end;
end;
procedure Calculator.sumAndStore(status: Status; n1: Integer; n2: Integer);
begin
CalculatorVTable(vTable).sumAndStore(Self, status, n1, n2);
if (vTable.version < 4) then begin
CalcException.setVersionError(status, 'Calculator', vTable.version, 4);
end
else begin
CalculatorVTable(vTable).sumAndStore(Self, status, n1, n2);
end;
CalcException.checkException(status);
end;
@ -248,7 +264,11 @@ end;
procedure Calculator2.copyMemory2(address: IntegerPtr);
begin
Calculator2VTable(vTable).copyMemory2(Self, address);
if (vTable.version < 6) then begin
end
else begin
Calculator2VTable(vTable).copyMemory2(Self, address);
end;
end;
procedure DisposableImpl_disposeDispatcher(this: Disposable); cdecl;
@ -516,6 +536,12 @@ begin
else
status.setCode(-1);
end;
class procedure CalcException.setVersionError(status: Status; interfaceName: string;
currentVersion, expectedVersion: NativeInt);
begin
status.setCode(Status.ERROR_1);
end;
initialization
DisposableImpl_vTable := DisposableVTable.create;
DisposableImpl_vTable.version := 1;

View File

@ -38,6 +38,8 @@ typedef FB_DEC16;
typedef FB_DEC34;
typedef FB_I128;
boolean FB_UsedInYValve;
// Versioned interface - base for all FB interfaces
interface Versioned
{
@ -347,12 +349,14 @@ interface Blob : ReferenceCounted
void putSegment(Status status, uint length,
const void* buffer);
void cancel_1(Status status);
void close_1(Status status);
void deprecatedCancel(Status status);
void deprecatedClose(Status status);
int seek(Status status, int mode, int offset); // returns position
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedCancel(status) endif]
void cancel(Status status);
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedClose(status) endif]
void close(Status status);
}
@ -363,18 +367,21 @@ interface Transaction : ReferenceCounted
uint bufferLength, uchar* buffer);
void prepare(Status status,
uint msgLength, const uchar* message);
void commit_1(Status status);
void deprecatedCommit(Status status);
void commitRetaining(Status status);
void rollback_1(Status status);
void deprecatedRollback(Status status);
void rollbackRetaining(Status status);
void disconnect_1(Status status);
void deprecatedDisconnect(Status status);
Transaction join(Status status, Transaction transaction);
Transaction validate(Status status, Attachment attachment);
Transaction enterDtc(Status status);
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedCommit(status) endif]
void commit(Status status);
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedRollback(status) endif]
void rollback(Status status);
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedDisconnect(status) endif]
void disconnect(Status status);
}
@ -435,7 +442,7 @@ interface ResultSet : ReferenceCounted
boolean isEof(Status status);
boolean isBof(Status status);
MessageMetadata getMetadata(Status status);
void close_1(Status status);
void deprecatedClose(Status status);
// This item is for ISC API emulation only
// It may be gone in future versions
@ -443,6 +450,7 @@ interface ResultSet : ReferenceCounted
void setDelayedOutputFormat(Status status, MessageMetadata format);
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedClose(status) endif]
void close(Status status);
}
@ -484,7 +492,7 @@ interface Statement : ReferenceCounted
ResultSet openCursor(Status status, Transaction transaction,
MessageMetadata inMetadata, void* inBuffer, MessageMetadata outMetadata, uint flags);
void setCursorName(Status status, const string name);
void free_1(Status status);
void deprecatedFree(Status status);
uint getFlags(Status status);
version: // 3.0 => 4.0
@ -501,6 +509,7 @@ version: // 3.0 => 4.0
*/
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedFree(status) endif]
void free(Status status);
}
@ -531,9 +540,10 @@ interface Batch : ReferenceCounted
uint getBlobAlignment(Status status);
MessageMetadata getMetadata(Status status);
void setDefaultBpb(Status status, uint parLength, const uchar* par);
void close_1(Status status);
void deprecatedClose(Status status);
version: // 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedClose(status) endif]
void close(Status status);
}
@ -572,9 +582,10 @@ interface Replicator : ReferenceCounted
void process(Status status, ReplicationBatch batch);
*/
void process(Status status, uint length, const uchar* data);
void close_1(Status status);
void deprecatedClose(Status status);
version: // 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedClose(status) endif]
void close(Status status);
}
@ -591,17 +602,19 @@ interface Request : ReferenceCounted
void startAndSend(Status status, Transaction tra, int level, uint msgType,
uint length, const void* message);
void unwind(Status status, int level);
void free_1(Status status);
void deprecatedFree(Status status);
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedFree(status) endif]
void free(Status status);
}
interface Events : ReferenceCounted
{
void cancel_1(Status status);
void deprecatedCancel(Status status);
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedCancel(status) endif]
void cancel(Status status);
}
@ -647,8 +660,8 @@ interface Attachment : ReferenceCounted
uint length, const uchar* events);
void cancelOperation(Status status, int option);
void ping(Status status);
void detach_1(Status status);
void dropDatabase_1(Status status);
void deprecatedDetach(Status status);
void deprecatedDropDatabase(Status status);
version: // 3.0 => 4.0
// Idle attachment timeout, seconds
@ -672,13 +685,15 @@ version: // 3.0 => 4.0
Replicator createReplicator(Status status);
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedDetach(status) endif]
void detach(Status status);
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedDropDatabase(status) endif]
void dropDatabase(Status status);
}
interface Service : ReferenceCounted
{
void detach_1(Status status);
void deprecatedDetach(Status status);
void query(Status status,
uint sendLength, const uchar* sendItems,
uint receiveLength, const uchar* receiveItems,
@ -687,6 +702,7 @@ interface Service : ReferenceCounted
uint spbLength, const uchar* spb);
version: // 3.0.7 => 3.0.8, 4.0.0 => 4.0.1
[notImplementedAction if ::FB_UsedInYValve then defaultAction else call deprecatedDetach(status) endif]
void detach(Status status);
}

View File

@ -1044,8 +1044,8 @@ namespace Firebird
void (CLOOP_CARG *getInfo)(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw();
int (CLOOP_CARG *getSegment)(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) throw();
void (CLOOP_CARG *putSegment)(IBlob* self, IStatus* status, unsigned length, const void* buffer) throw();
void (CLOOP_CARG *cancel_1)(IBlob* self, IStatus* status) throw();
void (CLOOP_CARG *close_1)(IBlob* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedCancel)(IBlob* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedClose)(IBlob* self, IStatus* status) throw();
int (CLOOP_CARG *seek)(IBlob* self, IStatus* status, int mode, int offset) throw();
void (CLOOP_CARG *cancel)(IBlob* self, IStatus* status) throw();
void (CLOOP_CARG *close)(IBlob* self, IStatus* status) throw();
@ -1086,17 +1086,17 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void cancel_1(StatusType* status)
template <typename StatusType> void deprecatedCancel(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->cancel_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedCancel(this, status);
StatusType::checkException(status);
}
template <typename StatusType> void close_1(StatusType* status)
template <typename StatusType> void deprecatedClose(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->close_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedClose(this, status);
StatusType::checkException(status);
}
@ -1112,8 +1112,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedCancel(status);
}
return;
}
StatusType::clearException(status);
@ -1125,8 +1130,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedClose(status);
}
return;
}
StatusType::clearException(status);
@ -1142,11 +1152,11 @@ namespace Firebird
{
void (CLOOP_CARG *getInfo)(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw();
void (CLOOP_CARG *prepare)(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) throw();
void (CLOOP_CARG *commit_1)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedCommit)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *commitRetaining)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *rollback_1)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedRollback)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *rollbackRetaining)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *disconnect_1)(ITransaction* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedDisconnect)(ITransaction* self, IStatus* status) throw();
ITransaction* (CLOOP_CARG *join)(ITransaction* self, IStatus* status, ITransaction* transaction) throw();
ITransaction* (CLOOP_CARG *validate)(ITransaction* self, IStatus* status, IAttachment* attachment) throw();
ITransaction* (CLOOP_CARG *enterDtc)(ITransaction* self, IStatus* status) throw();
@ -1182,10 +1192,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void commit_1(StatusType* status)
template <typename StatusType> void deprecatedCommit(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->commit_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedCommit(this, status);
StatusType::checkException(status);
}
@ -1196,10 +1206,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void rollback_1(StatusType* status)
template <typename StatusType> void deprecatedRollback(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->rollback_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedRollback(this, status);
StatusType::checkException(status);
}
@ -1210,10 +1220,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void disconnect_1(StatusType* status)
template <typename StatusType> void deprecatedDisconnect(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->disconnect_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedDisconnect(this, status);
StatusType::checkException(status);
}
@ -1245,8 +1255,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedCommit(status);
}
return;
}
StatusType::clearException(status);
@ -1258,8 +1273,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedRollback(status);
}
return;
}
StatusType::clearException(status);
@ -1271,8 +1291,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedDisconnect(status);
}
return;
}
StatusType::clearException(status);
@ -1640,7 +1665,7 @@ namespace Firebird
FB_BOOLEAN (CLOOP_CARG *isEof)(IResultSet* self, IStatus* status) throw();
FB_BOOLEAN (CLOOP_CARG *isBof)(IResultSet* self, IStatus* status) throw();
IMessageMetadata* (CLOOP_CARG *getMetadata)(IResultSet* self, IStatus* status) throw();
void (CLOOP_CARG *close_1)(IResultSet* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedClose)(IResultSet* self, IStatus* status) throw();
void (CLOOP_CARG *setDelayedOutputFormat)(IResultSet* self, IStatus* status, IMessageMetadata* format) throw();
void (CLOOP_CARG *close)(IResultSet* self, IStatus* status) throw();
};
@ -1730,10 +1755,10 @@ namespace Firebird
return ret;
}
template <typename StatusType> void close_1(StatusType* status)
template <typename StatusType> void deprecatedClose(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->close_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedClose(this, status);
StatusType::checkException(status);
}
@ -1748,8 +1773,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IResultSet", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IResultSet", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedClose(status);
}
return;
}
StatusType::clearException(status);
@ -1772,7 +1802,7 @@ namespace Firebird
ITransaction* (CLOOP_CARG *execute)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw();
IResultSet* (CLOOP_CARG *openCursor)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) throw();
void (CLOOP_CARG *setCursorName)(IStatement* self, IStatus* status, const char* name) throw();
void (CLOOP_CARG *free_1)(IStatement* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedFree)(IStatement* self, IStatus* status) throw();
unsigned (CLOOP_CARG *getFlags)(IStatement* self, IStatus* status) throw();
unsigned (CLOOP_CARG *getTimeout)(IStatement* self, IStatus* status) throw();
void (CLOOP_CARG *setTimeout)(IStatement* self, IStatus* status, unsigned timeOut) throw();
@ -1877,10 +1907,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void free_1(StatusType* status)
template <typename StatusType> void deprecatedFree(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->free_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedFree(this, status);
StatusType::checkException(status);
}
@ -1937,8 +1967,13 @@ namespace Firebird
{
if (cloopVTable->version < 5)
{
StatusType::setVersionError(status, "IStatement", cloopVTable->version, 5);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IStatement", cloopVTable->version, 5);
StatusType::checkException(status);
}
else {
deprecatedFree(status);
}
return;
}
StatusType::clearException(status);
@ -1962,7 +1997,7 @@ namespace Firebird
unsigned (CLOOP_CARG *getBlobAlignment)(IBatch* self, IStatus* status) throw();
IMessageMetadata* (CLOOP_CARG *getMetadata)(IBatch* self, IStatus* status) throw();
void (CLOOP_CARG *setDefaultBpb)(IBatch* self, IStatus* status, unsigned parLength, const unsigned char* par) throw();
void (CLOOP_CARG *close_1)(IBatch* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedClose)(IBatch* self, IStatus* status) throw();
void (CLOOP_CARG *close)(IBatch* self, IStatus* status) throw();
};
@ -2064,10 +2099,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void close_1(StatusType* status)
template <typename StatusType> void deprecatedClose(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->close_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedClose(this, status);
StatusType::checkException(status);
}
@ -2075,8 +2110,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IBatch", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IBatch", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedClose(status);
}
return;
}
StatusType::clearException(status);
@ -2151,7 +2191,7 @@ namespace Firebird
struct VTable : public IReferenceCounted::VTable
{
void (CLOOP_CARG *process)(IReplicator* self, IStatus* status, unsigned length, const unsigned char* data) throw();
void (CLOOP_CARG *close_1)(IReplicator* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedClose)(IReplicator* self, IStatus* status) throw();
void (CLOOP_CARG *close)(IReplicator* self, IStatus* status) throw();
};
@ -2175,10 +2215,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void close_1(StatusType* status)
template <typename StatusType> void deprecatedClose(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->close_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedClose(this, status);
StatusType::checkException(status);
}
@ -2186,8 +2226,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IReplicator", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IReplicator", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedClose(status);
}
return;
}
StatusType::clearException(status);
@ -2207,7 +2252,7 @@ namespace Firebird
void (CLOOP_CARG *start)(IRequest* self, IStatus* status, ITransaction* tra, int level) throw();
void (CLOOP_CARG *startAndSend)(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) throw();
void (CLOOP_CARG *unwind)(IRequest* self, IStatus* status, int level) throw();
void (CLOOP_CARG *free_1)(IRequest* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedFree)(IRequest* self, IStatus* status) throw();
void (CLOOP_CARG *free)(IRequest* self, IStatus* status) throw();
};
@ -2266,10 +2311,10 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void free_1(StatusType* status)
template <typename StatusType> void deprecatedFree(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->free_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedFree(this, status);
StatusType::checkException(status);
}
@ -2277,8 +2322,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IRequest", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IRequest", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedFree(status);
}
return;
}
StatusType::clearException(status);
@ -2292,7 +2342,7 @@ namespace Firebird
public:
struct VTable : public IReferenceCounted::VTable
{
void (CLOOP_CARG *cancel_1)(IEvents* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedCancel)(IEvents* self, IStatus* status) throw();
void (CLOOP_CARG *cancel)(IEvents* self, IStatus* status) throw();
};
@ -2309,10 +2359,10 @@ namespace Firebird
public:
static const unsigned VERSION = 4;
template <typename StatusType> void cancel_1(StatusType* status)
template <typename StatusType> void deprecatedCancel(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->cancel_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedCancel(this, status);
StatusType::checkException(status);
}
@ -2320,8 +2370,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IEvents", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IEvents", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedCancel(status);
}
return;
}
StatusType::clearException(status);
@ -2351,8 +2406,8 @@ namespace Firebird
IEvents* (CLOOP_CARG *queEvents)(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) throw();
void (CLOOP_CARG *cancelOperation)(IAttachment* self, IStatus* status, int option) throw();
void (CLOOP_CARG *ping)(IAttachment* self, IStatus* status) throw();
void (CLOOP_CARG *detach_1)(IAttachment* self, IStatus* status) throw();
void (CLOOP_CARG *dropDatabase_1)(IAttachment* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedDetach)(IAttachment* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedDropDatabase)(IAttachment* self, IStatus* status) throw();
unsigned (CLOOP_CARG *getIdleTimeout)(IAttachment* self, IStatus* status) throw();
void (CLOOP_CARG *setIdleTimeout)(IAttachment* self, IStatus* status, unsigned timeOut) throw();
unsigned (CLOOP_CARG *getStatementTimeout)(IAttachment* self, IStatus* status) throw();
@ -2498,17 +2553,17 @@ namespace Firebird
StatusType::checkException(status);
}
template <typename StatusType> void detach_1(StatusType* status)
template <typename StatusType> void deprecatedDetach(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->detach_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedDetach(this, status);
StatusType::checkException(status);
}
template <typename StatusType> void dropDatabase_1(StatusType* status)
template <typename StatusType> void deprecatedDropDatabase(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->dropDatabase_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedDropDatabase(this, status);
StatusType::checkException(status);
}
@ -2598,8 +2653,13 @@ namespace Firebird
{
if (cloopVTable->version < 5)
{
StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5);
StatusType::checkException(status);
}
else {
deprecatedDetach(status);
}
return;
}
StatusType::clearException(status);
@ -2611,8 +2671,13 @@ namespace Firebird
{
if (cloopVTable->version < 5)
{
StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5);
StatusType::checkException(status);
}
else {
deprecatedDropDatabase(status);
}
return;
}
StatusType::clearException(status);
@ -2626,7 +2691,7 @@ namespace Firebird
public:
struct VTable : public IReferenceCounted::VTable
{
void (CLOOP_CARG *detach_1)(IService* self, IStatus* status) throw();
void (CLOOP_CARG *deprecatedDetach)(IService* self, IStatus* status) throw();
void (CLOOP_CARG *query)(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) throw();
void (CLOOP_CARG *start)(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) throw();
void (CLOOP_CARG *detach)(IService* self, IStatus* status) throw();
@ -2645,10 +2710,10 @@ namespace Firebird
public:
static const unsigned VERSION = 4;
template <typename StatusType> void detach_1(StatusType* status)
template <typename StatusType> void deprecatedDetach(StatusType* status)
{
StatusType::clearException(status);
static_cast<VTable*>(this->cloopVTable)->detach_1(this, status);
static_cast<VTable*>(this->cloopVTable)->deprecatedDetach(this, status);
StatusType::checkException(status);
}
@ -2670,8 +2735,13 @@ namespace Firebird
{
if (cloopVTable->version < 4)
{
StatusType::setVersionError(status, "IService", cloopVTable->version, 4);
StatusType::checkException(status);
if (FB_UsedInYValve) {
StatusType::setVersionError(status, "IService", cloopVTable->version, 4);
StatusType::checkException(status);
}
else {
deprecatedDetach(status);
}
return;
}
StatusType::clearException(status);
@ -8415,8 +8485,8 @@ namespace Firebird
this->getInfo = &Name::cloopgetInfoDispatcher;
this->getSegment = &Name::cloopgetSegmentDispatcher;
this->putSegment = &Name::cloopputSegmentDispatcher;
this->cancel_1 = &Name::cloopcancel_1Dispatcher;
this->close_1 = &Name::cloopclose_1Dispatcher;
this->deprecatedCancel = &Name::cloopdeprecatedCancelDispatcher;
this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher;
this->seek = &Name::cloopseekDispatcher;
this->cancel = &Name::cloopcancelDispatcher;
this->close = &Name::cloopcloseDispatcher;
@ -8469,13 +8539,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopcancel_1Dispatcher(IBlob* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCancelDispatcher(IBlob* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::cancel_1(&status2);
static_cast<Name*>(self)->Name::deprecatedCancel(&status2);
}
catch (...)
{
@ -8483,13 +8553,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopclose_1Dispatcher(IBlob* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IBlob* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::close_1(&status2);
static_cast<Name*>(self)->Name::deprecatedClose(&status2);
}
catch (...)
{
@ -8582,8 +8652,8 @@ namespace Firebird
virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0;
virtual int getSegment(StatusType* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) = 0;
virtual void putSegment(StatusType* status, unsigned length, const void* buffer) = 0;
virtual void cancel_1(StatusType* status) = 0;
virtual void close_1(StatusType* status) = 0;
virtual void deprecatedCancel(StatusType* status) = 0;
virtual void deprecatedClose(StatusType* status) = 0;
virtual int seek(StatusType* status, int mode, int offset) = 0;
virtual void cancel(StatusType* status) = 0;
virtual void close(StatusType* status) = 0;
@ -8606,11 +8676,11 @@ namespace Firebird
this->release = &Name::cloopreleaseDispatcher;
this->getInfo = &Name::cloopgetInfoDispatcher;
this->prepare = &Name::cloopprepareDispatcher;
this->commit_1 = &Name::cloopcommit_1Dispatcher;
this->deprecatedCommit = &Name::cloopdeprecatedCommitDispatcher;
this->commitRetaining = &Name::cloopcommitRetainingDispatcher;
this->rollback_1 = &Name::clooprollback_1Dispatcher;
this->deprecatedRollback = &Name::cloopdeprecatedRollbackDispatcher;
this->rollbackRetaining = &Name::clooprollbackRetainingDispatcher;
this->disconnect_1 = &Name::cloopdisconnect_1Dispatcher;
this->deprecatedDisconnect = &Name::cloopdeprecatedDisconnectDispatcher;
this->join = &Name::cloopjoinDispatcher;
this->validate = &Name::cloopvalidateDispatcher;
this->enterDtc = &Name::cloopenterDtcDispatcher;
@ -8651,13 +8721,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopcommit_1Dispatcher(ITransaction* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCommitDispatcher(ITransaction* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::commit_1(&status2);
static_cast<Name*>(self)->Name::deprecatedCommit(&status2);
}
catch (...)
{
@ -8679,13 +8749,13 @@ namespace Firebird
}
}
static void CLOOP_CARG clooprollback_1Dispatcher(ITransaction* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedRollbackDispatcher(ITransaction* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::rollback_1(&status2);
static_cast<Name*>(self)->Name::deprecatedRollback(&status2);
}
catch (...)
{
@ -8707,13 +8777,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopdisconnect_1Dispatcher(ITransaction* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedDisconnectDispatcher(ITransaction* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::disconnect_1(&status2);
static_cast<Name*>(self)->Name::deprecatedDisconnect(&status2);
}
catch (...)
{
@ -8849,11 +8919,11 @@ namespace Firebird
virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0;
virtual void prepare(StatusType* status, unsigned msgLength, const unsigned char* message) = 0;
virtual void commit_1(StatusType* status) = 0;
virtual void deprecatedCommit(StatusType* status) = 0;
virtual void commitRetaining(StatusType* status) = 0;
virtual void rollback_1(StatusType* status) = 0;
virtual void deprecatedRollback(StatusType* status) = 0;
virtual void rollbackRetaining(StatusType* status) = 0;
virtual void disconnect_1(StatusType* status) = 0;
virtual void deprecatedDisconnect(StatusType* status) = 0;
virtual ITransaction* join(StatusType* status, ITransaction* transaction) = 0;
virtual ITransaction* validate(StatusType* status, IAttachment* attachment) = 0;
virtual ITransaction* enterDtc(StatusType* status) = 0;
@ -9525,7 +9595,7 @@ namespace Firebird
this->isEof = &Name::cloopisEofDispatcher;
this->isBof = &Name::cloopisBofDispatcher;
this->getMetadata = &Name::cloopgetMetadataDispatcher;
this->close_1 = &Name::cloopclose_1Dispatcher;
this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher;
this->setDelayedOutputFormat = &Name::cloopsetDelayedOutputFormatDispatcher;
this->close = &Name::cloopcloseDispatcher;
}
@ -9669,13 +9739,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopclose_1Dispatcher(IResultSet* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IResultSet* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::close_1(&status2);
static_cast<Name*>(self)->Name::deprecatedClose(&status2);
}
catch (...)
{
@ -9759,7 +9829,7 @@ namespace Firebird
virtual FB_BOOLEAN isEof(StatusType* status) = 0;
virtual FB_BOOLEAN isBof(StatusType* status) = 0;
virtual IMessageMetadata* getMetadata(StatusType* status) = 0;
virtual void close_1(StatusType* status) = 0;
virtual void deprecatedClose(StatusType* status) = 0;
virtual void setDelayedOutputFormat(StatusType* status, IMessageMetadata* format) = 0;
virtual void close(StatusType* status) = 0;
};
@ -9788,7 +9858,7 @@ namespace Firebird
this->execute = &Name::cloopexecuteDispatcher;
this->openCursor = &Name::cloopopenCursorDispatcher;
this->setCursorName = &Name::cloopsetCursorNameDispatcher;
this->free_1 = &Name::cloopfree_1Dispatcher;
this->deprecatedFree = &Name::cloopdeprecatedFreeDispatcher;
this->getFlags = &Name::cloopgetFlagsDispatcher;
this->getTimeout = &Name::cloopgetTimeoutDispatcher;
this->setTimeout = &Name::cloopsetTimeoutDispatcher;
@ -9933,13 +10003,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopfree_1Dispatcher(IStatement* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedFreeDispatcher(IStatement* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::free_1(&status2);
static_cast<Name*>(self)->Name::deprecatedFree(&status2);
}
catch (...)
{
@ -10068,7 +10138,7 @@ namespace Firebird
virtual ITransaction* execute(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0;
virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) = 0;
virtual void setCursorName(StatusType* status, const char* name) = 0;
virtual void free_1(StatusType* status) = 0;
virtual void deprecatedFree(StatusType* status) = 0;
virtual unsigned getFlags(StatusType* status) = 0;
virtual unsigned getTimeout(StatusType* status) = 0;
virtual void setTimeout(StatusType* status, unsigned timeOut) = 0;
@ -10101,7 +10171,7 @@ namespace Firebird
this->getBlobAlignment = &Name::cloopgetBlobAlignmentDispatcher;
this->getMetadata = &Name::cloopgetMetadataDispatcher;
this->setDefaultBpb = &Name::cloopsetDefaultBpbDispatcher;
this->close_1 = &Name::cloopclose_1Dispatcher;
this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher;
this->close = &Name::cloopcloseDispatcher;
}
} vTable;
@ -10252,13 +10322,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopclose_1Dispatcher(IBatch* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IBatch* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::close_1(&status2);
static_cast<Name*>(self)->Name::deprecatedClose(&status2);
}
catch (...)
{
@ -10329,7 +10399,7 @@ namespace Firebird
virtual unsigned getBlobAlignment(StatusType* status) = 0;
virtual IMessageMetadata* getMetadata(StatusType* status) = 0;
virtual void setDefaultBpb(StatusType* status, unsigned parLength, const unsigned char* par) = 0;
virtual void close_1(StatusType* status) = 0;
virtual void deprecatedClose(StatusType* status) = 0;
virtual void close(StatusType* status) = 0;
};
@ -10464,7 +10534,7 @@ namespace Firebird
this->addRef = &Name::cloopaddRefDispatcher;
this->release = &Name::cloopreleaseDispatcher;
this->process = &Name::cloopprocessDispatcher;
this->close_1 = &Name::cloopclose_1Dispatcher;
this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher;
this->close = &Name::cloopcloseDispatcher;
}
} vTable;
@ -10486,13 +10556,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopclose_1Dispatcher(IReplicator* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IReplicator* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::close_1(&status2);
static_cast<Name*>(self)->Name::deprecatedClose(&status2);
}
catch (...)
{
@ -10554,7 +10624,7 @@ namespace Firebird
}
virtual void process(StatusType* status, unsigned length, const unsigned char* data) = 0;
virtual void close_1(StatusType* status) = 0;
virtual void deprecatedClose(StatusType* status) = 0;
virtual void close(StatusType* status) = 0;
};
@ -10579,7 +10649,7 @@ namespace Firebird
this->start = &Name::cloopstartDispatcher;
this->startAndSend = &Name::cloopstartAndSendDispatcher;
this->unwind = &Name::cloopunwindDispatcher;
this->free_1 = &Name::cloopfree_1Dispatcher;
this->deprecatedFree = &Name::cloopdeprecatedFreeDispatcher;
this->free = &Name::cloopfreeDispatcher;
}
} vTable;
@ -10671,13 +10741,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopfree_1Dispatcher(IRequest* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedFreeDispatcher(IRequest* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::free_1(&status2);
static_cast<Name*>(self)->Name::deprecatedFree(&status2);
}
catch (...)
{
@ -10744,7 +10814,7 @@ namespace Firebird
virtual void start(StatusType* status, ITransaction* tra, int level) = 0;
virtual void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) = 0;
virtual void unwind(StatusType* status, int level) = 0;
virtual void free_1(StatusType* status) = 0;
virtual void deprecatedFree(StatusType* status) = 0;
virtual void free(StatusType* status) = 0;
};
@ -10763,7 +10833,7 @@ namespace Firebird
this->version = Base::VERSION;
this->addRef = &Name::cloopaddRefDispatcher;
this->release = &Name::cloopreleaseDispatcher;
this->cancel_1 = &Name::cloopcancel_1Dispatcher;
this->deprecatedCancel = &Name::cloopdeprecatedCancelDispatcher;
this->cancel = &Name::cloopcancelDispatcher;
}
} vTable;
@ -10771,13 +10841,13 @@ namespace Firebird
this->cloopVTable = &vTable;
}
static void CLOOP_CARG cloopcancel_1Dispatcher(IEvents* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedCancelDispatcher(IEvents* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::cancel_1(&status2);
static_cast<Name*>(self)->Name::deprecatedCancel(&status2);
}
catch (...)
{
@ -10838,7 +10908,7 @@ namespace Firebird
{
}
virtual void cancel_1(StatusType* status) = 0;
virtual void deprecatedCancel(StatusType* status) = 0;
virtual void cancel(StatusType* status) = 0;
};
@ -10873,8 +10943,8 @@ namespace Firebird
this->queEvents = &Name::cloopqueEventsDispatcher;
this->cancelOperation = &Name::cloopcancelOperationDispatcher;
this->ping = &Name::clooppingDispatcher;
this->detach_1 = &Name::cloopdetach_1Dispatcher;
this->dropDatabase_1 = &Name::cloopdropDatabase_1Dispatcher;
this->deprecatedDetach = &Name::cloopdeprecatedDetachDispatcher;
this->deprecatedDropDatabase = &Name::cloopdeprecatedDropDatabaseDispatcher;
this->getIdleTimeout = &Name::cloopgetIdleTimeoutDispatcher;
this->setIdleTimeout = &Name::cloopsetIdleTimeoutDispatcher;
this->getStatementTimeout = &Name::cloopgetStatementTimeoutDispatcher;
@ -11123,13 +11193,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopdetach_1Dispatcher(IAttachment* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedDetachDispatcher(IAttachment* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::detach_1(&status2);
static_cast<Name*>(self)->Name::deprecatedDetach(&status2);
}
catch (...)
{
@ -11137,13 +11207,13 @@ namespace Firebird
}
}
static void CLOOP_CARG cloopdropDatabase_1Dispatcher(IAttachment* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedDropDatabaseDispatcher(IAttachment* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::dropDatabase_1(&status2);
static_cast<Name*>(self)->Name::deprecatedDropDatabase(&status2);
}
catch (...)
{
@ -11322,8 +11392,8 @@ namespace Firebird
virtual IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) = 0;
virtual void cancelOperation(StatusType* status, int option) = 0;
virtual void ping(StatusType* status) = 0;
virtual void detach_1(StatusType* status) = 0;
virtual void dropDatabase_1(StatusType* status) = 0;
virtual void deprecatedDetach(StatusType* status) = 0;
virtual void deprecatedDropDatabase(StatusType* status) = 0;
virtual unsigned getIdleTimeout(StatusType* status) = 0;
virtual void setIdleTimeout(StatusType* status, unsigned timeOut) = 0;
virtual unsigned getStatementTimeout(StatusType* status) = 0;
@ -11349,7 +11419,7 @@ namespace Firebird
this->version = Base::VERSION;
this->addRef = &Name::cloopaddRefDispatcher;
this->release = &Name::cloopreleaseDispatcher;
this->detach_1 = &Name::cloopdetach_1Dispatcher;
this->deprecatedDetach = &Name::cloopdeprecatedDetachDispatcher;
this->query = &Name::cloopqueryDispatcher;
this->start = &Name::cloopstartDispatcher;
this->detach = &Name::cloopdetachDispatcher;
@ -11359,13 +11429,13 @@ namespace Firebird
this->cloopVTable = &vTable;
}
static void CLOOP_CARG cloopdetach_1Dispatcher(IService* self, IStatus* status) throw()
static void CLOOP_CARG cloopdeprecatedDetachDispatcher(IService* self, IStatus* status) throw()
{
StatusType status2(status);
try
{
static_cast<Name*>(self)->Name::detach_1(&status2);
static_cast<Name*>(self)->Name::deprecatedDetach(&status2);
}
catch (...)
{
@ -11454,7 +11524,7 @@ namespace Firebird
{
}
virtual void detach_1(StatusType* status) = 0;
virtual void deprecatedDetach(StatusType* status) = 0;
virtual void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) = 0;
virtual void start(StatusType* status, unsigned spbLength, const unsigned char* spb) = 0;
virtual void detach(StatusType* status) = 0;

View File

@ -106,6 +106,9 @@ inline const intptr_t* stubError()
} // namespace Firebird
#ifndef FB_UsedInYValve
#define FB_UsedInYValve false
#endif
#include "IdlFbInterfaces.h"

File diff suppressed because it is too large Load Diff

View File

@ -9249,6 +9249,10 @@ static processing_state process_statement(const TEXT* str2)
}
curs->close(fbStatus);
if (ISQL_errmsg(fbStatus))
{
return ps_ERR;
}
}
// Avoid cancel during cleanup

View File

@ -63,8 +63,8 @@ public:
void cancel(Firebird::CheckStatusWrapper* status) override;
void close(Firebird::CheckStatusWrapper* status) override;
int seek(Firebird::CheckStatusWrapper* status, int mode, int offset) override; // returns position
void cancel_1(Firebird::CheckStatusWrapper* status) override;
void close_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedCancel(Firebird::CheckStatusWrapper* status) override;
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
public:
JBlob(blb* handle, StableAttachmentPart* sa);
@ -110,9 +110,9 @@ public:
Firebird::ITransaction* join(Firebird::CheckStatusWrapper* status, Firebird::ITransaction* transaction) override;
JTransaction* validate(Firebird::CheckStatusWrapper* status, Firebird::IAttachment* testAtt) override;
JTransaction* enterDtc(Firebird::CheckStatusWrapper* status) override;
void commit_1(Firebird::CheckStatusWrapper* status) override;
void rollback_1(Firebird::CheckStatusWrapper* status) override;
void disconnect_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedCommit(Firebird::CheckStatusWrapper* status) override;
void deprecatedRollback(Firebird::CheckStatusWrapper* status) override;
void deprecatedDisconnect(Firebird::CheckStatusWrapper* status) override;
public:
JTransaction(jrd_tra* handle, StableAttachmentPart* sa);
@ -163,7 +163,7 @@ public:
FB_BOOLEAN isBof(Firebird::CheckStatusWrapper* status) override;
Firebird::IMessageMetadata* getMetadata(Firebird::CheckStatusWrapper* status) override;
void close(Firebird::CheckStatusWrapper* status) override;
void close_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
void setDelayedOutputFormat(Firebird::CheckStatusWrapper* status, Firebird::IMessageMetadata* format) override;
public:
@ -208,7 +208,7 @@ public:
Firebird::IMessageMetadata* getMetadata(Firebird::CheckStatusWrapper* status) override;
void setDefaultBpb(Firebird::CheckStatusWrapper* status, unsigned parLength, const unsigned char* par) override;
void close(Firebird::CheckStatusWrapper* status) override;
void close_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
public:
JBatch(DsqlBatch* handle, JStatement* aStatement, Firebird::IMessageMetadata* aMetadata);
@ -241,7 +241,7 @@ public:
int release() override;
void process(Firebird::CheckStatusWrapper* status, unsigned length, const unsigned char* data) override;
void close(Firebird::CheckStatusWrapper* status) override;
void close_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
public:
JReplicator(Applier* appl, StableAttachmentPart* sa);
@ -278,7 +278,7 @@ public:
unsigned int itemsLength, const unsigned char* items,
unsigned int bufferLength, unsigned char* buffer) override;
void free(Firebird::CheckStatusWrapper* status) override;
void free_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedFree(Firebird::CheckStatusWrapper* status) override;
ISC_UINT64 getAffectedRecords(Firebird::CheckStatusWrapper* userStatus) override;
Firebird::IMessageMetadata* getOutputMetadata(Firebird::CheckStatusWrapper* userStatus) override;
Firebird::IMessageMetadata* getInputMetadata(Firebird::CheckStatusWrapper* userStatus) override;
@ -337,7 +337,7 @@ public:
unsigned int msg_type, unsigned int length, const void* message) override;
void unwind(Firebird::CheckStatusWrapper* status, int level) override;
void free(Firebird::CheckStatusWrapper* status) override;
void free_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedFree(Firebird::CheckStatusWrapper* status) override;
public:
JRequest(JrdStatement* handle, StableAttachmentPart* sa);
@ -365,7 +365,7 @@ public:
// IEvents implementation
int release() override;
void cancel(Firebird::CheckStatusWrapper* status) override;
void cancel_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedCancel(Firebird::CheckStatusWrapper* status) override;
public:
JEvents(int aId, StableAttachmentPart* sa, Firebird::IEventCallback* aCallback);
@ -439,8 +439,8 @@ public:
void ping(Firebird::CheckStatusWrapper* status) override;
void detach(Firebird::CheckStatusWrapper* status) override;
void dropDatabase(Firebird::CheckStatusWrapper* status) override;
void detach_1(Firebird::CheckStatusWrapper* status) override;
void dropDatabase_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedDetach(Firebird::CheckStatusWrapper* status) override;
void deprecatedDropDatabase(Firebird::CheckStatusWrapper* status) override;
unsigned int getIdleTimeout(Firebird::CheckStatusWrapper* status) override;
void setIdleTimeout(Firebird::CheckStatusWrapper* status, unsigned int timeOut) override;
@ -490,7 +490,7 @@ public:
// IService implementation
int release() override;
void detach(Firebird::CheckStatusWrapper* status) override;
void detach_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedDetach(Firebird::CheckStatusWrapper* status) override;
void query(Firebird::CheckStatusWrapper* status,
unsigned int sendLength, const unsigned char* sendItems,
unsigned int receiveLength, const unsigned char* receiveItems,

View File

@ -2318,7 +2318,7 @@ void JBlob::getInfo(CheckStatusWrapper* user_status,
}
void JBlob::cancel_1(CheckStatusWrapper* user_status)
void JBlob::deprecatedCancel(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -2380,7 +2380,7 @@ void JBlob::freeEngineData(CheckStatusWrapper* user_status)
}
void JEvents::cancel_1(CheckStatusWrapper* user_status)
void JEvents::deprecatedCancel(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -2486,13 +2486,13 @@ void JAttachment::cancelOperation(CheckStatusWrapper* user_status, int option)
void JBlob::close(CheckStatusWrapper* user_status)
{
close_1(user_status);
deprecatedClose(user_status);
if (user_status->isEmpty())
release();
}
void JBlob::close_1(CheckStatusWrapper* user_status)
void JBlob::deprecatedClose(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -2533,13 +2533,13 @@ void JBlob::close_1(CheckStatusWrapper* user_status)
void JTransaction::commit(CheckStatusWrapper* user_status)
{
commit_1(user_status);
deprecatedCommit(user_status);
if (user_status->isEmpty())
release();
}
void JTransaction::commit_1(CheckStatusWrapper* user_status)
void JTransaction::deprecatedCommit(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -3249,7 +3249,7 @@ void JAttachment::executeDyn(CheckStatusWrapper* status, ITransaction* /*tra*/,
}
void JAttachment::detach_1(CheckStatusWrapper* user_status)
void JAttachment::deprecatedDetach(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -3280,7 +3280,7 @@ void JAttachment::detach(CheckStatusWrapper* user_status)
* Close down a database.
*
**************************************/
detach_1(user_status);
deprecatedDetach(user_status);
if (user_status->isEmpty())
release();
}
@ -3362,13 +3362,13 @@ void JAttachment::freeEngineData(CheckStatusWrapper* user_status, bool forceFree
void JAttachment::dropDatabase(CheckStatusWrapper* user_status)
{
dropDatabase_1(user_status);
deprecatedDropDatabase(user_status);
if (user_status->isEmpty())
release();
}
void JAttachment::dropDatabase_1(CheckStatusWrapper* user_status)
void JAttachment::deprecatedDropDatabase(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -3941,7 +3941,7 @@ JTransaction* JAttachment::reconnectTransaction(CheckStatusWrapper* user_status,
}
void JRequest::free_1(CheckStatusWrapper* user_status)
void JRequest::deprecatedFree(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -4082,13 +4082,13 @@ void JTransaction::rollbackRetaining(CheckStatusWrapper* user_status)
void JTransaction::rollback(CheckStatusWrapper* user_status)
{
rollback_1(user_status);
deprecatedRollback(user_status);
if (user_status->isEmpty())
release();
}
void JTransaction::rollback_1(CheckStatusWrapper* user_status)
void JTransaction::deprecatedRollback(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -4128,13 +4128,13 @@ void JTransaction::rollback_1(CheckStatusWrapper* user_status)
void JTransaction::disconnect(CheckStatusWrapper* user_status)
{
disconnect_1(user_status);
deprecatedDisconnect(user_status);
if (user_status->isEmpty())
release();
}
void JTransaction::disconnect_1(CheckStatusWrapper* user_status)
void JTransaction::deprecatedDisconnect(CheckStatusWrapper* user_status)
{
try
{
@ -4269,7 +4269,7 @@ JService* JProvider::attachServiceManager(CheckStatusWrapper* user_status, const
}
void JService::detach_1(CheckStatusWrapper* user_status)
void JService::deprecatedDetach(CheckStatusWrapper* user_status)
{
/**************************************
*
@ -5471,7 +5471,7 @@ IMessageMetadata* JResultSet::getMetadata(CheckStatusWrapper* user_status)
}
void JResultSet::close_1(CheckStatusWrapper* user_status)
void JResultSet::deprecatedClose(CheckStatusWrapper* user_status)
{
freeEngineData(user_status);
}
@ -5513,7 +5513,7 @@ void JStatement::freeEngineData(CheckStatusWrapper* user_status)
}
void JStatement::free_1(CheckStatusWrapper* user_status)
void JStatement::deprecatedFree(CheckStatusWrapper* user_status)
{
freeEngineData(user_status);
}
@ -6005,7 +6005,7 @@ int JBatch::release()
}
void JBatch::close_1(CheckStatusWrapper* user_status)
void JBatch::deprecatedClose(CheckStatusWrapper* user_status)
{
freeEngineData(user_status);
}
@ -6419,7 +6419,7 @@ void JReplicator::process(CheckStatusWrapper* status, unsigned length, const UCH
}
void JReplicator::close_1(CheckStatusWrapper* user_status)
void JReplicator::deprecatedClose(CheckStatusWrapper* user_status)
{
freeEngineData(user_status);
}

View File

@ -41,3 +41,24 @@ begin
status.setErrors(@statusVector);
end
end;
class procedure FbException.setVersionError(status: IStatus; interfaceName: string;
currentVersion, expectedVersion: NativeInt);
var
statusVector: array[0..8] of NativeIntPtr;
msg: AnsiString;
begin
msg := interfaceName;
statusVector[0] := NativeIntPtr(isc_arg_gds);
statusVector[1] := NativeIntPtr(isc_interface_version_too_old);
statusVector[2] := NativeIntPtr(isc_arg_number);
statusVector[3] := NativeIntPtr(expectedVersion);
statusVector[4] := NativeIntPtr(isc_arg_number);
statusVector[5] := NativeIntPtr(currentVersion);
statusVector[6] := NativeIntPtr(isc_arg_string);
statusVector[7] := NativeIntPtr(PAnsiChar(msg));
statusVector[8] := NativeIntPtr(isc_arg_end);
status.setErrors(@statusVector);
end;

View File

@ -7,6 +7,8 @@
class procedure checkException(status: IStatus);
class procedure catchException(status: IStatus; e: Exception);
class procedure setVersionError(status: IStatus; interfaceName: string;
currentVersion, expectedVersion: NativeInt);
private
status: IStatus;

View File

@ -1,3 +1,4 @@
function fb_get_master_interface : IMaster; cdecl; external 'fbclient';
const
FB_UsedInYValve = FALSE;

View File

@ -173,8 +173,8 @@ public:
void cancel(CheckStatusWrapper* status) override;
void close(CheckStatusWrapper* status) override;
int seek(CheckStatusWrapper* status, int mode, int offset) override; // returns position
void cancel_1(Firebird::CheckStatusWrapper* status) override;
void close_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedCancel(Firebird::CheckStatusWrapper* status) override;
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
public:
explicit Blob(Rbl* handle)
@ -225,9 +225,9 @@ public:
ITransaction* join(CheckStatusWrapper* status, ITransaction* tra) override;
Transaction* validate(CheckStatusWrapper* status, IAttachment* attachment) override;
Transaction* enterDtc(CheckStatusWrapper* status) override;
void commit_1(Firebird::CheckStatusWrapper* status) override;
void rollback_1(Firebird::CheckStatusWrapper* status) override;
void disconnect_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedCommit(Firebird::CheckStatusWrapper* status) override;
void deprecatedRollback(Firebird::CheckStatusWrapper* status) override;
void deprecatedDisconnect(Firebird::CheckStatusWrapper* status) override;
public:
Transaction(Rtr* handle, Attachment* a)
@ -290,7 +290,7 @@ public:
FB_BOOLEAN isBof(CheckStatusWrapper* status) override;
IMessageMetadata* getMetadata(CheckStatusWrapper* status) override;
void close(CheckStatusWrapper* status) override;
void close_1(CheckStatusWrapper* status) override;
void deprecatedClose(CheckStatusWrapper* status) override;
void setDelayedOutputFormat(CheckStatusWrapper* status, IMessageMetadata* format) override;
ResultSet(Statement* s, IMessageMetadata* outFmt)
@ -348,7 +348,7 @@ public:
void setDefaultBpb(Firebird::CheckStatusWrapper* status, unsigned parLength, const unsigned char* par) override;
Firebird::IMessageMetadata* getMetadata(Firebird::CheckStatusWrapper* status) override;
void close(Firebird::CheckStatusWrapper* status) override;
void close_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
private:
void freeClientData(CheckStatusWrapper* status, bool force = false);
@ -572,7 +572,7 @@ public:
int release() override;
void process(CheckStatusWrapper* status, unsigned length, const unsigned char* data) override;
void close(CheckStatusWrapper* status) override;
void close_1(CheckStatusWrapper* status) override;
void deprecatedClose(CheckStatusWrapper* status) override;
explicit Replicator(Attachment* att) : attachment(att)
{}
@ -620,7 +620,7 @@ public:
unsigned int flags) override;
void setCursorName(CheckStatusWrapper* status, const char* name) override;
void free(CheckStatusWrapper* status) override;
void free_1(CheckStatusWrapper* status) override;
void deprecatedFree(CheckStatusWrapper* status) override;
unsigned getFlags(CheckStatusWrapper* status) override;
unsigned int getTimeout(CheckStatusWrapper* status) override
@ -721,7 +721,7 @@ public:
unsigned int length, const void* message) override;
void unwind(CheckStatusWrapper* status, int level) override;
void free(CheckStatusWrapper* status) override;
void free_1(CheckStatusWrapper* status) override;
void deprecatedFree(CheckStatusWrapper* status) override;
public:
Request(Rrq* handle, Attachment* a)
@ -759,7 +759,7 @@ public:
// IEvents implementation
int release() override;
void cancel(CheckStatusWrapper* status) override;
void cancel_1(CheckStatusWrapper* status) override;
void deprecatedCancel(CheckStatusWrapper* status) override;
public:
Events(Rvnt* handle)
@ -841,8 +841,8 @@ public:
void ping(CheckStatusWrapper* status) override;
void detach(CheckStatusWrapper* status) override;
void dropDatabase(CheckStatusWrapper* status) override;
void detach_1(Firebird::CheckStatusWrapper* status) override;
void dropDatabase_1(Firebird::CheckStatusWrapper* status) override;
void deprecatedDetach(Firebird::CheckStatusWrapper* status) override;
void deprecatedDropDatabase(Firebird::CheckStatusWrapper* status) override;
unsigned int getIdleTimeout(CheckStatusWrapper* status) override;
void setIdleTimeout(CheckStatusWrapper* status, unsigned int timeOut) override;
@ -907,7 +907,7 @@ public:
// IService implementation
int release() override;
void detach(CheckStatusWrapper* status) override;
void detach_1(CheckStatusWrapper* status) override;
void deprecatedDetach(CheckStatusWrapper* status) override;
void query(CheckStatusWrapper* status,
unsigned int sendLength, const unsigned char* sendItems,
unsigned int receiveLength, const unsigned char* receiveItems,
@ -1288,7 +1288,7 @@ void Blob::freeClientData(CheckStatusWrapper* status, bool force)
}
void Blob::cancel_1(CheckStatusWrapper* status)
void Blob::deprecatedCancel(CheckStatusWrapper* status)
{
/**************************************
*
@ -1307,13 +1307,13 @@ void Blob::cancel_1(CheckStatusWrapper* status)
void Blob::cancel(CheckStatusWrapper* status)
{
cancel_1(status);
deprecatedCancel(status);
if (status->isEmpty())
release();
}
void Blob::close_1(CheckStatusWrapper* status)
void Blob::deprecatedClose(CheckStatusWrapper* status)
{
/**************************************
*
@ -1354,7 +1354,7 @@ void Blob::close_1(CheckStatusWrapper* status)
void Blob::close(CheckStatusWrapper* status)
{
close_1(status);
deprecatedClose(status);
if (status->isEmpty())
release();
}
@ -1442,7 +1442,7 @@ void Events::freeClientData(CheckStatusWrapper* status, bool force)
}
void Events::cancel_1(CheckStatusWrapper* status)
void Events::deprecatedCancel(CheckStatusWrapper* status)
{
/**************************************
*
@ -1461,13 +1461,13 @@ void Events::cancel_1(CheckStatusWrapper* status)
void Events::cancel(CheckStatusWrapper* status)
{
cancel_1(status);
deprecatedCancel(status);
if (status->isEmpty())
release();
}
void Transaction::commit_1(CheckStatusWrapper* status)
void Transaction::deprecatedCommit(CheckStatusWrapper* status)
{
/**************************************
*
@ -1504,7 +1504,7 @@ void Transaction::commit_1(CheckStatusWrapper* status)
void Transaction::commit(CheckStatusWrapper* status)
{
commit_1(status);
deprecatedCommit(status);
if (status->isEmpty())
release();
}
@ -2029,7 +2029,7 @@ void Attachment::freeClientData(CheckStatusWrapper* status, bool force)
}
void Attachment::detach_1(CheckStatusWrapper* status)
void Attachment::deprecatedDetach(CheckStatusWrapper* status)
{
/**************************************
*
@ -2048,13 +2048,13 @@ void Attachment::detach_1(CheckStatusWrapper* status)
void Attachment::detach(CheckStatusWrapper* status)
{
detach_1(status);
deprecatedDetach(status);
if (status->isEmpty())
release();
}
void Attachment::dropDatabase_1(CheckStatusWrapper* status)
void Attachment::deprecatedDropDatabase(CheckStatusWrapper* status)
{
/**************************************
*
@ -2114,7 +2114,7 @@ void Attachment::dropDatabase_1(CheckStatusWrapper* status)
void Attachment::dropDatabase(CheckStatusWrapper* status)
{
dropDatabase_1(status);
deprecatedDropDatabase(status);
if (status->isEmpty())
release();
}
@ -2943,9 +2943,9 @@ void Batch::close(CheckStatusWrapper* status)
}
void Batch::close_1(CheckStatusWrapper* status)
void Batch::deprecatedClose(CheckStatusWrapper* status)
{
close_1(status);
deprecatedClose(status);
if (status->isEmpty())
release();
}
@ -3042,9 +3042,9 @@ void Replicator::close(CheckStatusWrapper* status)
}
void Replicator::close_1(CheckStatusWrapper* status)
void Replicator::deprecatedClose(CheckStatusWrapper* status)
{
close_1(status);
deprecatedClose(status);
if (status->isEmpty())
release();
}
@ -3700,7 +3700,7 @@ void Statement::freeClientData(CheckStatusWrapper* status, bool force)
}
void Statement::free_1(CheckStatusWrapper* status)
void Statement::deprecatedFree(CheckStatusWrapper* status)
{
/**************************************
*
@ -3720,7 +3720,7 @@ void Statement::free_1(CheckStatusWrapper* status)
void Statement::free(CheckStatusWrapper* status)
{
free_1(status);
deprecatedFree(status);
if (status->isEmpty())
release();
}
@ -4713,7 +4713,7 @@ void ResultSet::freeClientData(CheckStatusWrapper* status, bool force)
}
void ResultSet::close_1(CheckStatusWrapper* status)
void ResultSet::deprecatedClose(CheckStatusWrapper* status)
{
/**************************************
*
@ -4744,7 +4744,7 @@ void ResultSet::close(CheckStatusWrapper* status)
*
**************************************/
close_1(status);
deprecatedClose(status);
if (status->isEmpty())
release();
}
@ -5633,7 +5633,7 @@ void Request::freeClientData(CheckStatusWrapper* status, bool force)
}
void Request::free_1(CheckStatusWrapper* status)
void Request::deprecatedFree(CheckStatusWrapper* status)
{
/**************************************
*
@ -5652,7 +5652,7 @@ void Request::free_1(CheckStatusWrapper* status)
void Request::free(CheckStatusWrapper* status)
{
free_1(status);
deprecatedFree(status);
if (status->isEmpty())
release();
}
@ -5825,7 +5825,7 @@ void Transaction::freeClientData(CheckStatusWrapper* status, bool force)
}
void Transaction::rollback_1(CheckStatusWrapper* status)
void Transaction::deprecatedRollback(CheckStatusWrapper* status)
{
/**************************************
*
@ -5844,13 +5844,13 @@ void Transaction::rollback_1(CheckStatusWrapper* status)
void Transaction::rollback(CheckStatusWrapper* status)
{
rollback_1(status);
deprecatedRollback(status);
if (status->isEmpty())
release();
}
void Transaction::disconnect_1(CheckStatusWrapper* status)
void Transaction::deprecatedDisconnect(CheckStatusWrapper* status)
{
try
{
@ -5872,7 +5872,7 @@ void Transaction::disconnect_1(CheckStatusWrapper* status)
void Transaction::disconnect(CheckStatusWrapper* status)
{
disconnect_1(status);
deprecatedDisconnect(status);
if (status->isEmpty())
release();
}
@ -6130,7 +6130,7 @@ void Service::freeClientData(CheckStatusWrapper* status, bool force)
}
void Service::detach_1(CheckStatusWrapper* status)
void Service::deprecatedDetach(CheckStatusWrapper* status)
{
/**************************************
*
@ -6149,7 +6149,7 @@ void Service::detach_1(CheckStatusWrapper* status)
void Service::detach(CheckStatusWrapper* status)
{
detach_1(status);
deprecatedDetach(status);
if (status->isEmpty())
release();
}

View File

@ -61,9 +61,9 @@ public:
DTransaction* join(CheckStatusWrapper* status, ITransaction* transaction);
ITransaction* validate(CheckStatusWrapper* status, IAttachment* attachment);
DTransaction* enterDtc(CheckStatusWrapper* status);
void commit_1(CheckStatusWrapper* status);
void rollback_1(CheckStatusWrapper* status);
void disconnect_1(CheckStatusWrapper* status);
void deprecatedCommit(CheckStatusWrapper* status);
void deprecatedRollback(CheckStatusWrapper* status);
void deprecatedDisconnect(CheckStatusWrapper* status);
private:
typedef HalfStaticArray<ITransaction*, 8> SubArray;
@ -390,17 +390,17 @@ void DTransaction::disconnect(CheckStatusWrapper* status)
}
}
void DTransaction::commit_1(CheckStatusWrapper* status)
void DTransaction::deprecatedCommit(CheckStatusWrapper* status)
{
commit(status);
}
void DTransaction::rollback_1(CheckStatusWrapper* status)
void DTransaction::deprecatedRollback(CheckStatusWrapper* status)
{
rollback(status);
}
void DTransaction::disconnect_1(CheckStatusWrapper* status)
void DTransaction::deprecatedDisconnect(CheckStatusWrapper* status)
{
disconnect(status);
}

View File

@ -217,7 +217,7 @@ public:
// IEvents implementation
void cancel(Firebird::CheckStatusWrapper* status);
void cancel_1(Firebird::CheckStatusWrapper* status);
void deprecatedCancel(Firebird::CheckStatusWrapper* status);
public:
AtomicAttPtr attachment;
@ -250,7 +250,7 @@ public:
unsigned int msgType, unsigned int length, const void* message);
void unwind(Firebird::CheckStatusWrapper* status, int level);
void free(Firebird::CheckStatusWrapper* status);
void free_1(Firebird::CheckStatusWrapper* status);
void deprecatedFree(Firebird::CheckStatusWrapper* status);
public:
AtomicAttPtr attachment;
@ -281,9 +281,9 @@ public:
Firebird::ITransaction* join(Firebird::CheckStatusWrapper* status, Firebird::ITransaction* transaction);
Firebird::ITransaction* validate(Firebird::CheckStatusWrapper* status, Firebird::IAttachment* testAtt);
YTransaction* enterDtc(Firebird::CheckStatusWrapper* status);
void commit_1(Firebird::CheckStatusWrapper* status);
void rollback_1(Firebird::CheckStatusWrapper* status);
void disconnect_1(Firebird::CheckStatusWrapper* status);
void deprecatedCommit(Firebird::CheckStatusWrapper* status);
void deprecatedRollback(Firebird::CheckStatusWrapper* status);
void deprecatedDisconnect(Firebird::CheckStatusWrapper* status);
void addCleanupHandler(Firebird::CheckStatusWrapper* status, CleanupCallback* callback);
void selfCheck();
@ -333,8 +333,8 @@ public:
void cancel(Firebird::CheckStatusWrapper* status);
void close(Firebird::CheckStatusWrapper* status);
int seek(Firebird::CheckStatusWrapper* status, int mode, int offset);
void cancel_1(Firebird::CheckStatusWrapper* status);
void close_1(Firebird::CheckStatusWrapper* status);
void deprecatedCancel(Firebird::CheckStatusWrapper* status);
void deprecatedClose(Firebird::CheckStatusWrapper* status);
public:
AtomicAttPtr attachment;
@ -364,7 +364,7 @@ public:
FB_BOOLEAN isBof(Firebird::CheckStatusWrapper* status);
Firebird::IMessageMetadata* getMetadata(Firebird::CheckStatusWrapper* status);
void close(Firebird::CheckStatusWrapper* status);
void close_1(Firebird::CheckStatusWrapper* status);
void deprecatedClose(Firebird::CheckStatusWrapper* status);
void setDelayedOutputFormat(Firebird::CheckStatusWrapper* status, Firebird::IMessageMetadata* format);
public:
@ -396,7 +396,7 @@ public:
void cancel(Firebird::CheckStatusWrapper* status);
void setDefaultBpb(Firebird::CheckStatusWrapper* status, unsigned parLength, const unsigned char* par);
void close(Firebird::CheckStatusWrapper* status);
void close_1(Firebird::CheckStatusWrapper* status);
void deprecatedClose(Firebird::CheckStatusWrapper* status);
public:
AtomicAttPtr attachment;
@ -416,7 +416,7 @@ public:
// IReplicator implementation
void process(Firebird::CheckStatusWrapper* status, unsigned length, const unsigned char* data);
void close(Firebird::CheckStatusWrapper* status);
void close_1(Firebird::CheckStatusWrapper* status);
void deprecatedClose(Firebird::CheckStatusWrapper* status);
public:
AtomicAttPtr attachment;
@ -465,7 +465,7 @@ public:
unsigned int flags);
void setCursorName(Firebird::CheckStatusWrapper* status, const char* name);
void free(Firebird::CheckStatusWrapper* status);
void free_1(Firebird::CheckStatusWrapper* status);
void deprecatedFree(Firebird::CheckStatusWrapper* status);
unsigned getFlags(Firebird::CheckStatusWrapper* status);
unsigned int getTimeout(Firebird::CheckStatusWrapper* status);
@ -555,8 +555,8 @@ public:
void ping(Firebird::CheckStatusWrapper* status);
void detach(Firebird::CheckStatusWrapper* status);
void dropDatabase(Firebird::CheckStatusWrapper* status);
void detach_1(Firebird::CheckStatusWrapper* status);
void dropDatabase_1(Firebird::CheckStatusWrapper* status);
void deprecatedDetach(Firebird::CheckStatusWrapper* status);
void deprecatedDropDatabase(Firebird::CheckStatusWrapper* status);
void addCleanupHandler(Firebird::CheckStatusWrapper* status, CleanupCallback* callback);
YTransaction* getTransaction(Firebird::ITransaction* tra);
@ -604,7 +604,7 @@ public:
// IService implementation
void detach(Firebird::CheckStatusWrapper* status);
void detach_1(Firebird::CheckStatusWrapper* status);
void deprecatedDetach(Firebird::CheckStatusWrapper* status);
void query(Firebird::CheckStatusWrapper* status,
unsigned int sendLength, const unsigned char* sendItems,
unsigned int receiveLength, const unsigned char* receiveItems,

View File

@ -28,7 +28,10 @@
*/
#include "firebird.h"
#define FB_UsedInYValve true
#include "firebird/Interface.h"
#include "memory_routines.h"
#include "gen/iberror.h"
#include "gen/msg_facs.h"
@ -1335,7 +1338,7 @@ namespace Why
if (!(status->getState() & IStatus::STATE_ERRORS))
y->destroy(Y::DF_RELEASE | Y::DF_KEEP_NEXT);
else if (status->getErrors()[1] == isc_wish_list)
else if (status->getErrors()[1] == isc_interface_version_too_old)
{
status->init();
if (entry.next())
@ -3918,7 +3921,7 @@ void YEvents::cancel(CheckStatusWrapper* status)
entry.next()->cancel(status);
if (status->getErrors()[1] == isc_att_shutdown)
status->init();
}, [&]{entry.next()->cancel_1(status);});
}, [&]{entry.next()->deprecatedCancel(status);});
}
catch (const Exception& e)
{
@ -3926,7 +3929,7 @@ void YEvents::cancel(CheckStatusWrapper* status)
}
}
void YEvents::cancel_1(CheckStatusWrapper* status)
void YEvents::deprecatedCancel(CheckStatusWrapper* status)
{
cancel(status);
}
@ -4061,7 +4064,7 @@ void YRequest::free(CheckStatusWrapper* status)
{
YEntry<YRequest> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->free(status);}, [&]{entry.next()->free_1(status);});
done(status, entry, this, [&]{entry.next()->free(status);}, [&]{entry.next()->deprecatedFree(status);});
}
catch (const Exception& e)
{
@ -4069,7 +4072,7 @@ void YRequest::free(CheckStatusWrapper* status)
}
}
void YRequest::free_1(CheckStatusWrapper* status)
void YRequest::deprecatedFree(CheckStatusWrapper* status)
{
free(status);
}
@ -4157,7 +4160,7 @@ void YBlob::cancel(CheckStatusWrapper* status)
{
YEntry<YBlob> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->cancel(status);}, [&]{entry.next()->cancel_1(status);});
done(status, entry, this, [&]{entry.next()->cancel(status);}, [&]{entry.next()->deprecatedCancel(status);});
}
catch (const Exception& e)
{
@ -4165,7 +4168,7 @@ void YBlob::cancel(CheckStatusWrapper* status)
}
}
void YBlob::cancel_1(CheckStatusWrapper* status)
void YBlob::deprecatedCancel(CheckStatusWrapper* status)
{
cancel(status);
}
@ -4176,7 +4179,7 @@ void YBlob::close(CheckStatusWrapper* status)
{
YEntry<YBlob> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->close_1(status);});
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->deprecatedClose(status);});
}
catch (const Exception& e)
{
@ -4184,7 +4187,7 @@ void YBlob::close(CheckStatusWrapper* status)
}
}
void YBlob::close_1(CheckStatusWrapper* status)
void YBlob::deprecatedClose(CheckStatusWrapper* status)
{
close(status);
}
@ -4456,7 +4459,7 @@ void YStatement::free(CheckStatusWrapper* status)
{
YEntry<YStatement> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->free(status);}, [&]{entry.next()->free_1(status);});
done(status, entry, this, [&]{entry.next()->free(status);}, [&]{entry.next()->deprecatedFree(status);});
}
catch (const Exception& e)
{
@ -4464,7 +4467,7 @@ void YStatement::free(CheckStatusWrapper* status)
}
}
void YStatement::free_1(CheckStatusWrapper* status)
void YStatement::deprecatedFree(CheckStatusWrapper* status)
{
free(status);
}
@ -4874,7 +4877,7 @@ void YResultSet::close(CheckStatusWrapper* status)
{
YEntry<YResultSet> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->close_1(status);});
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->deprecatedClose(status);});
}
catch (const Exception& e)
{
@ -4882,7 +4885,7 @@ void YResultSet::close(CheckStatusWrapper* status)
}
}
void YResultSet::close_1(CheckStatusWrapper* status)
void YResultSet::deprecatedClose(CheckStatusWrapper* status)
{
close(status);
}
@ -5066,7 +5069,7 @@ void YBatch::close(CheckStatusWrapper* status)
{
YEntry<YBatch> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->close_1(status);});
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->deprecatedClose(status);});
}
catch (const Exception& e)
{
@ -5075,7 +5078,7 @@ void YBatch::close(CheckStatusWrapper* status)
}
void YBatch::close_1(CheckStatusWrapper* status)
void YBatch::deprecatedClose(CheckStatusWrapper* status)
{
close(status);
}
@ -5116,7 +5119,7 @@ void YReplicator::close(CheckStatusWrapper* status)
{
YEntry<YReplicator> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->close_1(status);});
done(status, entry, this, [&]{entry.next()->close(status);}, [&]{entry.next()->deprecatedClose(status);});
}
catch (const Exception& e)
{
@ -5125,7 +5128,7 @@ void YReplicator::close(CheckStatusWrapper* status)
}
void YReplicator::close_1(CheckStatusWrapper* status)
void YReplicator::deprecatedClose(CheckStatusWrapper* status)
{
close(status);
}
@ -5222,7 +5225,7 @@ void YTransaction::commit(CheckStatusWrapper* status)
{
YEntry<YTransaction> entry(status, this);
done(status, entry, this, [&]{entry.next()->commit(status);}, [&]{entry.next()->commit_1(status);});
done(status, entry, this, [&]{entry.next()->commit(status);}, [&]{entry.next()->deprecatedCommit(status);});
}
catch (const Exception& e)
{
@ -5254,7 +5257,7 @@ void YTransaction::rollback(CheckStatusWrapper* status)
entry.next()->rollback(status);
if (isNetworkError(status))
status->init();
}, [&]{entry.next()->rollback_1(status);});
}, [&]{entry.next()->deprecatedRollback(status);});
}
catch (const Exception& e)
{
@ -5305,17 +5308,17 @@ void YTransaction::disconnect(CheckStatusWrapper* status)
}
}
void YTransaction::commit_1(CheckStatusWrapper* status)
void YTransaction::deprecatedCommit(CheckStatusWrapper* status)
{
commit(status);
}
void YTransaction::rollback_1(CheckStatusWrapper* status)
void YTransaction::deprecatedRollback(CheckStatusWrapper* status)
{
rollback(status);
}
void YTransaction::disconnect_1(CheckStatusWrapper* status)
void YTransaction::deprecatedDisconnect(CheckStatusWrapper* status)
{
disconnect(status);
}
@ -5915,7 +5918,7 @@ void YAttachment::detach(CheckStatusWrapper* status)
entry.next()->detach(status);
if (isNetworkError(status))
status->init();
}, [&]{entry.next()->detach_1(status);});
}, [&]{entry.next()->deprecatedDetach(status);});
}
catch (const Exception& e)
{
@ -5923,7 +5926,7 @@ void YAttachment::detach(CheckStatusWrapper* status)
}
}
void YAttachment::detach_1(CheckStatusWrapper* status)
void YAttachment::deprecatedDetach(CheckStatusWrapper* status)
{
detach(status);
}
@ -5934,7 +5937,7 @@ void YAttachment::dropDatabase(CheckStatusWrapper* status)
{
YEntry<YAttachment> entry(status, this);
done(status, entry, this, [&]{entry.next()->dropDatabase(status);}, [&]{entry.next()->dropDatabase_1(status);});
done(status, entry, this, [&]{entry.next()->dropDatabase(status);}, [&]{entry.next()->deprecatedDropDatabase(status);});
}
catch (const Exception& e)
{
@ -5942,7 +5945,7 @@ void YAttachment::dropDatabase(CheckStatusWrapper* status)
}
}
void YAttachment::dropDatabase_1(CheckStatusWrapper* status)
void YAttachment::deprecatedDropDatabase(CheckStatusWrapper* status)
{
dropDatabase(status);
}
@ -6153,7 +6156,7 @@ void YService::detach(CheckStatusWrapper* status)
{
YEntry<YService> entry(status, this, CHECK_WARN_ZERO_HANDLE);
done(status, entry, this, [&]{entry.next()->detach(status);}, [&]{entry.next()->detach_1(status);});
done(status, entry, this, [&]{entry.next()->detach(status);}, [&]{entry.next()->deprecatedDetach(status);});
}
catch (const Exception& e)
{
@ -6161,7 +6164,7 @@ void YService::detach(CheckStatusWrapper* status)
}
}
void YService::detach_1(CheckStatusWrapper* status)
void YService::deprecatedDetach(CheckStatusWrapper* status)
{
detach(status);
}