mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Remove IMaster::same from the API.
This commit is contained in:
parent
8508fea434
commit
346992fcec
@ -88,11 +88,7 @@ interface Master : Versioned
|
||||
Attachment registerAttachment(Provider provider, Attachment attachment);
|
||||
Transaction registerTransaction(Attachment attachment, Transaction transaction);
|
||||
|
||||
// This function is required to compare interfaces based on vtables of them
|
||||
int same(Versioned first, Versioned second); //// FIXME: Should we really publish this API?
|
||||
|
||||
MetadataBuilder getMetadataBuilder(Status status, uint fieldCount);
|
||||
//// FIXME: Debug getDebug();
|
||||
int serverMode(int mode);
|
||||
Utl getUtlInterface();
|
||||
ConfigManager getConfigManager();
|
||||
|
@ -293,7 +293,6 @@ namespace Firebird
|
||||
IDtc* (CLOOP_CARG *getDtc)(IMaster* self) throw();
|
||||
IAttachment* (CLOOP_CARG *registerAttachment)(IMaster* self, IProvider* provider, IAttachment* attachment) throw();
|
||||
ITransaction* (CLOOP_CARG *registerTransaction)(IMaster* self, IAttachment* attachment, ITransaction* transaction) throw();
|
||||
int (CLOOP_CARG *same)(IMaster* self, IVersioned* first, IVersioned* second) throw();
|
||||
IMetadataBuilder* (CLOOP_CARG *getMetadataBuilder)(IMaster* self, IStatus* status, unsigned fieldCount) throw();
|
||||
int (CLOOP_CARG *serverMode)(IMaster* self, int mode) throw();
|
||||
IUtl* (CLOOP_CARG *getUtlInterface)(IMaster* self) throw();
|
||||
@ -361,12 +360,6 @@ namespace Firebird
|
||||
return ret;
|
||||
}
|
||||
|
||||
int same(IVersioned* first, IVersioned* second)
|
||||
{
|
||||
int ret = static_cast<VTable*>(this->cloopVTable)->same(this, first, second);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <typename StatusType> IMetadataBuilder* getMetadataBuilder(StatusType* status, unsigned fieldCount)
|
||||
{
|
||||
IMetadataBuilder* ret = static_cast<VTable*>(this->cloopVTable)->getMetadataBuilder(this, status, fieldCount);
|
||||
@ -4811,7 +4804,6 @@ namespace Firebird
|
||||
this->getDtc = &Name::cloopgetDtcDispatcher;
|
||||
this->registerAttachment = &Name::cloopregisterAttachmentDispatcher;
|
||||
this->registerTransaction = &Name::cloopregisterTransactionDispatcher;
|
||||
this->same = &Name::cloopsameDispatcher;
|
||||
this->getMetadataBuilder = &Name::cloopgetMetadataBuilderDispatcher;
|
||||
this->serverMode = &Name::cloopserverModeDispatcher;
|
||||
this->getUtlInterface = &Name::cloopgetUtlInterfaceDispatcher;
|
||||
@ -4926,19 +4918,6 @@ namespace Firebird
|
||||
}
|
||||
}
|
||||
|
||||
static int CLOOP_CARG cloopsameDispatcher(IMaster* self, IVersioned* first, IVersioned* second) throw()
|
||||
{
|
||||
try
|
||||
{
|
||||
return static_cast<Name*>(self)->Name::same(first, second);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
StatusType::catchException(0);
|
||||
return static_cast<int>(0);
|
||||
}
|
||||
}
|
||||
|
||||
static IMetadataBuilder* CLOOP_CARG cloopgetMetadataBuilderDispatcher(IMaster* self, IStatus* status, unsigned fieldCount) throw()
|
||||
{
|
||||
StatusType status2(status);
|
||||
@ -5015,7 +4994,6 @@ namespace Firebird
|
||||
virtual IDtc* getDtc() = 0;
|
||||
virtual IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) = 0;
|
||||
virtual ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) = 0;
|
||||
virtual int same(IVersioned* first, IVersioned* second) = 0;
|
||||
virtual IMetadataBuilder* getMetadataBuilder(StatusType* status, unsigned fieldCount) = 0;
|
||||
virtual int serverMode(int mode) = 0;
|
||||
virtual IUtl* getUtlInterface() = 0;
|
||||
|
@ -660,7 +660,8 @@ namespace Jrd {
|
||||
|
||||
bool CryptoManager::HolderAttachments::operator==(IKeyHolderPlugin* kh) const
|
||||
{
|
||||
return MasterInterfacePtr()->same(keyHolder, kh) != 0;
|
||||
// ASF: I think there should be a better way to do this.
|
||||
return keyHolder->cloopVTable == kh->cloopVTable;
|
||||
}
|
||||
|
||||
void CryptoManager::KeyHolderPlugins::attach(Attachment* att, Config* config)
|
||||
|
@ -102,11 +102,6 @@ IPluginManager* MasterImplementation::getPluginManager()
|
||||
return &manager;
|
||||
}
|
||||
|
||||
int MasterImplementation::same(IVersioned* first, IVersioned* second)
|
||||
{
|
||||
return first->cloopVTable == second->cloopVTable ? 1 : 0;
|
||||
}
|
||||
|
||||
IMetadataBuilder* MasterImplementation::getMetadataBuilder(CheckStatusWrapper* status, unsigned fieldCount)
|
||||
{
|
||||
try
|
||||
|
@ -68,7 +68,6 @@ namespace Why
|
||||
Firebird::ITransaction* registerTransaction(Firebird::IAttachment* attachment,
|
||||
Firebird::ITransaction* transaction);
|
||||
Dtc* getDtc();
|
||||
int same(Firebird::IVersioned* first, Firebird::IVersioned* second);
|
||||
Firebird::IMetadataBuilder* getMetadataBuilder(Firebird::CheckStatusWrapper* status, unsigned fieldCount);
|
||||
//Firebird::IDebug* getDebug();
|
||||
int serverMode(int mode);
|
||||
|
Loading…
Reference in New Issue
Block a user