Initial checkin
[ldk-swift-linux] / LDKSwift / Sources / LDKSwift / structs / PeerHandleError.swift
1 import LDKCHeaders
2
3 public class PeerHandleError {
4
5     public internal(set) var cOpaqueStruct: LDKPeerHandleError?;
6
7         /* DEFAULT_CONSTRUCTOR_START */
8     public init(no_connection_possible_arg: Bool) {
9         
10         self.cOpaqueStruct = PeerHandleError_new(no_connection_possible_arg)
11     }
12     /* DEFAULT_CONSTRUCTOR_END */
13
14     public init(pointer: LDKPeerHandleError){
15                 self.cOpaqueStruct = pointer
16         }
17
18     /* STRUCT_METHODS_START */
19
20     public func get_no_connection_possible() -> Bool {
21         
22         return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKPeerHandleError>) in
23 PeerHandleError_get_no_connection_possible(this_ptrPointer)
24 };
25     }
26
27     public func set_no_connection_possible(val: Bool) -> Void {
28         
29                                                         let this_ptrPointer = UnsafeMutablePointer<LDKPeerHandleError>.allocate(capacity: 1)
30                                                         this_ptrPointer.initialize(to: self.cOpaqueStruct!)
31                                                 
32         return PeerHandleError_set_no_connection_possible(this_ptrPointer, val);
33     }
34
35     public func clone(orig: PeerHandleError) -> PeerHandleError {
36         
37         return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKPeerHandleError>) in
38 PeerHandleError(pointer: PeerHandleError_clone(origPointer))
39 };
40     }
41
42                                 
43         deinit {
44                                         if self.cOpaqueStruct?.is_owned == false {
45
46                                         
47                                         
48                 PeerHandleError_free(self.cOpaqueStruct!)
49                                         
50 }
51                                 
52         }
53                         
54     /* STRUCT_METHODS_END */
55
56 }