Blame docs/reference/gio/html/GProxyResolver.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>GProxyResolver: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="resolver.html" title="DNS resolution">
Packit ae235b
<link rel="prev" href="GResolver.html" title="GResolver">
Packit ae235b
<link rel="next" href="GSimpleProxyResolver.html" title="GSimpleProxyResolver">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description  | 
Packit ae235b
                  Object Hierarchy  | 
Packit ae235b
                  Prerequisites  | 
Packit ae235b
                  Known Implementations
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

GProxyResolver

Packit ae235b

GProxyResolver — Asynchronous and cancellable network proxy resolver

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GProxyResolver *
Packit ae235b
Packit ae235b
Packit ae235b
g_proxy_resolver_get_default ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_proxy_resolver_is_supported ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar **
Packit ae235b
Packit ae235b
Packit ae235b
g_proxy_resolver_lookup ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_proxy_resolver_lookup_async ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar **
Packit ae235b
Packit ae235b
Packit ae235b
g_proxy_resolver_lookup_finish ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GProxyResolver
Packit ae235b
Packit ae235b
Packit ae235b
struct
Packit ae235b
GProxyResolverInterface
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_PROXY_RESOLVER_EXTENSION_POINT_NAME
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Object Hierarchy

Packit ae235b
    GInterface
Packit ae235b
    ╰── GProxyResolver
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Prerequisites

Packit ae235b

Packit ae235b
GProxyResolver requires
Packit ae235b
 GObject.

Packit ae235b
Packit ae235b
Packit ae235b

Known Implementations

Packit ae235b

Packit ae235b
GProxyResolver is implemented by
Packit ae235b
 GSimpleProxyResolver.

Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

GProxyResolver provides synchronous and asynchronous network proxy

Packit ae235b
resolution. GProxyResolver is used within GSocketClient through
Packit ae235b
the method g_socket_connectable_proxy_enumerate().

Packit ae235b

Implementations of GProxyResolver based on libproxy and GNOME settings can

Packit ae235b
be found in glib-networking. GIO comes with an implementation for use inside
Packit ae235b
Flatpak portals.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_proxy_resolver_get_default ()

Packit ae235b
GProxyResolver *
Packit ae235b
g_proxy_resolver_get_default (void);
Packit ae235b

Gets the default GProxyResolver for the system.

Packit ae235b
Packit ae235b

Returns

Packit ae235b

the default GProxyResolver.

Packit ae235b

[transfer none]

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_proxy_resolver_is_supported ()

Packit ae235b
gboolean
Packit ae235b
g_proxy_resolver_is_supported (GProxyResolver *resolver);
Packit ae235b

Checks if resolver

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

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

resolver

Packit ae235b

a GProxyResolver

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if resolver

Packit ae235b
is supported.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_proxy_resolver_lookup ()

Packit ae235b
gchar **
Packit ae235b
g_proxy_resolver_lookup (GProxyResolver *resolver,
Packit ae235b
                         const gchar *uri,
Packit ae235b
                         GCancellable *cancellable,
Packit ae235b
                         GError **error);
Packit ae235b

Looks into the system proxy configuration to determine what proxy,

Packit ae235b
if any, to use to connect to uri
Packit ae235b
. The returned proxy URIs are of
Packit ae235b
the form &lt;protocol>://[user[:password]@]host:port or
Packit ae235b
direct://, where <protocol> could be http, rtsp, socks
Packit ae235b
or other proxying protocol.

Packit ae235b

If you don't know what network protocol is being used on the

Packit ae235b
socket, you should use none as the URI protocol.
Packit ae235b
In this case, the resolver might still return a generic proxy type
Packit ae235b
(such as SOCKS), but would not return protocol-specific proxy types
Packit ae235b
(such as http).

Packit ae235b

direct:// is used when no proxy is needed.

Packit ae235b
Direct connection should not be attempted unless it is part of the
Packit ae235b
returned array of proxies.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

resolver

Packit ae235b

a GProxyResolver

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

uri

Packit ae235b

a URI representing the destination to connect to

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

a GCancellable, or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

return location for a GError, or NULL

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

A

Packit ae235b
NULL-terminated array of proxy URIs. Must be freed
Packit ae235b
with g_strfreev(). 

Packit ae235b

[transfer full][array zero-terminated=1]

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_proxy_resolver_lookup_async ()

Packit ae235b
void
Packit ae235b
g_proxy_resolver_lookup_async (GProxyResolver *resolver,
Packit ae235b
                               const gchar *uri,
Packit ae235b
                               GCancellable *cancellable,
Packit ae235b
                               GAsyncReadyCallback callback,
Packit ae235b
                               gpointer user_data);
Packit ae235b

Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more

Packit ae235b
details.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

resolver

Packit ae235b

a GProxyResolver

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

uri

Packit ae235b

a URI representing the destination to connect to

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

cancellable

Packit ae235b

a GCancellable, or NULL.

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

callback

Packit ae235b

callback to call after resolution completes.

Packit ae235b
[scope async]
Packit ae235b
Packit ae235b
Packit ae235b

user_data

Packit ae235b

data for callback

Packit ae235b
. 

Packit ae235b
[closure]
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_proxy_resolver_lookup_finish ()

Packit ae235b
gchar **
Packit ae235b
g_proxy_resolver_lookup_finish (GProxyResolver *resolver,
Packit ae235b
                                GAsyncResult *result,
Packit ae235b
                                GError **error);
Packit ae235b

Call this function to obtain the array of proxy URIs when

Packit ae235b
g_proxy_resolver_lookup_async() is complete. See
Packit ae235b
g_proxy_resolver_lookup() for more details.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

resolver

Packit ae235b

a GProxyResolver

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

result

Packit ae235b

the result passed to your GAsyncReadyCallback

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

return location for a GError, or NULL

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

A

Packit ae235b
NULL-terminated array of proxy URIs. Must be freed
Packit ae235b
with g_strfreev(). 

Packit ae235b

[transfer full][array zero-terminated=1]

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

GProxyResolver

Packit ae235b
typedef struct _GProxyResolver GProxyResolver;
Packit ae235b

A helper class to enumerate proxies base on URI.

Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

struct GProxyResolverInterface

Packit ae235b
struct GProxyResolverInterface {
Packit ae235b
  GTypeInterface g_iface;
Packit ae235b
Packit ae235b
  /* Virtual Table */
Packit ae235b
  gboolean (* is_supported)  (GProxyResolver       *resolver);
Packit ae235b
Packit ae235b
  gchar ** (* lookup)        (GProxyResolver       *resolver,
Packit ae235b
			      const gchar          *uri,
Packit ae235b
			      GCancellable         *cancellable,
Packit ae235b
			      GError              **error);
Packit ae235b
Packit ae235b
  void     (* lookup_async)  (GProxyResolver       *resolver,
Packit ae235b
			      const gchar          *uri,
Packit ae235b
			      GCancellable         *cancellable,
Packit ae235b
			      GAsyncReadyCallback   callback,
Packit ae235b
			      gpointer              user_data);
Packit ae235b
Packit ae235b
  gchar ** (* lookup_finish) (GProxyResolver       *resolver,
Packit ae235b
			      GAsyncResult         *result,
Packit ae235b
			      GError              **error);
Packit ae235b
};
Packit ae235b
Packit ae235b

The virtual function table for GProxyResolver.

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

is_supported ()

Packit ae235b

the virtual function pointer for g_proxy_resolver_is_supported()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

lookup ()

Packit ae235b

the virtual function pointer for g_proxy_resolver_lookup()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

lookup_async ()

Packit ae235b

the virtual function pointer for

Packit ae235b
g_proxy_resolver_lookup_async()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

lookup_finish ()

Packit ae235b

the virtual function pointer for

Packit ae235b
g_proxy_resolver_lookup_finish()

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_PROXY_RESOLVER_EXTENSION_POINT_NAME

Packit ae235b
#define G_PROXY_RESOLVER_EXTENSION_POINT_NAME "gio-proxy-resolver"
Packit ae235b
Packit ae235b

Extension point for proxy resolving functionality.

Packit ae235b
See Extending GIO.

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>