751 lines
30 KiB
ObjectPascal
751 lines
30 KiB
ObjectPascal
/// SOA interface methods definition to circumvent FPC missing RTTI
|
|
// - generated at 2016-06-14 13:49:41
|
|
unit TestSQL3FPCInterfaces;
|
|
|
|
{
|
|
WARNING:
|
|
This unit has been generated by a mORMot 1.18.2718 server.
|
|
Any manual modification of this file may be lost after regeneration.
|
|
|
|
Synopse mORMot framework. Copyright (C) 2022 Arnaud Bouchez
|
|
Synopse Informatique - https://synopse.info
|
|
|
|
This unit is released under a MPL/GPL/LGPL tri-license,
|
|
and therefore may be freely included in any application.
|
|
|
|
This unit is intended to work on older FPC compilers, which lack of RTTI
|
|
for interfaces - see http://bugs.freepascal.org/view.php?id=26774
|
|
|
|
USAGE:
|
|
|
|
Add this TestSQL3FPCInterfaces unit to your uses clause, so that the following
|
|
interfaces would be defined as expected by mORMot under FPC:
|
|
|
|
- IMonitored
|
|
- IMonitoredDaemon
|
|
- IAdministratedDaemon
|
|
- IAdministratedDaemonAsProxy
|
|
- IDomAuthQuery
|
|
- IDomAuthCommand
|
|
- IDomUserEmailValidation
|
|
- IDomUserEmailer
|
|
- IDomUserTemplate
|
|
- IDomUserQuery
|
|
- IDomUserCommand
|
|
- ISMTPServerConnection
|
|
- ICalculator
|
|
- IComplexCalculator
|
|
- IComplexNumber
|
|
- ITestSession
|
|
- ITestUser
|
|
- ITestGroup
|
|
- ITestPerThread
|
|
- ISmsSender
|
|
- IUserRepository
|
|
- IBidirService
|
|
- IBidirCallback
|
|
- IServiceRecordVersion
|
|
- IServiceRecordVersionCallback
|
|
- IDDDThreadsQuery
|
|
- IDDDThreadsCommand
|
|
|
|
}
|
|
|
|
interface
|
|
|
|
{$I Synopse.inc} // needed for setting HASINTERFACERTTI and proper FPC modes
|
|
|
|
uses
|
|
SysUtils,
|
|
Classes,
|
|
SynCommons,
|
|
SynLog,
|
|
mORMot,
|
|
mORMotDDD,
|
|
dddDomAuthInterfaces,
|
|
dddDomUserInterfaces,
|
|
dddDomUserTypes,
|
|
dddDomUserCQRS,
|
|
dddInfraEmailer,
|
|
SynSelfTests;
|
|
|
|
|
|
implementation
|
|
|
|
uses
|
|
SynTable;
|
|
|
|
{$ifndef HASINTERFACERTTI} // circumvent old FPC bug of missing RTTI
|
|
|
|
{ TInterfaceFactoryDefinition }
|
|
|
|
type
|
|
/// define and manage missing interface RTTI for the following interfaces:
|
|
// - IMonitored
|
|
// - IMonitoredDaemon
|
|
// - IAdministratedDaemon
|
|
// - IAdministratedDaemonAsProxy
|
|
// - IDomAuthQuery
|
|
// - IDomAuthCommand
|
|
// - IDomUserEmailValidation
|
|
// - IDomUserEmailer
|
|
// - IDomUserTemplate
|
|
// - IDomUserQuery
|
|
// - IDomUserCommand
|
|
// - ISMTPServerConnection
|
|
// - ICalculator
|
|
// - IComplexCalculator
|
|
// - IComplexNumber
|
|
// - ITestSession
|
|
// - ITestUser
|
|
// - ITestGroup
|
|
// - ITestPerThread
|
|
// - ISmsSender
|
|
// - IUserRepository
|
|
// - IBidirService
|
|
// - IBidirCallback
|
|
// - IServiceRecordVersion
|
|
// - IServiceRecordVersionCallback
|
|
// - IDDDThreadsQuery
|
|
// - IDDDThreadsCommand
|
|
TInterfaceFactoryDefinition = class(TInterfaceFactoryGenerated)
|
|
protected
|
|
procedure AddMethodsFromTypeInfo(aInterface: PTypeInfo); override;
|
|
end;
|
|
|
|
procedure TInterfaceFactoryDefinition.AddMethodsFromTypeInfo(aInterface: PTypeInfo);
|
|
begin
|
|
if aInterface=TypeInfo(IMonitored) then begin
|
|
AddMethod('RetrieveState',[
|
|
ord(smdout),'Status',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IMonitoredDaemon) then begin
|
|
AddMethod('RetrieveState',[
|
|
ord(smdout),'Status',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Start',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Stop',[
|
|
ord(smdout),'Information',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IAdministratedDaemon) then begin
|
|
AddMethod('RetrieveState',[
|
|
ord(smdout),'Status',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Start',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Stop',[
|
|
ord(smdout),'Information',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Halt',[
|
|
ord(smdout),'Information',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('DatabaseList',[
|
|
ord(smdresult),'Result',TypeInfo(TRawUTF8DynArray)]);
|
|
AddMethod('DatabaseTables',[
|
|
ord(smdconst),'DatabaseName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TRawUTF8DynArray)]);
|
|
AddMethod('DatabaseExecute',[
|
|
ord(smdconst),'DatabaseName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'SQL',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TServiceCustomAnswer)]);
|
|
AddMethod('SubscribeLog',[
|
|
ord(smdconst),'Level',TypeInfo(TSynLogInfos),
|
|
ord(smdconst),'Callback',TypeInfo(ISynLogCallback),
|
|
ord(smdconst),'ReceiveExistingKB',TypeInfo(LongWord)]);
|
|
AddMethod('CallbackReleased',[
|
|
ord(smdconst),'callback',TypeInfo(IInvokable),
|
|
ord(smdconst),'interfaceName',TypeInfo(RawUTF8)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IAdministratedDaemonAsProxy) then begin
|
|
AddMethod('RetrieveState',[
|
|
ord(smdout),'Status',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Start',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Stop',[
|
|
ord(smdout),'Information',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Halt',[
|
|
ord(smdout),'Information',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('DatabaseList',[
|
|
ord(smdresult),'Result',TypeInfo(TRawUTF8DynArray)]);
|
|
AddMethod('DatabaseTables',[
|
|
ord(smdconst),'DatabaseName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TRawUTF8DynArray)]);
|
|
AddMethod('DatabaseExecute',[
|
|
ord(smdconst),'DatabaseName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'SQL',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TServiceCustomAnswer)]);
|
|
AddMethod('SubscribeLog',[
|
|
ord(smdconst),'Level',TypeInfo(TSynLogInfos),
|
|
ord(smdconst),'Callback',TypeInfo(ISynLogCallback),
|
|
ord(smdconst),'ReceiveExistingKB',TypeInfo(LongWord)]);
|
|
AddMethod('CallbackReleased',[
|
|
ord(smdconst),'callback',TypeInfo(IInvokable),
|
|
ord(smdconst),'interfaceName',TypeInfo(RawUTF8)]);
|
|
AddMethod('StartProxy',[
|
|
ord(smdconst),'aDDDRestClientSettings',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomAuthQuery) then begin
|
|
AddMethod('GetLastError',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetLastErrorInfo',[
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('ChallengeSelectFirst',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('ChallengeSelectFinal',[
|
|
ord(smdconst),'aChallengedPassword',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Logged',[
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
AddMethod('LogonName',[
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('SelectByName',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Get',[
|
|
ord(smdout),'aAggregate',TypeInfo(dddDomAuthInterfaces.TAuthInfo),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomAuthCommand) then begin
|
|
AddMethod('GetLastError',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetLastErrorInfo',[
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('ChallengeSelectFirst',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('ChallengeSelectFinal',[
|
|
ord(smdconst),'aChallengedPassword',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Logged',[
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
AddMethod('LogonName',[
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('SelectByName',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Get',[
|
|
ord(smdout),'aAggregate',TypeInfo(dddDomAuthInterfaces.TAuthInfo),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Add',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aHashedPassword',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('UpdatePassword',[
|
|
ord(smdconst),'aHashedPassword',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Delete',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Commit',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomUserEmailValidation) then begin
|
|
AddMethod('CheckRecipient',[
|
|
ord(smdconst),'aEmail',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('CheckRecipients',[
|
|
ord(smdconst),'aEmails',TypeInfo(TRawUTF8DynArray),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('ComputeURIForReply',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aEmail',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('StartEmailValidation',[
|
|
ord(smdconst),'aTemplate',TypeInfo(dddDomUserTypes.TDomUserEmailTemplate),
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aEmail',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('IsEmailValidated',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aEmail',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomUserEmailer) then begin
|
|
AddMethod('SendEmail',[
|
|
ord(smdconst),'aRecipients',TypeInfo(TRawUTF8DynArray),
|
|
ord(smdconst),'aSender',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aSubject',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aHeaders',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aBody',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomUserTemplate) then begin
|
|
AddMethod('ComputeMessage',[
|
|
ord(smdconst),'aContext',TypeInfo(Variant),
|
|
ord(smdconst),'aTemplateName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomUserQuery) then begin
|
|
AddMethod('GetLastError',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetLastErrorInfo',[
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('SelectByLogonName',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectByEmailValidation',[
|
|
ord(smdconst),'aValidationState',TypeInfo(TDomUserEmailValidation),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectByLastName',[
|
|
ord(smdconst),'aName',TypeInfo(TLastName),
|
|
ord(smdconst),'aStartWith',TypeInfo(Boolean),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectAll',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Get',[
|
|
ord(smdout),'aAggregate',TypeInfo(dddDomUserTypes.TUser),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetAll',[
|
|
ord(smdout),'aAggregates',TypeInfo(TUserObjArray),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetNext',[
|
|
ord(smdout),'aAggregate',TypeInfo(dddDomUserTypes.TUser),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetCount',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('HowManyValidatedEmail',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDomUserCommand) then begin
|
|
AddMethod('GetLastError',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetLastErrorInfo',[
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('SelectByLogonName',[
|
|
ord(smdconst),'aLogonName',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectByEmailValidation',[
|
|
ord(smdconst),'aValidationState',TypeInfo(TDomUserEmailValidation),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectByLastName',[
|
|
ord(smdconst),'aName',TypeInfo(TLastName),
|
|
ord(smdconst),'aStartWith',TypeInfo(Boolean),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectAll',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Get',[
|
|
ord(smdout),'aAggregate',TypeInfo(dddDomUserTypes.TUser),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetAll',[
|
|
ord(smdout),'aAggregates',TypeInfo(TUserObjArray),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetNext',[
|
|
ord(smdout),'aAggregate',TypeInfo(dddDomUserTypes.TUser),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetCount',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('HowManyValidatedEmail',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('Add',[
|
|
ord(smdconst),'aAggregate',TypeInfo(dddDomUserTypes.TUser),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Update',[
|
|
ord(smdconst),'aUpdatedAggregate',TypeInfo(dddDomUserTypes.TUser),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Delete',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('DeleteAll',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Commit',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Rollback',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ISMTPServerConnection) then begin
|
|
AddMethod('SendEmail',[
|
|
ord(smdconst),'aRecipient',TypeInfo(TRawUTF8DynArray),
|
|
ord(smdconst),'aSender',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aSubject',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aHeader',TypeInfo(RawUTF8),
|
|
ord(smdconst),'aBody',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(RawUTF8)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ICalculator) then begin
|
|
AddMethod('Add',[
|
|
ord(smdconst),'n1',TypeInfo(LongInt),
|
|
ord(smdconst),'n2',TypeInfo(LongInt),
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('Multiply',[
|
|
ord(smdconst),'n1',TypeInfo(Int64),
|
|
ord(smdconst),'n2',TypeInfo(Int64),
|
|
ord(smdresult),'Result',TypeInfo(Int64)]);
|
|
AddMethod('Subtract',[
|
|
ord(smdconst),'n1',TypeInfo(Double),
|
|
ord(smdconst),'n2',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(Double)]);
|
|
AddMethod('ToText',[
|
|
ord(smdconst),'Value',TypeInfo(Currency),
|
|
ord(smdvar),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('ToTextFunc',[
|
|
ord(smdconst),'Value',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(AnsiString)]);
|
|
AddMethod('Swap',[
|
|
ord(smdvar),'n1',TypeInfo(Double),
|
|
ord(smdvar),'n2',TypeInfo(Double)]);
|
|
AddMethod('StackIntMultiply',[
|
|
ord(smdconst),'n1',TypeInfo(LongInt),
|
|
ord(smdconst),'n2',TypeInfo(LongInt),
|
|
ord(smdconst),'n3',TypeInfo(LongInt),
|
|
ord(smdconst),'n4',TypeInfo(LongInt),
|
|
ord(smdconst),'n5',TypeInfo(LongInt),
|
|
ord(smdconst),'n6',TypeInfo(LongInt),
|
|
ord(smdconst),'n7',TypeInfo(LongInt),
|
|
ord(smdconst),'n8',TypeInfo(LongInt),
|
|
ord(smdconst),'n9',TypeInfo(LongInt),
|
|
ord(smdconst),'n10',TypeInfo(LongInt),
|
|
ord(smdresult),'Result',TypeInfo(Int64)]);
|
|
AddMethod('StackFloatMultiply',[
|
|
ord(smdconst),'n1',TypeInfo(Double),
|
|
ord(smdconst),'n2',TypeInfo(Double),
|
|
ord(smdconst),'n3',TypeInfo(Double),
|
|
ord(smdconst),'n4',TypeInfo(Double),
|
|
ord(smdconst),'n5',TypeInfo(Double),
|
|
ord(smdconst),'n6',TypeInfo(Double),
|
|
ord(smdconst),'n7',TypeInfo(Double),
|
|
ord(smdconst),'n8',TypeInfo(Double),
|
|
ord(smdconst),'n9',TypeInfo(Double),
|
|
ord(smdconst),'n10',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(Int64)]);
|
|
AddMethod('SpecialCall',[
|
|
ord(smdconst),'Txt',TypeInfo(RawUTF8),
|
|
ord(smdvar),'Int',TypeInfo(LongInt),
|
|
ord(smdvar),'Card',TypeInfo(LongWord),
|
|
ord(smdconst),'field',TypeInfo(TSynTableFieldTypes),
|
|
ord(smdconst),'fields',TypeInfo(TSynTableFieldTypes),
|
|
ord(smdvar),'options',TypeInfo(TSynTableFieldOptions),
|
|
ord(smdresult),'Result',TypeInfo(TSynTableFieldTypes)]);
|
|
AddMethod('ComplexCall',[
|
|
ord(smdconst),'Ints',TypeInfo(TIntegerDynArray),
|
|
ord(smdconst),'Strs1',TypeInfo(TRawUTF8DynArray),
|
|
ord(smdvar),'Str2',TypeInfo(TWideStringDynArray),
|
|
ord(smdconst),'Rec1',TypeInfo(TVirtualTableModuleProperties),
|
|
ord(smdvar),'Rec2',TypeInfo(TSQLRestCacheEntryValue),
|
|
ord(smdconst),'Float1',TypeInfo(Double),
|
|
ord(smdvar),'Float2',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(TSQLRestCacheEntryValue)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IComplexCalculator) then begin
|
|
AddMethod('Add',[
|
|
ord(smdconst),'n1',TypeInfo(LongInt),
|
|
ord(smdconst),'n2',TypeInfo(LongInt),
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('Multiply',[
|
|
ord(smdconst),'n1',TypeInfo(Int64),
|
|
ord(smdconst),'n2',TypeInfo(Int64),
|
|
ord(smdresult),'Result',TypeInfo(Int64)]);
|
|
AddMethod('Subtract',[
|
|
ord(smdconst),'n1',TypeInfo(Double),
|
|
ord(smdconst),'n2',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(Double)]);
|
|
AddMethod('ToText',[
|
|
ord(smdconst),'Value',TypeInfo(Currency),
|
|
ord(smdvar),'Result',TypeInfo(RawUTF8)]);
|
|
AddMethod('ToTextFunc',[
|
|
ord(smdconst),'Value',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(AnsiString)]);
|
|
AddMethod('Swap',[
|
|
ord(smdvar),'n1',TypeInfo(Double),
|
|
ord(smdvar),'n2',TypeInfo(Double)]);
|
|
AddMethod('StackIntMultiply',[
|
|
ord(smdconst),'n1',TypeInfo(LongInt),
|
|
ord(smdconst),'n2',TypeInfo(LongInt),
|
|
ord(smdconst),'n3',TypeInfo(LongInt),
|
|
ord(smdconst),'n4',TypeInfo(LongInt),
|
|
ord(smdconst),'n5',TypeInfo(LongInt),
|
|
ord(smdconst),'n6',TypeInfo(LongInt),
|
|
ord(smdconst),'n7',TypeInfo(LongInt),
|
|
ord(smdconst),'n8',TypeInfo(LongInt),
|
|
ord(smdconst),'n9',TypeInfo(LongInt),
|
|
ord(smdconst),'n10',TypeInfo(LongInt),
|
|
ord(smdresult),'Result',TypeInfo(Int64)]);
|
|
AddMethod('StackFloatMultiply',[
|
|
ord(smdconst),'n1',TypeInfo(Double),
|
|
ord(smdconst),'n2',TypeInfo(Double),
|
|
ord(smdconst),'n3',TypeInfo(Double),
|
|
ord(smdconst),'n4',TypeInfo(Double),
|
|
ord(smdconst),'n5',TypeInfo(Double),
|
|
ord(smdconst),'n6',TypeInfo(Double),
|
|
ord(smdconst),'n7',TypeInfo(Double),
|
|
ord(smdconst),'n8',TypeInfo(Double),
|
|
ord(smdconst),'n9',TypeInfo(Double),
|
|
ord(smdconst),'n10',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(Int64)]);
|
|
AddMethod('SpecialCall',[
|
|
ord(smdconst),'Txt',TypeInfo(RawUTF8),
|
|
ord(smdvar),'Int',TypeInfo(LongInt),
|
|
ord(smdvar),'Card',TypeInfo(LongWord),
|
|
ord(smdconst),'field',TypeInfo(TSynTableFieldTypes),
|
|
ord(smdconst),'fields',TypeInfo(TSynTableFieldTypes),
|
|
ord(smdvar),'options',TypeInfo(TSynTableFieldOptions),
|
|
ord(smdresult),'Result',TypeInfo(TSynTableFieldTypes)]);
|
|
AddMethod('ComplexCall',[
|
|
ord(smdconst),'Ints',TypeInfo(TIntegerDynArray),
|
|
ord(smdconst),'Strs1',TypeInfo(TRawUTF8DynArray),
|
|
ord(smdvar),'Str2',TypeInfo(TWideStringDynArray),
|
|
ord(smdconst),'Rec1',TypeInfo(TVirtualTableModuleProperties),
|
|
ord(smdvar),'Rec2',TypeInfo(TSQLRestCacheEntryValue),
|
|
ord(smdconst),'Float1',TypeInfo(Double),
|
|
ord(smdvar),'Float2',TypeInfo(Double),
|
|
ord(smdresult),'Result',TypeInfo(TSQLRestCacheEntryValue)]);
|
|
AddMethod('Substract',[
|
|
ord(smdconst),'n1',TypeInfo(SynSelfTests.TComplexNumber),
|
|
ord(smdconst),'n2',TypeInfo(SynSelfTests.TComplexNumber),
|
|
ord(smdout),'Result',TypeInfo(SynSelfTests.TComplexNumber)]);
|
|
AddMethod('IsNull',[
|
|
ord(smdconst),'n',TypeInfo(SynSelfTests.TComplexNumber),
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
AddMethod('TestBlob',[
|
|
ord(smdconst),'n',TypeInfo(SynSelfTests.TComplexNumber),
|
|
ord(smdresult),'Result',TypeInfo(TServiceCustomAnswer)]);
|
|
AddMethod('TestVariants',[
|
|
ord(smdconst),'Text',TypeInfo(RawUTF8),
|
|
ord(smdconst),'V1',TypeInfo(Variant),
|
|
ord(smdvar),'V2',TypeInfo(Variant),
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('Collections',[
|
|
ord(smdconst),'Item',TypeInfo(SynSelfTests.TCollTest),
|
|
ord(smdvar),'List',TypeInfo(SynSelfTests.TCollTestsI),
|
|
ord(smdout),'Copy',TypeInfo(SynSelfTests.TCollTestsI)]);
|
|
AddMethod('GetCurrentThreadID',[
|
|
ord(smdresult),'Result',TypeInfo(LongWord)]);
|
|
AddMethod('GetCustomer',[
|
|
ord(smdconst),'CustomerId',TypeInfo(LongInt),
|
|
ord(smdout),'CustomerData',TypeInfo(TCustomerData),
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
AddMethod('FillPeople',[
|
|
ord(smdvar),'People',TypeInfo(SynSelfTests.TSQLRecordPeople)]);
|
|
AddMethod('EchoRecord',[
|
|
ord(smdconst),'Nav',TypeInfo(TConsultaNav),
|
|
ord(smdresult),'Result',TypeInfo(TConsultaNav)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IComplexNumber) then begin
|
|
AddMethod('Assign',[
|
|
ord(smdconst),'aReal',TypeInfo(Double),
|
|
ord(smdconst),'aImaginary',TypeInfo(Double)]);
|
|
AddMethod('GetImaginary',[
|
|
ord(smdresult),'Result',TypeInfo(Double)]);
|
|
AddMethod('GetReal',[
|
|
ord(smdresult),'Result',TypeInfo(Double)]);
|
|
AddMethod('SetImaginary',[
|
|
ord(smdconst),'Value',TypeInfo(Double)]);
|
|
AddMethod('SetReal',[
|
|
ord(smdconst),'Value',TypeInfo(Double)]);
|
|
AddMethod('Add',[
|
|
ord(smdconst),'aReal',TypeInfo(Double),
|
|
ord(smdconst),'aImaginary',TypeInfo(Double)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ITestSession) then begin
|
|
AddMethod('GetContextSessionID',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('GetContextSessionUser',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('GetContextSessionGroup',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ITestUser) then begin
|
|
AddMethod('GetContextSessionID',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('GetContextSessionUser',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('GetContextSessionGroup',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ITestGroup) then begin
|
|
AddMethod('GetContextSessionID',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('GetContextSessionUser',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('GetContextSessionGroup',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ITestPerThread) then begin
|
|
AddMethod('GetContextServiceInstanceID',[
|
|
ord(smdresult),'Result',TypeInfo(LongWord)]);
|
|
AddMethod('GetThreadIDAtCreation',[
|
|
ord(smdresult),'Result',TypeInfo(LongWord)]);
|
|
AddMethod('GetCurrentThreadID',[
|
|
ord(smdresult),'Result',TypeInfo(LongWord)]);
|
|
AddMethod('GetCurrentRunningThreadID',[
|
|
ord(smdresult),'Result',TypeInfo(LongWord)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(ISmsSender) then begin
|
|
AddMethod('Send',[
|
|
ord(smdconst),'Text',TypeInfo(RawUTF8),
|
|
ord(smdconst),'Number',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IUserRepository) then begin
|
|
AddMethod('GetUserByName',[
|
|
ord(smdconst),'Name',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TUser)]);
|
|
AddMethod('Save',[
|
|
ord(smdconst),'User',TypeInfo(TUser)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IBidirService) then begin
|
|
AddMethod('TestRest',[
|
|
ord(smdconst),'a',TypeInfo(LongInt),
|
|
ord(smdconst),'b',TypeInfo(LongInt),
|
|
ord(smdout),'c',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('TestRestCustom',[
|
|
ord(smdconst),'a',TypeInfo(LongInt),
|
|
ord(smdresult),'Result',TypeInfo(TServiceCustomAnswer)]);
|
|
AddMethod('TestCallback',[
|
|
ord(smdconst),'d',TypeInfo(LongInt),
|
|
ord(smdconst),'callback',TypeInfo(IBidirCallback),
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
AddMethod('LaunchCallback',[
|
|
ord(smdconst),'a',TypeInfo(LongInt)]);
|
|
AddMethod('RemoveCallback',[
|
|
]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IBidirCallback) then begin
|
|
AddMethod('AsynchEvent',[
|
|
ord(smdconst),'a',TypeInfo(LongInt)]);
|
|
AddMethod('Value',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IServiceRecordVersion) then begin
|
|
AddMethod('Subscribe',[
|
|
ord(smdconst),'SQLTableName',TypeInfo(RawUTF8),
|
|
ord(smdconst),'revision',TypeInfo(TRecordVersion),
|
|
ord(smdconst),'callback',TypeInfo(IServiceRecordVersionCallback),
|
|
ord(smdresult),'Result',TypeInfo(Boolean)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IServiceRecordVersionCallback) then begin
|
|
AddMethod('Added',[
|
|
ord(smdconst),'NewContent',TypeInfo(RawJSON)]);
|
|
AddMethod('Updated',[
|
|
ord(smdconst),'ModifiedContent',TypeInfo(RawJSON)]);
|
|
AddMethod('Deleted',[
|
|
ord(smdconst),'ID',TypeInfo(TID),
|
|
ord(smdconst),'Revision',TypeInfo(TRecordVersion)]);
|
|
AddMethod('CurrentFrame',[
|
|
ord(smdconst),'isLast',TypeInfo(Boolean)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDDDThreadsQuery) then begin
|
|
AddMethod('GetLastError',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetLastErrorInfo',[
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('SelectByDescription',[
|
|
ord(smdconst),'aDescription',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectAll',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Get',[
|
|
ord(smdout),'aAggregate',TypeInfo(SynSelfTests.TDDDTest),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetAll',[
|
|
ord(smdout),'aAggregates',TypeInfo(TDDDTestObjArray),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetNext',[
|
|
ord(smdout),'aAggregate',TypeInfo(SynSelfTests.TDDDTest),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetCount',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
exit;
|
|
end;
|
|
if aInterface=TypeInfo(IDDDThreadsCommand) then begin
|
|
AddMethod('GetLastError',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetLastErrorInfo',[
|
|
ord(smdresult),'Result',TypeInfo(Variant)]);
|
|
AddMethod('SelectByDescription',[
|
|
ord(smdconst),'aDescription',TypeInfo(RawUTF8),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('SelectAll',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Get',[
|
|
ord(smdout),'aAggregate',TypeInfo(SynSelfTests.TDDDTest),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetAll',[
|
|
ord(smdout),'aAggregates',TypeInfo(TDDDTestObjArray),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetNext',[
|
|
ord(smdout),'aAggregate',TypeInfo(SynSelfTests.TDDDTest),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('GetCount',[
|
|
ord(smdresult),'Result',TypeInfo(LongInt)]);
|
|
AddMethod('Add',[
|
|
ord(smdconst),'aAggregate',TypeInfo(SynSelfTests.TDDDTest),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Update',[
|
|
ord(smdconst),'aUpdatedAggregate',TypeInfo(SynSelfTests.TDDDTest),
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Delete',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('DeleteAll',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Commit',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
AddMethod('Rollback',[
|
|
ord(smdresult),'Result',TypeInfo(TCQRSResult)]);
|
|
exit;
|
|
end;
|
|
end;
|
|
|
|
initialization
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IMonitored));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IMonitoredDaemon));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IAdministratedDaemon));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IAdministratedDaemonAsProxy));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomAuthQuery));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomAuthCommand));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomUserEmailValidation));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomUserEmailer));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomUserTemplate));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomUserQuery));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDomUserCommand));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ISMTPServerConnection));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ICalculator));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IComplexCalculator));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IComplexNumber));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ITestSession));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ITestUser));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ITestGroup));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ITestPerThread));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(ISmsSender));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IUserRepository));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IBidirService));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IBidirCallback));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IServiceRecordVersion));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IServiceRecordVersionCallback));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDDDThreadsQuery));
|
|
TInterfaceFactoryDefinition.RegisterInterface(TypeInfo(IDDDThreadsCommand));
|
|
|
|
{$endif HASINTERFACERTTI}
|
|
end.
|