:right-sidebar: True NetworkService =================================================================== .. currentmodule:: gi.repository.Gio .. class:: NetworkService(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.SocketConnectable` :Constructors: :: NetworkService(**properties) new(service:str, protocol:str, domain:str) -> Gio.NetworkService Constructors ------------ .. rst-class:: interim-class .. class:: NetworkService :no-index: .. classmethod:: new(service: str, protocol: str, domain: str) -> ~gi.repository.Gio.NetworkService Creates a new :obj:`~gi.repository.Gio.NetworkService` representing the given ``service``, ``protocol``, and ``domain``. This will initially be unresolved; use the :obj:`~gi.repository.Gio.SocketConnectable` interface to resolve it. .. versionadded:: 2.22 :param service: the service type to look up (eg, "ldap") :param protocol: the networking protocol to use for ``service`` (eg, "tcp") :param domain: the DNS domain to look up the service in Methods ------- .. rst-class:: interim-class .. class:: NetworkService :no-index: .. method:: get_domain() -> str Gets the domain that ``srv`` serves. This might be either UTF-8 or ASCII-encoded, depending on what ``srv`` was created with. .. versionadded:: 2.22 .. method:: get_protocol() -> str Gets ``srv``'s protocol name (eg, "tcp"). .. versionadded:: 2.22 .. method:: get_scheme() -> str Gets the URI scheme used to resolve proxies. By default, the service name is used as scheme. .. versionadded:: 2.26 .. method:: get_service() -> str Gets ``srv``'s service name (eg, "ldap"). .. versionadded:: 2.22 .. method:: set_scheme(scheme: str) -> None Set's the URI scheme used to resolve proxies. By default, the service name is used as scheme. .. versionadded:: 2.26 :param scheme: a URI scheme Properties ---------- .. rst-class:: interim-class .. class:: NetworkService :no-index: .. attribute:: props.domain :type: str Network domain, for example ``example.com``. .. versionadded:: 2.22 .. attribute:: props.protocol :type: str Network protocol, for example ``tcp``. .. versionadded:: 2.22 .. attribute:: props.scheme :type: str Network scheme (default is to use service). .. versionadded:: 2.22 .. attribute:: props.service :type: str Service name, for example ``ldap``. .. versionadded:: 2.22 Fields ------ .. rst-class:: interim-class .. class:: NetworkService :no-index: .. attribute:: parent_instance .. attribute:: priv