source upload

This commit is contained in:
Razor12911
2022-01-17 22:16:47 +02:00
parent 12936d065b
commit 098e8c48de
1778 changed files with 1206749 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
program ServBook;
{$APPTYPE CONSOLE}
uses
{$I SynDprUses.inc} // includes FastMM4
SysUtils,
SynLog,
mORMot,
SynSQLite3Static,
mORMotSQLite3,
mORMotService, // cross-platform service/daemon skeleton with settings
// domain
DomConferenceTypes in '..\dom\DomConferenceTypes.pas',
DomConferenceInterfaces in '..\dom\DomConferenceInterfaces.pas',
DomConferenceDepend in '..\dom\DomConferenceDepend.pas',
DomConferenceServices in '..\dom\DomConferenceServices.pas',
// infrastructure
InfraConferenceRepository in '..\infra\InfraConferenceRepository.pas',
// servers
ServBookMain in '..\serv\ServBookMain.pas';
type
TBookSettings = class(TSynDaemonSettings)
private
fProcess: TBookProcessSettings;
public
constructor Create; override;
published
property Process: TBookProcessSettings read fProcess;
end;
TBookDaemon = class(TSynDaemon)
protected
fProcess: TBookProcess;
public
procedure Start; override;
procedure Stop; override;
end;
{ TBookDaemon }
procedure TBookDaemon.Start;
begin
if fProcess = nil then
fProcess := TBookProcess.Create((fSettings as TBookSettings).Process);
end;
procedure TBookDaemon.Stop;
begin
FreeAndNil(fProcess);
end;
{ TBookSettings }
constructor TBookSettings.Create;
begin
inherited;
fServiceDisplayName := 'My Long Name for Service';
end;
begin
with TBookDaemon.Create(TBookSettings, '', '', '') do
try
CommandLine(true);
finally
Free;
end;
end.

View File

@@ -0,0 +1,40 @@
/// Booking server implementation
unit ServBookMain;
interface
uses
SysUtils,
Classes,
SynCommons,
mORMot,
DomConferenceTypes,
DomConferenceInterfaces,
DomConferenceServices,
InfraConferenceRepository;
type
TBookProcessSettings = class(TSynAutoCreateFields)
published
end;
TBookProcess = class(TSynPersistent)
protected
fSettings: TBookProcessSettings;
public
constructor Create(aSettings: TBookProcessSettings); reintroduce;
property Settings: TBookProcessSettings read fSettings;
end;
implementation
{ TBookProcess }
constructor TBookProcess.Create(aSettings: TBookProcessSettings);
begin
inherited Create;
fSettings := aSettings;
end;
initialization
end.

View File

@@ -0,0 +1,46 @@
/// unit tests for the Booking server
unit ServBookTest;
interface
uses
SysUtils,
Classes,
SynCommons,
SynTests,
mORMot,
DomConferenceTypes,
DomConferenceInterfaces,
DomConferenceServices,
InfraConferenceRepository,
ServBookMain;
type
TTestBookingApplication = class(TSynTestCase)
published
procedure RunService;
procedure ApplicationTest;
procedure ShutdownService;
end;
implementation
{ TTestBookingApplication }
procedure TTestBookingApplication.RunService;
begin
end;
procedure TTestBookingApplication.ApplicationTest;
begin
end;
procedure TTestBookingApplication.ShutdownService;
begin
end;
initialization
end.