3 public class ReplyChannelRange {
5 public internal(set) var cOpaqueStruct: LDKReplyChannelRange?;
7 /* DEFAULT_CONSTRUCTOR_START */
8 public init(chain_hash_arg: [UInt8], first_blocknum_arg: UInt32, number_of_blocks_arg: UInt32, sync_complete_arg: Bool, short_channel_ids_arg: [UInt64]) {
10 self.cOpaqueStruct = ReplyChannelRange_new(Bindings.new_LDKThirtyTwoBytes(array: chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, Bindings.new_LDKCVec_u64Z(array: short_channel_ids_arg))
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKReplyChannelRange){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_chain_hash() -> [UInt8] {
22 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKReplyChannelRange>) in
23 ReplyChannelRange_get_chain_hash(this_ptrPointer)
27 public func set_chain_hash(val: [UInt8]) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKReplyChannelRange>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return ReplyChannelRange_set_chain_hash(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
35 public func get_first_blocknum() -> UInt32 {
37 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKReplyChannelRange>) in
38 ReplyChannelRange_get_first_blocknum(this_ptrPointer)
42 public func set_first_blocknum(val: UInt32) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKReplyChannelRange>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return ReplyChannelRange_set_first_blocknum(this_ptrPointer, val);
50 public func get_number_of_blocks() -> UInt32 {
52 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKReplyChannelRange>) in
53 ReplyChannelRange_get_number_of_blocks(this_ptrPointer)
57 public func set_number_of_blocks(val: UInt32) -> Void {
59 let this_ptrPointer = UnsafeMutablePointer<LDKReplyChannelRange>.allocate(capacity: 1)
60 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
62 return ReplyChannelRange_set_number_of_blocks(this_ptrPointer, val);
65 public func get_sync_complete() -> Bool {
67 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKReplyChannelRange>) in
68 ReplyChannelRange_get_sync_complete(this_ptrPointer)
72 public func set_sync_complete(val: Bool) -> Void {
74 let this_ptrPointer = UnsafeMutablePointer<LDKReplyChannelRange>.allocate(capacity: 1)
75 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
77 return ReplyChannelRange_set_sync_complete(this_ptrPointer, val);
80 public func set_short_channel_ids(val: [UInt64]) -> Void {
82 let this_ptrPointer = UnsafeMutablePointer<LDKReplyChannelRange>.allocate(capacity: 1)
83 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
85 return ReplyChannelRange_set_short_channel_ids(this_ptrPointer, Bindings.new_LDKCVec_u64Z(array: val));
88 public func clone(orig: ReplyChannelRange) -> ReplyChannelRange {
90 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKReplyChannelRange>) in
91 ReplyChannelRange(pointer: ReplyChannelRange_clone(origPointer))
95 public func read(ser: [UInt8]) -> Result_ReplyChannelRangeDecodeErrorZ {
97 return Result_ReplyChannelRangeDecodeErrorZ(pointer: ReplyChannelRange_read(Bindings.new_LDKu8slice(array: ser)));
100 public func write(obj: ReplyChannelRange) -> [UInt8] {
102 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKReplyChannelRange>) in
103 ReplyChannelRange_write(objPointer)
109 if self.cOpaqueStruct?.is_owned == false {
113 ReplyChannelRange_free(self.cOpaqueStruct!)
119 /* STRUCT_METHODS_END */