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 private import glib.Str; 71 private import glib.ErrorG; 72 private import glib.GException; 73 private import gio.AsyncResultIF; 74 private import gio.Cancellable; 75 private import gio.ProxyResolver; 76 private import gio.ProxyResolverIF; 77 78 79 80 /** 81 * GProxyResolver provides synchronous and asynchronous network proxy 82 * resolution. GProxyResolver is used within GSocketClient through 83 * the method g_socket_connectable_proxy_enumerate(). 84 */ 85 public interface ProxyResolverIF 86 { 87 88 89 /** Get the main Gtk struct */ 90 public GProxyResolver* getProxyResolverTStruct(); 91 92 /** the main Gtk struct as a void* */ 93 protected void* getStruct(); 94 95 96 /** 97 */ 98 99 /** 100 * Gets the default GProxyResolver for the system. 101 * Since 2.26 102 * Returns: the default GProxyResolver. [transfer none] 103 */ 104 public static ProxyResolverIF getDefault(); 105 106 /** 107 * Checks if resolver can be used on this system. (This is used 108 * internally; g_proxy_resolver_get_default() will only return a proxy 109 * resolver that returns TRUE for this method.) 110 * Since 2.26 111 * Returns: TRUE if resolver is supported. 112 */ 113 public int isSupported(); 114 115 /** 116 * Looks into the system proxy configuration to determine what proxy, 117 * if any, to use to connect to uri. The returned proxy URIs are of the 118 * form <protocol>://[user[:password]@]host:port 119 * or direct://, where <protocol> could be 120 * http, rtsp, socks or other proxying protocol. 121 * If you don't know what network protocol is being used on the 122 * socket, you should use none as the URI protocol. 123 * In this case, the resolver might still return a generic proxy type 124 * (such as SOCKS), but would not return protocol-specific proxy types 125 * (such as http). 126 * direct:// is used when no proxy is needed. 127 * Direct connection should not be attempted unless it is part of the 128 * returned array of proxies. 129 * Since 2.26 130 * Params: 131 * uri = a URI representing the destination to connect to 132 * cancellable = a GCancellable, or NULL. [allow-none] 133 * Returns: A NULL-terminated array of proxy URIs. Must be freed with g_strfreev(). [transfer full][array zero-terminated=1] 134 * Throws: GException on failure. 135 */ 136 public string[] lookup(string uri, Cancellable cancellable); 137 138 /** 139 * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more 140 * details. 141 * Since 2.26 142 * Params: 143 * uri = a URI representing the destination to connect to 144 * cancellable = a GCancellable, or NULL. [allow-none] 145 * callback = callback to call after resolution completes. [scope async] 146 * userData = data for callback. [closure] 147 */ 148 public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); 149 150 /** 151 * Call this function to obtain the array of proxy URIs when 152 * g_proxy_resolver_lookup_async() is complete. See 153 * g_proxy_resolver_lookup() for more details. 154 * Since 2.26 155 * Params: 156 * result = the result passed to your GAsyncReadyCallback 157 * Returns: A NULL-terminated array of proxy URIs. Must be freed with g_strfreev(). [transfer full][array zero-terminated=1] 158 * Throws: GException on failure. 159 */ 160 public string[] lookupFinish(AsyncResultIF result); 161 }