diff options
Diffstat (limited to 'src/ext/Http/wixext/Symbols')
5 files changed, 290 insertions, 0 deletions
diff --git a/src/ext/Http/wixext/Symbols/HandleExisting.cs b/src/ext/Http/wixext/Symbols/HandleExisting.cs new file mode 100644 index 00000000..0d70cebc --- /dev/null +++ b/src/ext/Http/wixext/Symbols/HandleExisting.cs | |||
@@ -0,0 +1,14 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Http.Symbols | ||
4 | { | ||
5 | /// <summary> | ||
6 | /// Must match constants in wixhttpca.cpp | ||
7 | /// </summary> | ||
8 | public enum HandleExisting | ||
9 | { | ||
10 | Replace = 0, | ||
11 | Ignore = 1, | ||
12 | Fail = 2, | ||
13 | } | ||
14 | } | ||
diff --git a/src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs b/src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs new file mode 100644 index 00000000..2aa03468 --- /dev/null +++ b/src/ext/Http/wixext/Symbols/HttpSymbolDefinitions.cs | |||
@@ -0,0 +1,47 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Http | ||
4 | { | ||
5 | using System; | ||
6 | using WixToolset.Data; | ||
7 | |||
8 | public enum HttpSymbolDefinitionType | ||
9 | { | ||
10 | WixHttpSniSslCert, | ||
11 | WixHttpUrlAce, | ||
12 | WixHttpUrlReservation, | ||
13 | } | ||
14 | |||
15 | public static partial class HttpSymbolDefinitions | ||
16 | { | ||
17 | public static readonly Version Version = new Version("4.0.0"); | ||
18 | |||
19 | public static IntermediateSymbolDefinition ByName(string name) | ||
20 | { | ||
21 | if (!Enum.TryParse(name, out HttpSymbolDefinitionType type)) | ||
22 | { | ||
23 | return null; | ||
24 | } | ||
25 | |||
26 | return ByType(type); | ||
27 | } | ||
28 | |||
29 | public static IntermediateSymbolDefinition ByType(HttpSymbolDefinitionType type) | ||
30 | { | ||
31 | switch (type) | ||
32 | { | ||
33 | case HttpSymbolDefinitionType.WixHttpSniSslCert: | ||
34 | return HttpSymbolDefinitions.WixHttpSniSslCert; | ||
35 | |||
36 | case HttpSymbolDefinitionType.WixHttpUrlAce: | ||
37 | return HttpSymbolDefinitions.WixHttpUrlAce; | ||
38 | |||
39 | case HttpSymbolDefinitionType.WixHttpUrlReservation: | ||
40 | return HttpSymbolDefinitions.WixHttpUrlReservation; | ||
41 | |||
42 | default: | ||
43 | throw new ArgumentOutOfRangeException(nameof(type)); | ||
44 | } | ||
45 | } | ||
46 | } | ||
47 | } | ||
diff --git a/src/ext/Http/wixext/Symbols/WixHttpSniSslCertSymbol.cs b/src/ext/Http/wixext/Symbols/WixHttpSniSslCertSymbol.cs new file mode 100644 index 00000000..ec67a089 --- /dev/null +++ b/src/ext/Http/wixext/Symbols/WixHttpSniSslCertSymbol.cs | |||
@@ -0,0 +1,95 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Http | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Http.Symbols; | ||
7 | |||
8 | public static partial class HttpSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixHttpSniSslCert = new IntermediateSymbolDefinition( | ||
11 | HttpSymbolDefinitionType.WixHttpSniSslCert.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.Host), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.Port), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.Thumbprint), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.AppId), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.Store), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.HandleExisting), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(WixHttpSniSslCertSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
21 | }, | ||
22 | typeof(WixHttpSniSslCertSymbol)); | ||
23 | } | ||
24 | } | ||
25 | |||
26 | namespace WixToolset.Http.Symbols | ||
27 | { | ||
28 | using WixToolset.Data; | ||
29 | |||
30 | public enum WixHttpSniSslCertSymbolFields | ||
31 | { | ||
32 | Host, | ||
33 | Port, | ||
34 | Thumbprint, | ||
35 | AppId, | ||
36 | Store, | ||
37 | HandleExisting, | ||
38 | ComponentRef, | ||
39 | } | ||
40 | |||
41 | public class WixHttpSniSslCertSymbol : IntermediateSymbol | ||
42 | { | ||
43 | public WixHttpSniSslCertSymbol() : base(HttpSymbolDefinitions.WixHttpSniSslCert, null, null) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public WixHttpSniSslCertSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.WixHttpSniSslCert, sourceLineNumber, id) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public IntermediateField this[WixHttpSniSslCertSymbolFields index] => this.Fields[(int)index]; | ||
52 | |||
53 | public string Host | ||
54 | { | ||
55 | get => this.Fields[(int)WixHttpSniSslCertSymbolFields.Host].AsString(); | ||
56 | set => this.Set((int)WixHttpSniSslCertSymbolFields.Host, value); | ||
57 | } | ||
58 | |||
59 | public string Port | ||
60 | { | ||
61 | get => this.Fields[(int)WixHttpSniSslCertSymbolFields.Port].AsString(); | ||
62 | set => this.Set((int)WixHttpSniSslCertSymbolFields.Port, value); | ||
63 | } | ||
64 | |||
65 | public string Thumbprint | ||
66 | { | ||
67 | get => this.Fields[(int)WixHttpSniSslCertSymbolFields.Thumbprint].AsString(); | ||
68 | set => this.Set((int)WixHttpSniSslCertSymbolFields.Thumbprint, value); | ||
69 | } | ||
70 | |||
71 | public string AppId | ||
72 | { | ||
73 | get => this.Fields[(int)WixHttpSniSslCertSymbolFields.AppId].AsString(); | ||
74 | set => this.Set((int)WixHttpSniSslCertSymbolFields.AppId, value); | ||
75 | } | ||
76 | |||
77 | public string Store | ||
78 | { | ||
79 | get => this.Fields[(int)WixHttpSniSslCertSymbolFields.Store].AsString(); | ||
80 | set => this.Set((int)WixHttpSniSslCertSymbolFields.Store, value); | ||
81 | } | ||
82 | |||
83 | public HandleExisting HandleExisting | ||
84 | { | ||
85 | get => (HandleExisting)this.Fields[(int)WixHttpSniSslCertSymbolFields.HandleExisting].AsNumber(); | ||
86 | set => this.Set((int)WixHttpSniSslCertSymbolFields.HandleExisting, (int)value); | ||
87 | } | ||
88 | |||
89 | public string ComponentRef | ||
90 | { | ||
91 | get => this.Fields[(int)WixHttpSniSslCertSymbolFields.ComponentRef].AsString(); | ||
92 | set => this.Set((int)WixHttpSniSslCertSymbolFields.ComponentRef, value); | ||
93 | } | ||
94 | } | ||
95 | } | ||
diff --git a/src/ext/Http/wixext/Symbols/WixHttpUrlAceSymbol.cs b/src/ext/Http/wixext/Symbols/WixHttpUrlAceSymbol.cs new file mode 100644 index 00000000..1d57bd52 --- /dev/null +++ b/src/ext/Http/wixext/Symbols/WixHttpUrlAceSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Http | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Http.Symbols; | ||
7 | |||
8 | public static partial class HttpSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixHttpUrlAce = new IntermediateSymbolDefinition( | ||
11 | HttpSymbolDefinitionType.WixHttpUrlAce.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceSymbolFields.WixHttpUrlReservationRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceSymbolFields.SecurityPrincipal), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceSymbolFields.Rights), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(WixHttpUrlAceSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Http.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixHttpUrlAceSymbolFields | ||
27 | { | ||
28 | WixHttpUrlReservationRef, | ||
29 | SecurityPrincipal, | ||
30 | Rights, | ||
31 | } | ||
32 | |||
33 | public class WixHttpUrlAceSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixHttpUrlAceSymbol() : base(HttpSymbolDefinitions.WixHttpUrlAce, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixHttpUrlAceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.WixHttpUrlAce, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixHttpUrlAceSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string WixHttpUrlReservationRef | ||
46 | { | ||
47 | get => this.Fields[(int)WixHttpUrlAceSymbolFields.WixHttpUrlReservationRef].AsString(); | ||
48 | set => this.Set((int)WixHttpUrlAceSymbolFields.WixHttpUrlReservationRef, value); | ||
49 | } | ||
50 | |||
51 | public string SecurityPrincipal | ||
52 | { | ||
53 | get => this.Fields[(int)WixHttpUrlAceSymbolFields.SecurityPrincipal].AsString(); | ||
54 | set => this.Set((int)WixHttpUrlAceSymbolFields.SecurityPrincipal, value); | ||
55 | } | ||
56 | |||
57 | public int Rights | ||
58 | { | ||
59 | get => this.Fields[(int)WixHttpUrlAceSymbolFields.Rights].AsNumber(); | ||
60 | set => this.Set((int)WixHttpUrlAceSymbolFields.Rights, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/ext/Http/wixext/Symbols/WixHttpUrlReservationSymbol.cs b/src/ext/Http/wixext/Symbols/WixHttpUrlReservationSymbol.cs new file mode 100644 index 00000000..4aa4a5da --- /dev/null +++ b/src/ext/Http/wixext/Symbols/WixHttpUrlReservationSymbol.cs | |||
@@ -0,0 +1,71 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Http | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Http.Symbols; | ||
7 | |||
8 | public static partial class HttpSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixHttpUrlReservation = new IntermediateSymbolDefinition( | ||
11 | HttpSymbolDefinitionType.WixHttpUrlReservation.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.HandleExisting), IntermediateFieldType.Number), | ||
15 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.Sddl), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.Url), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
18 | }, | ||
19 | typeof(WixHttpUrlReservationSymbol)); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | namespace WixToolset.Http.Symbols | ||
24 | { | ||
25 | using WixToolset.Data; | ||
26 | |||
27 | public enum WixHttpUrlReservationSymbolFields | ||
28 | { | ||
29 | HandleExisting, | ||
30 | Sddl, | ||
31 | Url, | ||
32 | ComponentRef, | ||
33 | } | ||
34 | |||
35 | public class WixHttpUrlReservationSymbol : IntermediateSymbol | ||
36 | { | ||
37 | public WixHttpUrlReservationSymbol() : base(HttpSymbolDefinitions.WixHttpUrlReservation, null, null) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public WixHttpUrlReservationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.WixHttpUrlReservation, sourceLineNumber, id) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | public IntermediateField this[WixHttpUrlReservationSymbolFields index] => this.Fields[(int)index]; | ||
46 | |||
47 | public HandleExisting HandleExisting | ||
48 | { | ||
49 | get => (HandleExisting)this.Fields[(int)WixHttpUrlReservationSymbolFields.HandleExisting].AsNumber(); | ||
50 | set => this.Set((int)WixHttpUrlReservationSymbolFields.HandleExisting, (int)value); | ||
51 | } | ||
52 | |||
53 | public string Sddl | ||
54 | { | ||
55 | get => this.Fields[(int)WixHttpUrlReservationSymbolFields.Sddl].AsString(); | ||
56 | set => this.Set((int)WixHttpUrlReservationSymbolFields.Sddl, value); | ||
57 | } | ||
58 | |||
59 | public string Url | ||
60 | { | ||
61 | get => this.Fields[(int)WixHttpUrlReservationSymbolFields.Url].AsString(); | ||
62 | set => this.Set((int)WixHttpUrlReservationSymbolFields.Url, value); | ||
63 | } | ||
64 | |||
65 | public string ComponentRef | ||
66 | { | ||
67 | get => this.Fields[(int)WixHttpUrlReservationSymbolFields.ComponentRef].AsString(); | ||
68 | set => this.Set((int)WixHttpUrlReservationSymbolFields.ComponentRef, value); | ||
69 | } | ||
70 | } | ||
71 | } \ No newline at end of file | ||