Initial checkin
[ldk-swift-linux] / LDKSwift / Sources / LDKSwift / structs / ChannelHandshakeConfig.swift
1 import LDKCHeaders
2
3 public class ChannelHandshakeConfig {
4
5     public internal(set) var cOpaqueStruct: LDKChannelHandshakeConfig?;
6
7         /* DEFAULT_CONSTRUCTOR_START */
8     public init() {
9         
10         self.cOpaqueStruct = ChannelHandshakeConfig_default()
11     }
12     /* DEFAULT_CONSTRUCTOR_END */
13
14     public init(pointer: LDKChannelHandshakeConfig){
15                 self.cOpaqueStruct = pointer
16         }
17
18     /* STRUCT_METHODS_START */
19
20     public func get_minimum_depth() -> UInt32 {
21         
22         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
23 ChannelHandshakeConfig_get_minimum_depth(this_ptrPointer)
24 };
25     }
26
27     public func set_minimum_depth(val: UInt32) -> Void {
28         
29                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeConfig>.allocate(capacity: 1)
30                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
31                                                 
32         return ChannelHandshakeConfig_set_minimum_depth(this_ptrPointer, val);
33     }
34
35     public func get_our_to_self_delay() -> UInt16 {
36         
37         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
38 ChannelHandshakeConfig_get_our_to_self_delay(this_ptrPointer)
39 };
40     }
41
42     public func set_our_to_self_delay(val: UInt16) -> Void {
43         
44                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeConfig>.allocate(capacity: 1)
45                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
46                                                 
47         return ChannelHandshakeConfig_set_our_to_self_delay(this_ptrPointer, val);
48     }
49
50     public func get_our_htlc_minimum_msat() -> UInt64 {
51         
52         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
53 ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptrPointer)
54 };
55     }
56
57     public func set_our_htlc_minimum_msat(val: UInt64) -> Void {
58         
59                                                         let this_ptrPointer = UnsafeMutablePointer<LDKChannelHandshakeConfig>.allocate(capacity: 1)
60                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
61                                                 
62         return ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptrPointer, val);
63     }
64
65     public func clone(orig: ChannelHandshakeConfig) -> ChannelHandshakeConfig {
66         
67         return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKChannelHandshakeConfig>) in
68 ChannelHandshakeConfig(pointer: ChannelHandshakeConfig_clone(origPointer))
69 };
70     }
71
72                                 
73         deinit {
74                                         if self.cOpaqueStruct?.is_owned == false {
75
76                                         
77                                         
78                 ChannelHandshakeConfig_free(self.cOpaqueStruct!)
79                                         
80 }
81                                 
82         }
83                         
84     /* STRUCT_METHODS_END */
85
86 }