[586:7] extends: object
Generated low-level callback wrapper for GIR callback reload.
ResolverReloadCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[25:7] extends: object
The object that handles DNS resolution. Use [func@Gio.Resolver.get_default]
to get the default resolver. GResolver provides cancellable synchronous and
asynchronous DNS resolution, for hostnames
([method@Gio.Resolver.lookup_by_address],
[method@Gio.Resolver.lookup_by_name] and their async variants) and SRV
(service) records ([method@Gio.Resolver.lookup_service]).
[class@Gio.NetworkAddress] and [class@Gio.NetworkService] provide wrappers
around GResolver functionality that also implement
[iface@Gio.SocketConnectable], making it easy to connect to a remote
host/service. The default resolver (see [func@Gio.Resolver.get_default]) has
a timeout of 30s set on it since GLib 2.78. Earlier versions of GLib did not
support resolver timeouts. This is an abstract type; subclasses of it
implement different resolvers for different platforms and situations.
Resolver (Handle = null)
Creates a new
Resolverby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnReload (callback Fn, UserData = null)
Emitted when the resolver notices that the system resolver configuration has changed.
Fn is the Aussom callback.Fn is called with (Resolver Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setTimeout (int Value)
The timeout applied to all resolver lookups, in milliseconds. This may be changed through the lifetime of the #GResolver. The new value will apply to any lookups started after the change, but not to any already-ongoing lookups. If this is
0, no timeout is applied to lookups. No timeout was applied to lookups before this property was added in GLib 2.78.
Value is the new property value.None.get_timeout ()
Get the timeout applied to all resolver lookups. See #GResolver:timeout.
lookup_by_address (object address, object cancellable)
Synchronously reverse-resolves @address to determine its associated hostname. If the DNS resolution fails, @error (if non-%NULL) will be set to a value from #GResolverError. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED.
address is the address to reverse-resolve.cancellable is a #GCancellable, or %NULL.lookup_by_address_finish (object result)
Retrieves the result of a previous call to g_resolver_lookup_by_address_async(). If the DNS resolution failed,
(if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED.result is the result passed to your #GAsyncReadyCallback.lookup_by_name (string hostname, object cancellable)
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 g_inet_address_new_from_string()). On success, g_resolver_lookup_by_name() will return a non-empty #GList of #GInetAddress, 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. g_socket_listener_add_address(). If the DNS resolution fails, @error (if non-%NULL) will be set to a value from #GResolverError and %NULL will be returned. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED. If you are planning to connect to a socket on the resolved IP address, it may be easier to create a #GNetworkAddress and use its #GSocketConnectable interface.
hostname is the hostname to look up.cancellable is a #GCancellable, or %NULL.lookup_by_name_finish (object result)
Retrieves the result of a call to g_resolver_lookup_by_name_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED.
result is the result passed to your #GAsyncReadyCallback.lookup_by_name_with_flags (string hostname, string flags, object cancellable)
This differs from g_resolver_lookup_by_name() in that you can modify the lookup behavior with @flags. For example this can be used to limit results with %G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY.
hostname is the hostname to look up.flags is extra #GResolverNameLookupFlags for the lookup.cancellable is a #GCancellable, or %NULL.lookup_by_name_with_flags_finish (object result)
Retrieves the result of a call to g_resolver_lookup_by_name_with_flags_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED.
result is the result passed to your #GAsyncReadyCallback.lookup_records (string rrname, string record_type, object cancellable)
Synchronously performs a DNS record lookup for the given @rrname and returns a list of records as #GVariant tuples. See #GResolverRecordType for information on what the records contain for each @record_type. If the DNS resolution fails, @error (if non-%NULL) will be set to a value from #GResolverError and %NULL will be returned. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED.
rrname is the DNS name to look up the record for.record_type is the type of DNS record to look up.cancellable is a #GCancellable, or %NULL.lookup_records_finish (object result)
Retrieves the result of a previous call to g_resolver_lookup_records_async(). Returns a non-empty list of records as #GVariant tuples. See #GResolverRecordType for information on what the records contain. If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled,
will be set to %G_IO_ERROR_CANCELLED.result is the result passed to your #GAsyncReadyCallback.lookup_service (string service, string protocol, string domain, object cancellable)
Synchronously performs a DNS SRV lookup for the given @service and
in the given @domain and returns an array of #GSrvTarget.may be an ASCII-only or UTF-8 hostname. Note also that theand @protocol arguments do not include the leading underscore that appears in the actual DNS entry. On success, g_resolver_lookup_service() will return a non-empty #GList of #GSrvTarget, 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-%NULL) will be set to a value from #GResolverError and %NULL will be returned. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED. If you are planning to connect to the service, it is usually easier to create a #GNetworkService and use its #GSocketConnectable interface.service is the service type to look up (eg, "ldap").protocol is the networking protocol to use for @service (eg, "tcp").domain is the DNS domain to look up the service in.cancellable is a #GCancellable, or %NULL.lookup_service_finish (object result)
Retrieves the result of a previous call to g_resolver_lookup_service_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED.
result is the result passed to your #GAsyncReadyCallback.set_default ()
Sets @resolver to be the application's default resolver (reffing
and unreffing the previous default resolver, if any). Future calls to g_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 #GResolver that 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.None.set_timeout (int timeout_ms)
Set the timeout applied to all resolver lookups. See #GResolver:timeout.
timeout_ms is timeout in milliseconds, or 0 for no timeouts.None.lookup_by_name_list ()
Returns
lookup_by_nameas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_by_name()when lazy or change-notify access is required.
An Aussom list of elements.lookup_by_name_finish_list ()
Returns
lookup_by_name_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_by_name_finish()when lazy or change-notify access is required.
An Aussom list of elements.lookup_by_name_with_flags_list ()
Returns
lookup_by_name_with_flagsas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_by_name_with_flags()when lazy or change-notify access is required.
An Aussom list of elements.lookup_by_name_with_flags_finish_list ()
Returns
lookup_by_name_with_flags_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_by_name_with_flags_finish()when lazy or change-notify access is required.
An Aussom list of elements.lookup_records_list ()
Returns
lookup_recordsas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_records()when lazy or change-notify access is required.
An Aussom list of elements.lookup_records_finish_list ()
Returns
lookup_records_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_records_finish()when lazy or change-notify access is required.
An Aussom list of elements.lookup_service_list ()
Returns
lookup_serviceas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_service()when lazy or change-notify access is required.
An Aussom list of elements.lookup_service_finish_list ()
Returns
lookup_service_finishas an Aussom list of wrapper objects. This companion method materializes the full collection up front; uselookup_service_finish()when lazy or change-notify access is required.
An Aussom list of elements.[656:14] static extends: object
Generated metadata helpers for Resolver class surfaces.
properties ()
Returns property metadata for
Resolver.
A list.signals ()
Returns signal metadata for
Resolver.
A list.