3 public class UserConfig {
5 public internal(set) var cOpaqueStruct: LDKUserConfig?;
7 /* DEFAULT_CONSTRUCTOR_START */
10 self.cOpaqueStruct = UserConfig_default()
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKUserConfig){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_own_channel_config() -> ChannelHandshakeConfig {
22 return ChannelHandshakeConfig(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUserConfig>) in
23 UserConfig_get_own_channel_config(this_ptrPointer)
27 public func set_own_channel_config(val: ChannelHandshakeConfig) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKUserConfig>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return UserConfig_set_own_channel_config(this_ptrPointer, val.cOpaqueStruct!);
35 public func get_peer_channel_config_limits() -> ChannelHandshakeLimits {
37 return ChannelHandshakeLimits(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUserConfig>) in
38 UserConfig_get_peer_channel_config_limits(this_ptrPointer)
42 public func set_peer_channel_config_limits(val: ChannelHandshakeLimits) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKUserConfig>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return UserConfig_set_peer_channel_config_limits(this_ptrPointer, val.cOpaqueStruct!);
50 public func get_channel_options() -> ChannelConfig {
52 return ChannelConfig(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUserConfig>) in
53 UserConfig_get_channel_options(this_ptrPointer)
57 public func set_channel_options(val: ChannelConfig) -> Void {
59 let this_ptrPointer = UnsafeMutablePointer<LDKUserConfig>.allocate(capacity: 1)
60 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
62 return UserConfig_set_channel_options(this_ptrPointer, val.cOpaqueStruct!);
65 public func get_accept_forwards_to_priv_channels() -> Bool {
67 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUserConfig>) in
68 UserConfig_get_accept_forwards_to_priv_channels(this_ptrPointer)
72 public func set_accept_forwards_to_priv_channels(val: Bool) -> Void {
74 let this_ptrPointer = UnsafeMutablePointer<LDKUserConfig>.allocate(capacity: 1)
75 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
77 return UserConfig_set_accept_forwards_to_priv_channels(this_ptrPointer, val);
80 public func clone(orig: UserConfig) -> UserConfig {
82 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKUserConfig>) in
83 UserConfig(pointer: UserConfig_clone(origPointer))
89 if self.cOpaqueStruct?.is_owned == false {
93 UserConfig_free(self.cOpaqueStruct!)
99 /* STRUCT_METHODS_END */