Update auto-generated bindings to match latest upstream
[ldk-c-bindings] / lightning-c-bindings / src / lightning / ln / features.rs
index 52e06dbab319b5bd0bead7e27d61884c394b90e3..8a61a8536c389dda9f542f075b0753922b7839e3 100644 (file)
@@ -33,6 +33,42 @@ use std::ffi::c_void;
 use bitcoin::hashes::Hash;
 use crate::c_types::*;
 
+}
+/// Checks if two InitFeaturess contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn InitFeatures_eq(a: &InitFeatures, b: &InitFeatures) -> bool {
+       if a.inner == b.inner { return true; }
+       if a.inner.is_null() || b.inner.is_null() { return false; }
+       if unsafe { &*a.inner } == unsafe { &*b.inner } { true } else { false }
+}
+/// Checks if two NodeFeaturess contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn NodeFeatures_eq(a: &NodeFeatures, b: &NodeFeatures) -> bool {
+       if a.inner == b.inner { return true; }
+       if a.inner.is_null() || b.inner.is_null() { return false; }
+       if unsafe { &*a.inner } == unsafe { &*b.inner } { true } else { false }
+}
+/// Checks if two ChannelFeaturess contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn ChannelFeatures_eq(a: &ChannelFeatures, b: &ChannelFeatures) -> bool {
+       if a.inner == b.inner { return true; }
+       if a.inner.is_null() || b.inner.is_null() { return false; }
+       if unsafe { &*a.inner } == unsafe { &*b.inner } { true } else { false }
+}
+/// Checks if two InvoiceFeaturess contain equal inner contents.
+/// This ignores pointers and is_owned flags and looks at the values in fields.
+/// Two objects with NULL inner values will be considered "equal" here.
+#[no_mangle]
+pub extern "C" fn InvoiceFeatures_eq(a: &InvoiceFeatures, b: &InvoiceFeatures) -> bool {
+       if a.inner == b.inner { return true; }
+       if a.inner.is_null() || b.inner.is_null() { return false; }
+       if unsafe { &*a.inner } == unsafe { &*b.inner } { true } else { false }
 }
 impl Clone for InitFeatures {
        fn clone(&self) -> Self {
@@ -354,6 +390,30 @@ pub extern "C" fn InvoiceFeatures_known() -> InvoiceFeatures {
        InvoiceFeatures { inner: Box::into_raw(Box::new(ret)), is_owned: true }
 }
 
+/// Returns whether the `payment_secret` feature is supported.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn InitFeatures_supports_payment_secret(this_arg: &InitFeatures) -> bool {
+       let mut ret = unsafe { &*this_arg.inner }.supports_payment_secret();
+       ret
+}
+
+/// Returns whether the `payment_secret` feature is supported.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn NodeFeatures_supports_payment_secret(this_arg: &NodeFeatures) -> bool {
+       let mut ret = unsafe { &*this_arg.inner }.supports_payment_secret();
+       ret
+}
+
+/// Returns whether the `payment_secret` feature is supported.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn InvoiceFeatures_supports_payment_secret(this_arg: &InvoiceFeatures) -> bool {
+       let mut ret = unsafe { &*this_arg.inner }.supports_payment_secret();
+       ret
+}
+
 #[no_mangle]
 /// Serialize the InitFeatures object into a byte array which can be read by InitFeatures_read
 pub extern "C" fn InitFeatures_write(obj: &InitFeatures) -> crate::c_types::derived::CVec_u8Z {