Initial checkin
[ldk-swift-linux] / LDKSwift / Sources / LDKSwift / structs / ChannelHandshakeLimits.swift
1 import LDKCHeaders
2
3 public class ChannelHandshakeLimits {
4
5     public internal(set) var cOpaqueStruct: LDKChannelHandshakeLimits?;
6
7         /* DEFAULT_CONSTRUCTOR_START */
8     public init() {
9         
10         self.cOpaqueStruct = ChannelHandshakeLimits_default()
11     }
12     /* DEFAULT_CONSTRUCTOR_END */
13
14     public init(pointer: LDKChannelHandshakeLimits){
15                 self.cOpaqueStruct = pointer
16         }
17
18     /* STRUCT_METHODS_START */
19
20     public func get_min_funding_satoshis() -> UInt64 {
21         
22         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
23 ChannelHandshakeLimits_get_min_funding_satoshis(this_ptrPointer)
24 };
25     }
26
27     public func set_min_funding_satoshis(val: UInt64) -> Void {
28         
29                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
30                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
31                                                 
32         return ChannelHandshakeLimits_set_min_funding_satoshis(this_ptrPointer, val);
33     }
34
35     public func get_max_htlc_minimum_msat() -> UInt64 {
36         
37         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
38 ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptrPointer)
39 };
40     }
41
42     public func set_max_htlc_minimum_msat(val: UInt64) -> Void {
43         
44                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
45                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
46                                                 
47         return ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptrPointer, val);
48     }
49
50     public func get_min_max_htlc_value_in_flight_msat() -> UInt64 {
51         
52         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
53 ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptrPointer)
54 };
55     }
56
57     public func set_min_max_htlc_value_in_flight_msat(val: UInt64) -> Void {
58         
59                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
60                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
61                                                 
62         return ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptrPointer, val);
63     }
64
65     public func get_max_channel_reserve_satoshis() -> UInt64 {
66         
67         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
68 ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptrPointer)
69 };
70     }
71
72     public func set_max_channel_reserve_satoshis(val: UInt64) -> Void {
73         
74                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
75                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
76                                                 
77         return ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptrPointer, val);
78     }
79
80     public func get_min_max_accepted_htlcs() -> UInt16 {
81         
82         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
83 ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptrPointer)
84 };
85     }
86
87     public func set_min_max_accepted_htlcs(val: UInt16) -> Void {
88         
89                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
90                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
91                                                 
92         return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptrPointer, val);
93     }
94
95     public func get_max_minimum_depth() -> UInt32 {
96         
97         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
98 ChannelHandshakeLimits_get_max_minimum_depth(this_ptrPointer)
99 };
100     }
101
102     public func set_max_minimum_depth(val: UInt32) -> Void {
103         
104                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
105                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
106                                                 
107         return ChannelHandshakeLimits_set_max_minimum_depth(this_ptrPointer, val);
108     }
109
110     public func get_force_announced_channel_preference() -> Bool {
111         
112         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
113 ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptrPointer)
114 };
115     }
116
117     public func set_force_announced_channel_preference(val: Bool) -> Void {
118         
119                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
120                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
121                                                 
122         return ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptrPointer, val);
123     }
124
125     public func get_their_to_self_delay() -> UInt16 {
126         
127         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
128 ChannelHandshakeLimits_get_their_to_self_delay(this_ptrPointer)
129 };
130     }
131
132     public func set_their_to_self_delay(val: UInt16) -> Void {
133         
134                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeLimits>.allocate(capacity: 1)
135                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
136                                                 
137         return ChannelHandshakeLimits_set_their_to_self_delay(this_ptrPointer, val);
138     }
139
140     public func clone(orig: ChannelHandshakeLimits) -> ChannelHandshakeLimits {
141         
142         return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKChannelHandshakeLimits>) in
143 ChannelHandshakeLimits(pointer: ChannelHandshakeLimits_clone(origPointer))
144 };
145     }
146
147                                 
148         deinit {
149                                         if self.cOpaqueStruct?.is_owned == false {
150
151                                         
152                                         
153                 ChannelHandshakeLimits_free(self.cOpaqueStruct!)
154                                         
155 }
156                                 
157         }
158                         
159     /* STRUCT_METHODS_END */
160
161 }