// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.TcpConnection.html).
pub type TcpConnection

///|
pub(open) trait ITcpConnection {
  fn as_tcp_connection(Self) -> TcpConnection
  fn get_graceful_disconnect(Self) -> Bool = _
  fn set_graceful_disconnect(Self, Bool) -> Unit = _
}

///|
pub impl ITcpConnection for TcpConnection with fn as_tcp_connection(self) {
  self
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TcpConnection.get_graceful_disconnect.html).
#borrow(self)
pub extern "c" fn TcpConnection::get_graceful_disconnect(
  self : TcpConnection,
) -> Bool = "moonbit_g_tcp_connection_get_graceful_disconnect"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.TcpConnection.set_graceful_disconnect.html).
#borrow(self)
pub extern "c" fn TcpConnection::set_graceful_disconnect(
  self : TcpConnection,
  graceful_disconnect : Bool,
) = "moonbit_g_tcp_connection_set_graceful_disconnect"

///|
impl ITcpConnection with fn get_graceful_disconnect(self) -> Bool {
  self.as_tcp_connection().get_graceful_disconnect()
}

///|
impl ITcpConnection with fn set_graceful_disconnect(self, graceful_disconnect) -> Unit {
  self.as_tcp_connection().set_graceful_disconnect(graceful_disconnect)
}

///|
pub fn TcpConnection::as_socket_connection(
  self : TcpConnection,
) -> SocketConnection = "%identity"

///|
pub impl ISocketConnection for TcpConnection with fn as_socket_connection(self) {
  self.as_socket_connection()
}

///|
pub fn TcpConnection::as_io_stream(self : TcpConnection) -> IOStream = "%identity"

///|
pub impl IIOStream for TcpConnection with fn as_io_stream(self) {
  self.as_io_stream()
}

///|
pub fn TcpConnection::as_gobject_object(
  self : TcpConnection,
) -> @gobject.Object = "%identity"

///|
pub impl @gobject.IObject for TcpConnection with fn as_object(self) {
  self.as_gobject_object()
}