1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gio.ProxyResolverIF;
26 
27 private import gio.AsyncResultIF;
28 private import gio.Cancellable;
29 private import gio.ProxyResolver;
30 private import gio.ProxyResolverIF;
31 private import glib.ErrorG;
32 private import glib.GException;
33 private import glib.Str;
34 private import gobject.ObjectG;
35 private import gtkc.gio;
36 public  import gtkc.giotypes;
37 
38 
39 /**
40  * #GProxyResolver provides synchronous and asynchronous network proxy
41  * resolution. #GProxyResolver is used within #GSocketClient through
42  * the method g_socket_connectable_proxy_enumerate().
43  *
44  * Since: 2.26
45  */
46 public interface ProxyResolverIF{
47 	/** Get the main Gtk struct */
48 	public GProxyResolver* getProxyResolverStruct();
49 
50 	/** the main Gtk struct as a void* */
51 	protected void* getStruct();
52 
53 
54 	/**
55 	 * Gets the default #GProxyResolver for the system.
56 	 *
57 	 * Return: the default #GProxyResolver.
58 	 *
59 	 * Since: 2.26
60 	 */
61 	public static ProxyResolverIF getDefault();
62 
63 	/**
64 	 * Checks if @resolver can be used on this system. (This is used
65 	 * internally; g_proxy_resolver_get_default() will only return a proxy
66 	 * resolver that returns %TRUE for this method.)
67 	 *
68 	 * Return: %TRUE if @resolver is supported.
69 	 *
70 	 * Since: 2.26
71 	 */
72 	public bool isSupported();
73 
74 	/**
75 	 * Looks into the system proxy configuration to determine what proxy,
76 	 * if any, to use to connect to @uri. The returned proxy URIs are of
77 	 * the form `<protocol>://[user[:password]@]host:port` or
78 	 * `direct://`, where <protocol> could be http, rtsp, socks
79 	 * or other proxying protocol.
80 	 *
81 	 * If you don't know what network protocol is being used on the
82 	 * socket, you should use `none` as the URI protocol.
83 	 * In this case, the resolver might still return a generic proxy type
84 	 * (such as SOCKS), but would not return protocol-specific proxy types
85 	 * (such as http).
86 	 *
87 	 * `direct://` is used when no proxy is needed.
88 	 * Direct connection should not be attempted unless it is part of the
89 	 * returned array of proxies.
90 	 *
91 	 * Params:
92 	 *     uri = a URI representing the destination to connect to
93 	 *     cancellable = a #GCancellable, or %NULL
94 	 *
95 	 * Return: A
96 	 *     NULL-terminated array of proxy URIs. Must be freed
97 	 *     with g_strfreev().
98 	 *
99 	 * Since: 2.26
100 	 *
101 	 * Throws: GException on failure.
102 	 */
103 	public string[] lookup(string uri, Cancellable cancellable);
104 
105 	/**
106 	 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
107 	 * details.
108 	 *
109 	 * Params:
110 	 *     uri = a URI representing the destination to connect to
111 	 *     cancellable = a #GCancellable, or %NULL
112 	 *     callback = callback to call after resolution completes
113 	 *     userData = data for @callback
114 	 *
115 	 * Since: 2.26
116 	 */
117 	public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData);
118 
119 	/**
120 	 * Call this function to obtain the array of proxy URIs when
121 	 * g_proxy_resolver_lookup_async() is complete. See
122 	 * g_proxy_resolver_lookup() for more details.
123 	 *
124 	 * Params:
125 	 *     result = the result passed to your #GAsyncReadyCallback
126 	 *
127 	 * Return: A
128 	 *     NULL-terminated array of proxy URIs. Must be freed
129 	 *     with g_strfreev().
130 	 *
131 	 * Since: 2.26
132 	 *
133 	 * Throws: GException on failure.
134 	 */
135 	public string[] lookupFinish(AsyncResultIF result);
136 }