Interface

GioProxyResolver

Description [src]

interface Gio.ProxyResolver : GObject.Object

GProxyResolver provides synchronous and asynchronous network proxy resolution. GProxyResolver is used within GSocketClient through the method g_socket_connectable_proxy_enumerate().

Implementations of GProxyResolver based on libproxy and GNOME settings can be found in glib-networking. GIO comes with an implementation for use inside Flatpak portals.

Available since:2.26

Prerequisite

In order to implement ProxyResolver, your type must inherit from GObject.

Functions

g_proxy_resolver_get_default

Gets the default GProxyResolver for the system.

Instance methods

g_proxy_resolver_is_supported

Checks if resolver can be used on this system. (This is used internally; g_proxy_resolver_get_default() will only return a proxy resolver that returns TRUE for this method.)

Available since: 2.26

g_proxy_resolver_lookup

Looks into the system proxy configuration to determine what proxy, if any, to use to connect to uri. The returned proxy URIs are of the form <protocol>://[user[:password]@]host:port or direct://, where could be http, rtsp, socks or other proxying protocol.

Available since: 2.26

g_proxy_resolver_lookup_async

Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more details.

Available since: 2.26

g_proxy_resolver_lookup_finish

Call this function to obtain the array of proxy URIs when g_proxy_resolver_lookup_async() is complete. See g_proxy_resolver_lookup() for more details.

Available since: 2.26

Interface structure

struct GioProxyResolverInterface {
  GTypeInterface g_iface;
  gboolean (* is_supported) (
    GProxyResolver* resolver
  );
  gchar** (* lookup) (
    GProxyResolver* resolver,
    const gchar* uri,
    GCancellable* cancellable,
    GError** error
  );
  void (* lookup_async) (
    GProxyResolver* resolver,
    const gchar* uri,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  gchar** (* lookup_finish) (
    GProxyResolver* resolver,
    GAsyncResult* result,
    GError** error
  );
  
}
Interface members
g_iface
GTypeInterface
 

The parent interface.

is_supported
gboolean (* is_supported) (
    GProxyResolver* resolver
  )
 No description available.
lookup
gchar** (* lookup) (
    GProxyResolver* resolver,
    const gchar* uri,
    GCancellable* cancellable,
    GError** error
  )
 No description available.
lookup_async
void (* lookup_async) (
    GProxyResolver* resolver,
    const gchar* uri,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  )
 No description available.
lookup_finish
gchar** (* lookup_finish) (
    GProxyResolver* resolver,
    GAsyncResult* result,
    GError** error
  )
 No description available.

Virtual methods

Gio.ProxyResolver.is_supported

Checks if resolver can be used on this system. (This is used internally; g_proxy_resolver_get_default() will only return a proxy resolver that returns TRUE for this method.)

Gio.ProxyResolver.lookup

Looks into the system proxy configuration to determine what proxy, if any, to use to connect to uri. The returned proxy URIs are of the form <protocol>://[user[:password]@]host:port or direct://, where could be http, rtsp, socks or other proxying protocol.

Gio.ProxyResolver.lookup_async

Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more details.

Gio.ProxyResolver.lookup_finish

Call this function to obtain the array of proxy URIs when g_proxy_resolver_lookup_async() is complete. See g_proxy_resolver_lookup() for more details.