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 * Conversion parameters: 26 * inFile = GProxyResolver.html 27 * outPack = gio 28 * outFile = ProxyResolverIF 29 * strct = GProxyResolver 30 * realStrct= 31 * ctorStrct= 32 * clss = ProxyResolverT 33 * interf = ProxyResolverIF 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - g_proxy_resolver_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - glib.Str 47 * - glib.ErrorG 48 * - glib.GException 49 * - gio.AsyncResultIF 50 * - gio.Cancellable 51 * - gio.ProxyResolver 52 * - gio.ProxyResolverIF 53 * structWrap: 54 * - GAsyncResult* -> AsyncResultIF 55 * - GCancellable* -> Cancellable 56 * - GProxyResolver* -> ProxyResolverIF 57 * module aliases: 58 * local aliases: 59 * overrides: 60 */ 61 62 module gio.ProxyResolverIF; 63 64 public import gtkc.giotypes; 65 66 private import gtkc.gio; 67 private import glib.ConstructionException; 68 private import gobject.ObjectG; 69 70 71 private import glib.Str; 72 private import glib.ErrorG; 73 private import glib.GException; 74 private import gio.AsyncResultIF; 75 private import gio.Cancellable; 76 private import gio.ProxyResolver; 77 private import gio.ProxyResolverIF; 78 79 80 81 82 /** 83 * Description 84 * GProxyResolver provides synchronous and asynchronous network proxy 85 * resolution. GProxyResolver is used within GClientSocket through 86 * the method g_socket_connectable_proxy_enumerate(). 87 */ 88 public interface ProxyResolverIF 89 { 90 91 92 public GProxyResolver* getProxyResolverTStruct(); 93 94 /** the main Gtk struct as a void* */ 95 protected void* getStruct(); 96 97 98 /** 99 */ 100 101 /** 102 * Gets the default GProxyResolver for the system. 103 * Since 2.26 104 * Returns: the default GProxyResolver. [transfer none] 105 */ 106 public static ProxyResolverIF getDefault(); 107 108 /** 109 * Checks if resolver can be used on this system. (This is used 110 * internally; g_proxy_resolver_get_default() will only return a proxy 111 * resolver that returns TRUE for this method.) 112 * Since 2.26 113 * Returns: TRUE if resolver is supported. 114 */ 115 public int isSupported(); 116 117 /** 118 * Looks into the system proxy configuration to determine what proxy, 119 * if any, to use to connect to uri. The returned proxy URIs are of the 120 * form <protocol>://[user[:password]@]host:port 121 * or direct://, where <protocol> could be 122 * http, rtsp, socks or other proxying protocol. 123 * If you don't know what network protocol is being used on the 124 * socket, you should use none as the URI protocol. 125 * In this case, the resolver might still return a generic proxy type 126 * (such as SOCKS), but would not return protocol-specific proxy types 127 * (such as http). 128 * direct:// is used when no proxy is needed. 129 * Direct connection should not be attempted unless it is part of the 130 * returned array of proxies. 131 * Since 2.26 132 * Params: 133 * uri = a URI representing the destination to connect to 134 * cancellable = a GCancellable, or NULL. [allow-none] 135 * Returns: A NULL-terminated array of proxy URIs. Must be freed with g_strfreev(). [transfer full][array zero-terminated=1] 136 * Throws: GException on failure. 137 */ 138 public string[] lookup(string uri, Cancellable cancellable); 139 140 /** 141 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more 142 * details. 143 * Since 2.26 144 * Params: 145 * uri = a URI representing the destination to connect to 146 * cancellable = a GCancellable, or NULL. [allow-none] 147 * callback = callback to call after resolution completes. [scope async] 148 * userData = data for callback. [closure] 149 */ 150 public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); 151 152 /** 153 * Call this function to obtain the array of proxy URIs when 154 * g_proxy_resolver_lookup_async() is complete. See 155 * g_proxy_resolver_lookup() for more details. 156 * Since 2.26 157 * Params: 158 * result = the result passed to your GAsyncReadyCallback 159 * Returns: A NULL-terminated array of proxy URIs. Must be freed with g_strfreev(). [transfer full][array zero-terminated=1] 160 * Throws: GException on failure. 161 */ 162 public string[] lookupFinish(AsyncResultIF result); 163 }