:right-sidebar: True UnixCredentialsMessage =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.26 .. class:: UnixCredentialsMessage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.SocketControlMessage`, :class:`~gi.repository.GObject.Object` This :obj:`~gi.repository.Gio.SocketControlMessage` contains a :obj:`~gi.repository.Gio.Credentials` instance. It may be sent using :obj:`~gi.repository.Gio.Socket.send_message` and received using :obj:`~gi.repository.Gio.Socket.receive_message` over UNIX sockets (ie: sockets in the ``G_SOCKET_FAMILY_UNIX`` family). For an easier way to send and receive credentials over stream-oriented UNIX sockets, see :obj:`~gi.repository.Gio.UnixConnection.send_credentials` and :obj:`~gi.repository.Gio.UnixConnection.receive_credentials`\. To receive credentials of a foreign process connected to a socket, use :obj:`~gi.repository.Gio.Socket.get_credentials`\. Since GLib 2.72, ``GUnixCredentialMessage`` is available on all platforms. It requires underlying system support (such as Windows 10 with ``AF_UNIX``\) at run time. Before GLib 2.72, ```` belonged to the UNIX-specific GIO interfaces, thus you had to use the ``gio-unix-2.0.pc`` pkg-config file when using it. This is no longer necessary since GLib 2.72. Constructors ------------ .. rst-class:: interim-class .. class:: UnixCredentialsMessage :no-index: .. classmethod:: new() -> ~gi.repository.Gio.SocketControlMessage Creates a new :obj:`~gi.repository.Gio.UnixCredentialsMessage` with credentials matching the current processes. .. versionadded:: 2.26 .. classmethod:: new_with_credentials(credentials: ~gi.repository.Gio.Credentials) -> ~gi.repository.Gio.SocketControlMessage Creates a new :obj:`~gi.repository.Gio.UnixCredentialsMessage` holding ``credentials``\. .. versionadded:: 2.26 :param credentials: A :obj:`~gi.repository.Gio.Credentials` object. Methods ------- .. rst-class:: interim-class .. class:: UnixCredentialsMessage :no-index: .. method:: get_credentials() -> ~gi.repository.Gio.Credentials Gets the credentials stored in ``message``\. .. versionadded:: 2.26 .. classmethod:: is_supported() -> bool Checks if passing :obj:`~gi.repository.Gio.Credentials` on a :obj:`~gi.repository.Gio.Socket` is supported on this platform. .. versionadded:: 2.26 Properties ---------- .. rst-class:: interim-class .. class:: UnixCredentialsMessage :no-index: .. attribute:: props.credentials :type: ~gi.repository.Gio.Credentials The type of the None singleton. .. versionadded:: 2.26 Fields ------ .. rst-class:: interim-class .. class:: UnixCredentialsMessage :no-index: .. attribute:: parent_instance .. attribute:: priv