forked from Memnarch/Delphinus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDN.PackageProvider.pas
65 lines (54 loc) · 1.54 KB
/
DN.PackageProvider.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
#########################################################
# Copyright by Alexander Benikowski #
# This unit is part of the Delphinus project hosted on #
# https://github.com/Memnarch/Delphinus #
#########################################################
}
unit DN.PackageProvider;
interface
uses
Classes,
Types,
SysUtils,
Generics.Collections,
DN.Package.Intf,
DN.PackageProvider.Intf;
type
TDNPackageProvider = class(TInterfacedObject, IDNPackageProvider)
private
FPackages: TList<IDNPackage>;
function GetPackages: TList<IDNPackage>;
public
constructor Create();
destructor Destroy(); override;
function Reload(): Boolean; virtual;
function Download(const APackage: IDNPackage; const AVersion: string; const AFolder: string; out AContentFolder: string): Boolean; virtual;
property Packages: TList<IDNPackage> read GetPackages;
end;
implementation
{ TPackageProvider }
constructor TDNPackageProvider.Create;
begin
inherited;
FPackages := TList<IDNPackage>.Create();
end;
destructor TDNPackageProvider.Destroy;
begin
FPackages.Clear();
inherited;
end;
function TDNPackageProvider.Download(const APackage: IDNPackage; const AVersion: string;
const AFolder: string; out AContentFolder: string): Boolean;
begin
Result := False;
end;
function TDNPackageProvider.GetPackages: TList<IDNPackage>;
begin
Result := FPackages;
end;
function TDNPackageProvider.Reload: Boolean;
begin
Result := False;
end;
end.