// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.InetAddress.html).
pub type InetAddress
///|
pub(open) trait IInetAddress {
fn as_inet_address(Self) -> InetAddress
fn equal(Self, &IInetAddress) -> Bool = _
fn get_family(Self) -> SocketFamily = _
fn get_flowinfo(Self) -> UInt = _
fn get_is_any(Self) -> Bool = _
fn get_is_link_local(Self) -> Bool = _
fn get_is_loopback(Self) -> Bool = _
fn get_is_mc_global(Self) -> Bool = _
fn get_is_mc_link_local(Self) -> Bool = _
fn get_is_mc_node_local(Self) -> Bool = _
fn get_is_mc_org_local(Self) -> Bool = _
fn get_is_mc_site_local(Self) -> Bool = _
fn get_is_multicast(Self) -> Bool = _
fn get_is_site_local(Self) -> Bool = _
fn get_native_size(Self) -> UInt64 = _
fn get_scope_id(Self) -> UInt = _
fn to_string(Self) -> String = _
}
///|
pub impl IInetAddress for InetAddress with fn as_inet_address(self) {
self
}
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.InetAddress.new_any.html).
pub extern "c" fn InetAddress::new_any(family : SocketFamily) -> InetAddress = "moonbit_g_inet_address_new_any"
///|
#borrow(bytes)
extern "c" fn moonbit_g_inet_address_new_from_bytes(
bytes : Ref[FixedArray[UInt]],
family : SocketFamily,
) -> InetAddress = "moonbit_g_inet_address_new_from_bytes"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.InetAddress.new_from_bytes.html).
pub fn InetAddress::new_from_bytes(
bytes : FixedArray[UInt],
family : SocketFamily,
) -> InetAddress {
let bytes_ref : Ref[FixedArray[UInt]] = Ref(bytes)
moonbit_g_inet_address_new_from_bytes(bytes_ref, family)
}
///|
#borrow(bytes)
extern "c" fn moonbit_g_inet_address_new_from_bytes_with_ipv6_info(
bytes : Ref[FixedArray[UInt]],
family : SocketFamily,
flowinfo : UInt,
scope_id : UInt,
) -> InetAddress = "moonbit_g_inet_address_new_from_bytes_with_ipv6_info"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.InetAddress.new_from_bytes_with_ipv6_info.html).
pub fn InetAddress::new_from_bytes_with_ipv6_info(
bytes : FixedArray[UInt],
family : SocketFamily,
flowinfo : UInt,
scope_id : UInt,
) -> InetAddress {
let bytes_ref : Ref[FixedArray[UInt]] = Ref(bytes)
moonbit_g_inet_address_new_from_bytes_with_ipv6_info(
bytes_ref, family, flowinfo, scope_id,
)
}
///|
#borrow(string)
extern "c" fn moonbit_g_inet_address_new_from_string(
string : Bytes,
) -> @glib.Nullable[InetAddress] = "moonbit_g_inet_address_new_from_string"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.InetAddress.new_from_string.html).
pub fn InetAddress::new_from_string(string : String) -> InetAddress? {
let raw_result = moonbit_g_inet_address_new_from_string(
@encoding/utf8.encode(string),
)
raw_result.to_option()
}
///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.InetAddress.new_loopback.html).
pub extern "c" fn InetAddress::new_loopback(
family : SocketFamily,
) -> InetAddress = "moonbit_g_inet_address_new_loopback"
///|
#borrow(self_, other_address)
extern "c" fn moonbit_g_inet_address_equal(
self_ : InetAddress,
other_address : InetAddress,
) -> Bool = "moonbit_g_inet_address_equal"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.equal.html).
pub fn InetAddress::equal(
self : InetAddress,
other_address : &IInetAddress,
) -> Bool {
moonbit_g_inet_address_equal(self, other_address.as_inet_address())
}
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_family.html).
#borrow(self)
pub extern "c" fn InetAddress::get_family(self : InetAddress) -> SocketFamily = "moonbit_g_inet_address_get_family"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_flowinfo.html).
#borrow(self)
pub extern "c" fn InetAddress::get_flowinfo(self : InetAddress) -> UInt = "moonbit_g_inet_address_get_flowinfo"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_any.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_any(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_any"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_link_local.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_link_local(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_link_local"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_loopback.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_loopback(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_loopback"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_mc_global.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_mc_global(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_mc_global"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_mc_link_local.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_mc_link_local(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_mc_link_local"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_mc_node_local.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_mc_node_local(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_mc_node_local"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_mc_org_local.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_mc_org_local(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_mc_org_local"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_mc_site_local.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_mc_site_local(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_mc_site_local"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_multicast.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_multicast(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_multicast"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_is_site_local.html).
#borrow(self)
pub extern "c" fn InetAddress::get_is_site_local(self : InetAddress) -> Bool = "moonbit_g_inet_address_get_is_site_local"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_native_size.html).
#borrow(self)
pub extern "c" fn InetAddress::get_native_size(self : InetAddress) -> UInt64 = "moonbit_g_inet_address_get_native_size"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.get_scope_id.html).
#borrow(self)
pub extern "c" fn InetAddress::get_scope_id(self : InetAddress) -> UInt = "moonbit_g_inet_address_get_scope_id"
///|
#borrow(self_)
extern "c" fn moonbit_g_inet_address_to_string(self_ : InetAddress) -> Bytes = "moonbit_g_inet_address_to_string"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.InetAddress.to_string.html).
pub fn InetAddress::to_string(self : InetAddress) -> String {
@encoding/utf8.decode_lossy(moonbit_g_inet_address_to_string(self))
}
///|
impl IInetAddress with fn equal(self, other_address) -> Bool {
self.as_inet_address().equal(other_address)
}
///|
impl IInetAddress with fn get_family(self) -> SocketFamily {
self.as_inet_address().get_family()
}
///|
impl IInetAddress with fn get_flowinfo(self) -> UInt {
self.as_inet_address().get_flowinfo()
}
///|
impl IInetAddress with fn get_is_any(self) -> Bool {
self.as_inet_address().get_is_any()
}
///|
impl IInetAddress with fn get_is_link_local(self) -> Bool {
self.as_inet_address().get_is_link_local()
}
///|
impl IInetAddress with fn get_is_loopback(self) -> Bool {
self.as_inet_address().get_is_loopback()
}
///|
impl IInetAddress with fn get_is_mc_global(self) -> Bool {
self.as_inet_address().get_is_mc_global()
}
///|
impl IInetAddress with fn get_is_mc_link_local(self) -> Bool {
self.as_inet_address().get_is_mc_link_local()
}
///|
impl IInetAddress with fn get_is_mc_node_local(self) -> Bool {
self.as_inet_address().get_is_mc_node_local()
}
///|
impl IInetAddress with fn get_is_mc_org_local(self) -> Bool {
self.as_inet_address().get_is_mc_org_local()
}
///|
impl IInetAddress with fn get_is_mc_site_local(self) -> Bool {
self.as_inet_address().get_is_mc_site_local()
}
///|
impl IInetAddress with fn get_is_multicast(self) -> Bool {
self.as_inet_address().get_is_multicast()
}
///|
impl IInetAddress with fn get_is_site_local(self) -> Bool {
self.as_inet_address().get_is_site_local()
}
///|
impl IInetAddress with fn get_native_size(self) -> UInt64 {
self.as_inet_address().get_native_size()
}
///|
impl IInetAddress with fn get_scope_id(self) -> UInt {
self.as_inet_address().get_scope_id()
}
///|
impl IInetAddress with fn to_string(self) -> String {
self.as_inet_address().to_string()
}
///|
pub fn InetAddress::as_gobject_object(self : InetAddress) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for InetAddress with fn as_object(self) {
self.as_gobject_object()
}