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