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 56 /** 57 * Gets the default #GProxyResolver for the system. 58 * 59 * Return: the default #GProxyResolver. 60 * 61 * Since: 2.26 62 */ 63 public static ProxyResolverIF getDefault(); 64 65 /** 66 * Checks if @resolver can be used on this system. (This is used 67 * internally; g_proxy_resolver_get_default() will only return a proxy 68 * resolver that returns %TRUE for this method.) 69 * 70 * Return: %TRUE if @resolver is supported. 71 * 72 * Since: 2.26 73 */ 74 public bool isSupported(); 75 76 /** 77 * Looks into the system proxy configuration to determine what proxy, 78 * if any, to use to connect to @uri. The returned proxy URIs are of 79 * the form `<protocol>://[user[:password]@]host:port` or 80 * `direct://`, where <protocol> could be http, rtsp, socks 81 * or other proxying protocol. 82 * 83 * If you don't know what network protocol is being used on the 84 * socket, you should use `none` as the URI protocol. 85 * In this case, the resolver might still return a generic proxy type 86 * (such as SOCKS), but would not return protocol-specific proxy types 87 * (such as http). 88 * 89 * `direct://` is used when no proxy is needed. 90 * Direct connection should not be attempted unless it is part of the 91 * returned array of proxies. 92 * 93 * Params: 94 * uri = a URI representing the destination to connect to 95 * cancellable = a #GCancellable, or %NULL 96 * 97 * Return: A 98 * NULL-terminated array of proxy URIs. Must be freed 99 * with g_strfreev(). 100 * 101 * Since: 2.26 102 * 103 * Throws: GException on failure. 104 */ 105 public string[] lookup(string uri, Cancellable cancellable); 106 107 /** 108 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more 109 * details. 110 * 111 * Params: 112 * uri = a URI representing the destination to connect to 113 * cancellable = a #GCancellable, or %NULL 114 * callback = callback to call after resolution completes 115 * userData = data for @callback 116 * 117 * Since: 2.26 118 */ 119 public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); 120 121 /** 122 * Call this function to obtain the array of proxy URIs when 123 * g_proxy_resolver_lookup_async() is complete. See 124 * g_proxy_resolver_lookup() for more details. 125 * 126 * Params: 127 * result = the result passed to your #GAsyncReadyCallback 128 * 129 * Return: A 130 * NULL-terminated array of proxy URIs. Must be freed 131 * with g_strfreev(). 132 * 133 * Since: 2.26 134 * 135 * Throws: GException on failure. 136 */ 137 public string[] lookupFinish(AsyncResultIF result); 138 }