Gio.Resolver¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | get_default() | 
| lookup_by_address(address, cancellable) | |
| lookup_by_address_async(address, cancellable, callback, *user_data) | |
| lookup_by_address_finish(result) | |
| lookup_by_name(hostname, cancellable) | |
| lookup_by_name_async(hostname, cancellable, callback, *user_data) | |
| lookup_by_name_finish(result) | |
| lookup_by_name_with_flags(hostname, flags, cancellable) | |
| lookup_by_name_with_flags_async(hostname, flags, cancellable, callback, *user_data) | |
| lookup_by_name_with_flags_finish(result) | |
| lookup_records(rrname, record_type, cancellable) | |
| lookup_records_async(rrname, record_type, cancellable, callback, *user_data) | |
| lookup_records_finish(result) | |
| lookup_service(service, protocol, domain, cancellable) | |
| lookup_service_async(service, protocol, domain, cancellable, callback, *user_data) | |
| lookup_service_finish(result) | |
| set_default() | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
| do_lookup_by_address(address, cancellable) | |
| do_lookup_by_address_async(address, cancellable, callback, *user_data) | |
| do_lookup_by_address_finish(result) | |
| do_lookup_by_name(hostname, cancellable) | |
| do_lookup_by_name_async(hostname, cancellable, callback, *user_data) | |
| do_lookup_by_name_finish(result) | |
| do_lookup_by_name_with_flags(hostname, flags, cancellable) | |
| do_lookup_by_name_with_flags_async(hostname, flags, cancellable, callback, *user_data) | |
| do_lookup_by_name_with_flags_finish(result) | |
| do_lookup_records(rrname, record_type, cancellable) | |
| do_lookup_records_async(rrname, record_type, cancellable, callback, *user_data) | |
| do_lookup_records_finish(result) | |
| do_lookup_service_async(rrname, cancellable, callback, *user_data) | |
| do_lookup_service_finish(result) | |
| do_reload() | 
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| reload | Emitted when the resolver notices that the system resolver configuration has changed. | 
Class Details¶
- 
class Gio.Resolver(**kwargs)¶
- Bases: - GObject.Object- Abstract: - Yes - Structure: - Gio.ResolverClass- Gio.Resolverprovides cancellable synchronous and asynchronous DNS resolution, for hostnames (- Gio.Resolver.lookup_by_address(),- Gio.Resolver.lookup_by_name() and their async variants) and SRV (service) records (- Gio.Resolver.lookup_service()).- Gio.NetworkAddressand- Gio.NetworkServiceprovide wrappers around- Gio.Resolverfunctionality that also implement- Gio.SocketConnectable, making it easy to connect to a remote host/service.- 
classmethod get_default()[source]¶
- Returns: - the default - Gio.Resolver.- Return type: - Gio.Resolver- Gets the default - Gio.Resolver. You should unref it when you are done with it.- Gio.Resolvermay use its reference count as a hint about how many threads it should allocate for concurrent DNS resolutions.- New in version 2.22. 
 - 
lookup_by_address(address, cancellable)[source]¶
- Parameters: - address (Gio.InetAddress) – the address to reverse-resolve
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Raises: - Returns: - a hostname (either ASCII-only, or in ASCII-encoded form), or - Noneon error.- Return type: - Synchronously reverse-resolves address to determine its associated hostname. - If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverError.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
- address (
 - 
lookup_by_address_async(address, cancellable, callback, *user_data)[source]¶
- Parameters: - address (Gio.InetAddress) – the address to reverse-resolve
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously reverse-resolving address to determine its associated hostname, and eventually calls callback, which must call - Gio.Resolver.lookup_by_address_finish() to get the final result.- New in version 2.22. 
- address (
 - 
lookup_by_address_finish(result)[source]¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Raises: - GLib.Error- Returns: - a hostname (either ASCII-only, or in ASCII-encoded form), or - Noneon error.- Return type: - str- Retrieves the result of a previous call to - Gio.Resolver.lookup_by_address_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
 - 
lookup_by_name(hostname, cancellable)[source]¶
- Parameters: - hostname (str) – the hostname to look up
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Raises: - Returns: - a non-empty - GLib.Listof- Gio.InetAddress, or- Noneon error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)- Return type: - Synchronously resolves hostname to determine its associated IP address(es). hostname may be an ASCII-only or UTF-8 hostname, or the textual form of an IP address (in which case this just becomes a wrapper around - Gio.InetAddress.new_from_string()).- On success, - Gio.Resolver.lookup_by_name() will return a non-empty- GLib.Listof- Gio.InetAddress, sorted in order of preference and guaranteed to not contain duplicates. That is, if using the result to connect to hostname, you should attempt to connect to the first address first, then the second if the first fails, etc. If you are using the result to listen on a socket, it is appropriate to add each result using e.g.- Gio.SocketListener.add_address().- If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverErrorand- Nonewill be returned.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- If you are planning to connect to a socket on the resolved IP address, it may be easier to create a - Gio.NetworkAddressand use its- Gio.SocketConnectableinterface.- New in version 2.22. 
- hostname (
 - 
lookup_by_name_async(hostname, cancellable, callback, *user_data)[source]¶
- Parameters: - hostname (str) – the hostname to look up the address of
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call - Gio.Resolver.lookup_by_name_finish() to get the result. See- Gio.Resolver.lookup_by_name() for more details.- New in version 2.22. 
- hostname (
 - 
lookup_by_name_finish(result)[source]¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Raises: - GLib.Error- Returns: - a - GLib.Listof- Gio.InetAddress, or- Noneon error. See- Gio.Resolver.lookup_by_name() for more details.- Return type: - [ - Gio.InetAddress]- Retrieves the result of a call to - Gio.Resolver.lookup_by_name_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
 - 
lookup_by_name_with_flags(hostname, flags, cancellable)[source]¶
- Parameters: - hostname (str) – the hostname to look up
- flags (Gio.ResolverNameLookupFlags) – extraGio.ResolverNameLookupFlagsfor the lookup
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Raises: - Returns: - a non-empty - GLib.Listof- Gio.InetAddress, or- Noneon error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)- Return type: - This differs from - Gio.Resolver.lookup_by_name() in that you can modify the lookup behavior with flags. For example this can be used to limit results with- Gio.ResolverNameLookupFlags.IPV4_ONLY.- New in version 2.60. 
- hostname (
 - 
lookup_by_name_with_flags_async(hostname, flags, cancellable, callback, *user_data)[source]¶
- Parameters: - hostname (str) – the hostname to look up the address of
- flags (Gio.ResolverNameLookupFlags) – extraGio.ResolverNameLookupFlagsfor the lookup
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call - Gio.Resolver.lookup_by_name_with_flags_finish() to get the result. See- Gio.Resolver.lookup_by_name() for more details.- New in version 2.60. 
- hostname (
 - 
lookup_by_name_with_flags_finish(result)[source]¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Raises: - GLib.Error- Returns: - a - GLib.Listof- Gio.InetAddress, or- Noneon error. See- Gio.Resolver.lookup_by_name() for more details.- Return type: - [ - Gio.InetAddress]- Retrieves the result of a call to - Gio.Resolver.lookup_by_name_with_flags_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.60. 
 - 
lookup_records(rrname, record_type, cancellable)[source]¶
- Parameters: - rrname (str) – the DNS name to look up the record for
- record_type (Gio.ResolverRecordType) – the type of DNS record to look up
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Raises: - Returns: - a non-empty - GLib.Listof- GLib.Variant, or- Noneon error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with- GLib.Variant.unref() to do this.)- Return type: - Synchronously performs a DNS record lookup for the given rrname and returns a list of records as - GLib.Varianttuples. See- Gio.ResolverRecordTypefor information on what the records contain for each record_type.- If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverErrorand- Nonewill be returned.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.34. 
- rrname (
 - 
lookup_records_async(rrname, record_type, cancellable, callback, *user_data)[source]¶
- Parameters: - rrname (str) – the DNS name to look up the record for
- record_type (Gio.ResolverRecordType) – the type of DNS record to look up
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously performing a DNS lookup for the given rrname, and eventually calls callback, which must call - Gio.Resolver.lookup_records_finish() to get the final result. See- Gio.Resolver.lookup_records() for more details.- New in version 2.34. 
- rrname (
 - 
lookup_records_finish(result)[source]¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Raises: - GLib.Error- Returns: - a non-empty - GLib.Listof- GLib.Variant, or- Noneon error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with- GLib.Variant.unref() to do this.)- Return type: - [ - GLib.Variant]- Retrieves the result of a previous call to - Gio.Resolver.lookup_records_async(). Returns a non-empty list of records as- GLib.Varianttuples. See- Gio.ResolverRecordTypefor information on what the records contain.- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.34. 
 - 
lookup_service(service, protocol, domain, cancellable)[source]¶
- Parameters: - service (str) – the service type to look up (eg, “ldap”)
- protocol (str) – the networking protocol to use for service (eg, “tcp”)
- domain (str) – the DNS domain to look up the service in
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Raises: - Returns: - a non-empty - GLib.Listof- Gio.SrvTarget, or- Noneon error. You must free each of the targets and the list when you are done with it. (You can use g_resolver_free_targets() to do this.)- Return type: - Synchronously performs a DNS SRV lookup for the given service and protocol in the given domain and returns an array of - Gio.SrvTarget. domain may be an ASCII-only or UTF-8 hostname. Note also that the service and protocol arguments do not include the leading underscore that appears in the actual DNS entry.- On success, - Gio.Resolver.lookup_service() will return a non-empty- GLib.Listof- Gio.SrvTarget, sorted in order of preference. (That is, you should attempt to connect to the first target first, then the second if the first fails, etc.)- If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverErrorand- Nonewill be returned.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- If you are planning to connect to the service, it is usually easier to create a - Gio.NetworkServiceand use its- Gio.SocketConnectableinterface.- New in version 2.22. 
- service (
 - 
lookup_service_async(service, protocol, domain, cancellable, callback, *user_data)[source]¶
- Parameters: - service (str) – the service type to look up (eg, “ldap”)
- protocol (str) – the networking protocol to use for service (eg, “tcp”)
- domain (str) – the DNS domain to look up the service in
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously performing a DNS SRV lookup for the given service and protocol in the given domain, and eventually calls callback, which must call - Gio.Resolver.lookup_service_finish() to get the final result. See- Gio.Resolver.lookup_service() for more details.- New in version 2.22. 
- service (
 - 
lookup_service_finish(result)[source]¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Raises: - GLib.Error- Returns: - a non-empty - GLib.Listof- Gio.SrvTarget, or- Noneon error. See- Gio.Resolver.lookup_service() for more details.- Return type: - [ - Gio.SrvTarget]- Retrieves the result of a previous call to - Gio.Resolver.lookup_service_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
 - 
set_default()[source]¶
- Sets self to be the application’s default resolver (reffing self, and unreffing the previous default resolver, if any). Future calls to - Gio.Resolver.get_default() will return this resolver.- This can be used if an application wants to perform any sort of DNS caching or “pinning”; it can implement its own - Gio.Resolverthat calls the original default resolver for DNS operations, and implements its own cache policies on top of that, and then set itself as the default resolver for all later code to use.- New in version 2.22. 
 - 
do_lookup_by_address(address, cancellable) virtual¶
- Parameters: - address (Gio.InetAddress) – the address to reverse-resolve
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Returns: - a hostname (either ASCII-only, or in ASCII-encoded form), or - Noneon error.- Return type: - Synchronously reverse-resolves address to determine its associated hostname. - If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverError.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
- address (
 - 
do_lookup_by_address_async(address, cancellable, callback, *user_data) virtual¶
- Parameters: - address (Gio.InetAddress) – the address to reverse-resolve
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously reverse-resolving address to determine its associated hostname, and eventually calls callback, which must call - Gio.Resolver.lookup_by_address_finish() to get the final result.- New in version 2.22. 
- address (
 - 
do_lookup_by_address_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Returns: - a hostname (either ASCII-only, or in ASCII-encoded form), or - Noneon error.- Return type: - str- Retrieves the result of a previous call to - Gio.Resolver.lookup_by_address_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
 - 
do_lookup_by_name(hostname, cancellable) virtual¶
- Parameters: - hostname (str) – the hostname to look up
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Returns: - a non-empty - GLib.Listof- Gio.InetAddress, or- Noneon error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)- Return type: - Synchronously resolves hostname to determine its associated IP address(es). hostname may be an ASCII-only or UTF-8 hostname, or the textual form of an IP address (in which case this just becomes a wrapper around - Gio.InetAddress.new_from_string()).- On success, - Gio.Resolver.lookup_by_name() will return a non-empty- GLib.Listof- Gio.InetAddress, sorted in order of preference and guaranteed to not contain duplicates. That is, if using the result to connect to hostname, you should attempt to connect to the first address first, then the second if the first fails, etc. If you are using the result to listen on a socket, it is appropriate to add each result using e.g.- Gio.SocketListener.add_address().- If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverErrorand- Nonewill be returned.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- If you are planning to connect to a socket on the resolved IP address, it may be easier to create a - Gio.NetworkAddressand use its- Gio.SocketConnectableinterface.- New in version 2.22. 
- hostname (
 - 
do_lookup_by_name_async(hostname, cancellable, callback, *user_data) virtual¶
- Parameters: - hostname (str) – the hostname to look up the address of
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call - Gio.Resolver.lookup_by_name_finish() to get the result. See- Gio.Resolver.lookup_by_name() for more details.- New in version 2.22. 
- hostname (
 - 
do_lookup_by_name_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Returns: - a - GLib.Listof- Gio.InetAddress, or- Noneon error. See- Gio.Resolver.lookup_by_name() for more details.- Return type: - [ - Gio.InetAddress]- Retrieves the result of a call to - Gio.Resolver.lookup_by_name_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
 - 
do_lookup_by_name_with_flags(hostname, flags, cancellable) virtual¶
- Parameters: - hostname (str) – the hostname to look up
- flags (Gio.ResolverNameLookupFlags) – extraGio.ResolverNameLookupFlagsfor the lookup
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Returns: - a non-empty - GLib.Listof- Gio.InetAddress, or- Noneon error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)- Return type: - This differs from - Gio.Resolver.lookup_by_name() in that you can modify the lookup behavior with flags. For example this can be used to limit results with- Gio.ResolverNameLookupFlags.IPV4_ONLY.- New in version 2.60. 
- hostname (
 - 
do_lookup_by_name_with_flags_async(hostname, flags, cancellable, callback, *user_data) virtual¶
- Parameters: - hostname (str) – the hostname to look up the address of
- flags (Gio.ResolverNameLookupFlags) – extraGio.ResolverNameLookupFlagsfor the lookup
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call - Gio.Resolver.lookup_by_name_with_flags_finish() to get the result. See- Gio.Resolver.lookup_by_name() for more details.- New in version 2.60. 
- hostname (
 - 
do_lookup_by_name_with_flags_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Returns: - a - GLib.Listof- Gio.InetAddress, or- Noneon error. See- Gio.Resolver.lookup_by_name() for more details.- Return type: - [ - Gio.InetAddress]- Retrieves the result of a call to - Gio.Resolver.lookup_by_name_with_flags_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.60. 
 - 
do_lookup_records(rrname, record_type, cancellable) virtual¶
- Parameters: - rrname (str) – the DNS name to look up the record for
- record_type (Gio.ResolverRecordType) – the type of DNS record to look up
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
 - Returns: - a non-empty - GLib.Listof- GLib.Variant, or- Noneon error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with- GLib.Variant.unref() to do this.)- Return type: - Synchronously performs a DNS record lookup for the given rrname and returns a list of records as - GLib.Varianttuples. See- Gio.ResolverRecordTypefor information on what the records contain for each record_type.- If the DNS resolution fails, error (if non- - None) will be set to a value from- Gio.ResolverErrorand- Nonewill be returned.- If cancellable is non- - None, it can be used to cancel the operation, in which case error (if non-- None) will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.34. 
- rrname (
 - 
do_lookup_records_async(rrname, record_type, cancellable, callback, *user_data) virtual¶
- Parameters: - rrname (str) – the DNS name to look up the record for
- record_type (Gio.ResolverRecordType) – the type of DNS record to look up
- cancellable (Gio.CancellableorNone) – aGio.Cancellable, orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call after resolution completes
- user_data (objectorNone) – data for callback
 - Begins asynchronously performing a DNS lookup for the given rrname, and eventually calls callback, which must call - Gio.Resolver.lookup_records_finish() to get the final result. See- Gio.Resolver.lookup_records() for more details.- New in version 2.34. 
- rrname (
 - 
do_lookup_records_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Returns: - a non-empty - GLib.Listof- GLib.Variant, or- Noneon error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with- GLib.Variant.unref() to do this.)- Return type: - [ - GLib.Variant]- Retrieves the result of a previous call to - Gio.Resolver.lookup_records_async(). Returns a non-empty list of records as- GLib.Varianttuples. See- Gio.ResolverRecordTypefor information on what the records contain.- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.34. 
 - 
do_lookup_service_async(rrname, cancellable, callback, *user_data) virtual¶
- Parameters: - rrname (str) –
- cancellable (Gio.CancellableorNone) –
- callback (Gio.AsyncReadyCallbackorNone) –
- user_data (objectorNone) –
 
- rrname (
 - 
do_lookup_service_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – the result passed to your- Gio.AsyncReadyCallback- Returns: - a non-empty - GLib.Listof- Gio.SrvTarget, or- Noneon error. See- Gio.Resolver.lookup_service() for more details.- Return type: - [ - Gio.SrvTarget]- Retrieves the result of a previous call to - Gio.Resolver.lookup_service_async().- If the DNS resolution failed, error (if non- - None) will be set to a value from- Gio.ResolverError. If the operation was cancelled, error will be set to- Gio.IOErrorEnum.CANCELLED.- New in version 2.22. 
 - 
do_reload() virtual¶
 
- 
classmethod 
Signal Details¶
- 
Gio.Resolver.signals.reload(resolver)¶
- Signal Name: - reload- Flags: - RUN_LAST- Parameters: - resolver ( - Gio.Resolver) – The object which received the signal- Emitted when the resolver notices that the system resolver configuration has changed.