gstreamer-rs/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs

646 lines
22 KiB
Rust
Raw Normal View History

2020-06-03 12:26:16 +00:00
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
2020-11-22 10:46:23 +00:00
use crate::WebRTCDataChannelState;
use crate::WebRTCPriorityType;
2020-06-03 12:26:16 +00:00
use glib::object::ObjectExt;
use glib::object::ObjectType as ObjectType_;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use std::boxed::Box as Box_;
use std::mem::transmute;
2020-11-22 10:46:23 +00:00
glib::glib_wrapper! {
pub struct WebRTCDataChannel(Object<ffi::GstWebRTCDataChannel, ffi::GstWebRTCDataChannelClass>);
2020-06-03 12:26:16 +00:00
match fn {
2020-11-22 10:46:23 +00:00
get_type => || ffi::gst_webrtc_data_channel_get_type(),
2020-06-03 12:26:16 +00:00
}
}
impl WebRTCDataChannel {
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn close(&self) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_close(self.to_glib_none().0);
2020-06-03 12:26:16 +00:00
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn on_buffered_amount_low(&self) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_on_buffered_amount_low(self.to_glib_none().0);
2020-06-03 12:26:16 +00:00
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn on_close(&self) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_on_close(self.to_glib_none().0);
2020-06-03 12:26:16 +00:00
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn on_message_data(&self, data: Option<&glib::Bytes>) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_on_message_data(
2020-06-03 12:26:16 +00:00
self.to_glib_none().0,
data.to_glib_none().0,
);
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn on_message_string(&self, str: Option<&str>) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_on_message_string(
2020-06-03 12:26:16 +00:00
self.to_glib_none().0,
str.to_glib_none().0,
);
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn on_open(&self) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_on_open(self.to_glib_none().0);
2020-06-03 12:26:16 +00:00
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn send_data(&self, data: Option<&glib::Bytes>) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_send_data(self.to_glib_none().0, data.to_glib_none().0);
2020-06-03 12:26:16 +00:00
}
}
2020-11-25 14:53:45 +00:00
#[cfg(any(feature = "v1_18", all(not(doctest), doc)))]
#[cfg_attr(all(not(doctest), doc), doc(cfg(feature = "v1_18")))]
2020-06-03 12:26:16 +00:00
pub fn send_string(&self, str: Option<&str>) {
unsafe {
2020-11-22 10:46:23 +00:00
ffi::gst_webrtc_data_channel_send_string(self.to_glib_none().0, str.to_glib_none().0);
2020-06-03 12:26:16 +00:00
}
}
pub fn get_property_buffered_amount(&self) -> u64 {
unsafe {
let mut value = Value::from_type(<u64 as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"buffered-amount\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `buffered-amount` getter")
.unwrap()
}
}
pub fn get_property_buffered_amount_low_threshold(&self) -> u64 {
unsafe {
let mut value = Value::from_type(<u64 as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"buffered-amount-low-threshold\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `buffered-amount-low-threshold` getter")
.unwrap()
}
}
pub fn set_property_buffered_amount_low_threshold(&self, buffered_amount_low_threshold: u64) {
unsafe {
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_set_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"buffered-amount-low-threshold\0".as_ptr() as *const _,
Value::from(&buffered_amount_low_threshold).to_glib_none().0,
);
}
}
pub fn get_property_id(&self) -> i32 {
unsafe {
let mut value = Value::from_type(<i32 as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"id\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `id` getter")
.unwrap()
}
}
2020-11-22 10:46:23 +00:00
pub fn get_property_label(&self) -> Option<glib::GString> {
2020-06-03 12:26:16 +00:00
unsafe {
2020-11-22 10:46:23 +00:00
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"label\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `label` getter")
}
}
pub fn get_property_max_packet_lifetime(&self) -> i32 {
unsafe {
let mut value = Value::from_type(<i32 as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"max-packet-lifetime\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `max-packet-lifetime` getter")
.unwrap()
}
}
pub fn get_property_max_retransmits(&self) -> i32 {
unsafe {
let mut value = Value::from_type(<i32 as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"max-retransmits\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `max-retransmits` getter")
.unwrap()
}
}
pub fn get_property_negotiated(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"negotiated\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `negotiated` getter")
.unwrap()
}
}
pub fn get_property_ordered(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"ordered\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `ordered` getter")
.unwrap()
}
}
pub fn get_property_priority(&self) -> WebRTCPriorityType {
unsafe {
let mut value = Value::from_type(<WebRTCPriorityType as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"priority\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `priority` getter")
.unwrap()
}
}
2020-11-22 10:46:23 +00:00
pub fn get_property_protocol(&self) -> Option<glib::GString> {
2020-06-03 12:26:16 +00:00
unsafe {
2020-11-22 10:46:23 +00:00
let mut value = Value::from_type(<glib::GString as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"protocol\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `protocol` getter")
}
}
pub fn get_property_ready_state(&self) -> WebRTCDataChannelState {
unsafe {
let mut value = Value::from_type(<WebRTCDataChannelState as StaticType>::static_type());
2020-11-22 10:46:23 +00:00
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
2020-06-03 12:26:16 +00:00
b"ready-state\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `ready-state` getter")
.unwrap()
}
}
pub fn connect_close<F: Fn(&WebRTCDataChannel) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn close_trampoline<F: Fn(&WebRTCDataChannel) + Send + Sync + 'static>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"close\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
close_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn emit_close(&self) {
let _ = unsafe {
2020-11-22 10:46:23 +00:00
glib::Object::from_glib_borrow(self.as_ptr() as *mut glib::gobject_ffi::GObject)
2020-06-03 12:26:16 +00:00
.emit("close", &[])
.unwrap()
};
}
pub fn connect_on_buffered_amount_low<F: Fn(&WebRTCDataChannel) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn on_buffered_amount_low_trampoline<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"on-buffered-amount-low\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
on_buffered_amount_low_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_on_close<F: Fn(&WebRTCDataChannel) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn on_close_trampoline<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"on-close\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
on_close_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_on_error<F: Fn(&WebRTCDataChannel, &glib::Error) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn on_error_trampoline<
F: Fn(&WebRTCDataChannel, &glib::Error) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
error: *mut glib::ffi::GError,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), &from_glib_borrow(error))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"on-error\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
on_error_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_on_message_data<
F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn on_message_data_trampoline<
F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
data: *mut glib::ffi::GBytes,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(
&from_glib_borrow(this),
Option::<glib::Bytes>::from_glib_borrow(data)
.as_ref()
.as_ref(),
)
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"on-message-data\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
on_message_data_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_on_message_string<
F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn on_message_string_trampoline<
F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
2020-06-03 12:26:16 +00:00
data: *mut libc::c_char,
2020-11-22 10:46:23 +00:00
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(
&from_glib_borrow(this),
2020-11-22 10:46:23 +00:00
Option::<glib::GString>::from_glib_borrow(data)
2020-06-03 12:26:16 +00:00
.as_ref()
.as_deref(),
)
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"on-message-string\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
on_message_string_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_on_open<F: Fn(&WebRTCDataChannel) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn on_open_trampoline<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"on-open\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
on_open_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_send_data<
F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn send_data_trampoline<
F: Fn(&WebRTCDataChannel, Option<&glib::Bytes>) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
data: *mut glib::ffi::GBytes,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(
&from_glib_borrow(this),
Option::<glib::Bytes>::from_glib_borrow(data)
.as_ref()
.as_ref(),
)
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"send-data\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
send_data_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn emit_send_data(&self, data: Option<&glib::Bytes>) {
let _ = unsafe {
2020-11-22 10:46:23 +00:00
glib::Object::from_glib_borrow(self.as_ptr() as *mut glib::gobject_ffi::GObject)
2020-06-03 12:26:16 +00:00
.emit("send-data", &[&data])
.unwrap()
};
}
pub fn connect_send_string<F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn send_string_trampoline<
F: Fn(&WebRTCDataChannel, Option<&str>) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
2020-06-03 12:26:16 +00:00
data: *mut libc::c_char,
2020-11-22 10:46:23 +00:00
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(
&from_glib_borrow(this),
2020-11-22 10:46:23 +00:00
Option::<glib::GString>::from_glib_borrow(data)
2020-06-03 12:26:16 +00:00
.as_ref()
.as_deref(),
)
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"send-string\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
send_string_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn emit_send_string(&self, data: Option<&str>) {
let _ = unsafe {
2020-11-22 10:46:23 +00:00
glib::Object::from_glib_borrow(self.as_ptr() as *mut glib::gobject_ffi::GObject)
2020-06-03 12:26:16 +00:00
.emit("send-string", &[&data])
.unwrap()
};
}
pub fn connect_property_buffered_amount_notify<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_buffered_amount_trampoline<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::buffered-amount\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_buffered_amount_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_property_buffered_amount_low_threshold_notify<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_buffered_amount_low_threshold_trampoline<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::buffered-amount-low-threshold\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_buffered_amount_low_threshold_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
pub fn connect_property_ready_state_notify<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_ready_state_trampoline<
F: Fn(&WebRTCDataChannel) + Send + Sync + 'static,
>(
2020-11-22 10:46:23 +00:00
this: *mut ffi::GstWebRTCDataChannel,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
2020-06-03 12:26:16 +00:00
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::ready-state\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_ready_state_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
}
unsafe impl Send for WebRTCDataChannel {}
unsafe impl Sync for WebRTCDataChannel {}