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  = GProxy.html
27  * outPack = gio
28  * outFile = ProxyIF
29  * strct   = GProxy
30  * realStrct=
31  * ctorStrct=
32  * clss    = ProxyT
33  * interf  = ProxyIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- g_initable_
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.IOStream
52  * 	- gio.ProxyAddress
53  * structWrap:
54  * 	- GAsyncResult* -> AsyncResultIF
55  * 	- GCancellable* -> Cancellable
56  * 	- GIOStream* -> IOStream
57  * 	- GProxy* -> ProxyIF
58  * 	- GProxyAddress* -> ProxyAddress
59  * module aliases:
60  * local aliases:
61  * overrides:
62  */
63 
64 module gio.ProxyIF;
65 
66 public  import gtkc.giotypes;
67 
68 private import gtkc.gio;
69 private import glib.ConstructionException;
70 private import gobject.ObjectG;
71 
72 
73 private import glib.Str;
74 private import glib.ErrorG;
75 private import glib.GException;
76 private import gio.AsyncResultIF;
77 private import gio.Cancellable;
78 private import gio.IOStream;
79 private import gio.ProxyAddress;
80 
81 
82 
83 
84 /**
85  * Description
86  * A GProxy handles connecting to a remote host via a given type of
87  * proxy server. It is implemented by the 'gio-proxy' extension point.
88  * The extensions are named after their proxy protocol name. As an
89  * example, a SOCKS5 proxy implementation can be retrieved with the
90  * name 'socks5' using the function
91  * g_io_extension_point_get_extension_by_name().
92  */
93 public interface ProxyIF
94 {
95 	
96 	
97 	public GProxy* getProxyTStruct();
98 	
99 	/** the main Gtk struct as a void* */
100 	protected void* getStruct();
101 	
102 	
103 	/**
104 	 */
105 	
106 	/**
107 	 * Given connection to communicate with a proxy (eg, a
108 	 * GSocketConnection that is connected to the proxy server), this
109 	 * does the necessary handshake to connect to proxy_address, and if
110 	 * required, wraps the GIOStream to handle proxy payload.
111 	 * Since 2.26
112 	 * Params:
113 	 * proxy = a GProxy
114 	 * connection = a GIOStream
115 	 * proxyAddress = a GProxyAddress
116 	 * cancellable = a GCancellable. [allow-none]
117 	 * Returns: a GIOStream that will replace connection. This might be the same as connection, in which case a reference will be added. [transfer full]
118 	 * Throws: GException on failure.
119 	 */
120 	public IOStream gProxyConnect(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable);
121 	
122 	/**
123 	 * Asynchronous version of g_proxy_connect().
124 	 * Since 2.26
125 	 * Params:
126 	 * proxy = a GProxy
127 	 * connection = a GIOStream
128 	 * proxyAddress = a GProxyAddress
129 	 * cancellable = a GCancellable. [allow-none]
130 	 * callback = a GAsyncReadyCallback. [scope async]
131 	 * userData = callback data. [closure]
132 	 */
133 	public void gProxyConnectAsync(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable, GAsyncReadyCallback callback, void* userData);
134 	
135 	/**
136 	 * See g_proxy_connect().
137 	 * Since 2.26
138 	 * Params:
139 	 * result = a GAsyncRetult
140 	 * Returns: a GIOStream. [transfer full]
141 	 * Throws: GException on failure.
142 	 */
143 	public IOStream gProxyConnectFinish(AsyncResultIF result);
144 	
145 	/**
146 	 * Lookup "gio-proxy" extension point for a proxy implementation that supports
147 	 * specified protocol.
148 	 * Since 2.26
149 	 * Params:
150 	 * protocol = the proxy protocol name (e.g. http, socks, etc)
151 	 * Returns: return a GProxy or NULL if protocol is not supported. [transfer full]
152 	 */
153 	public static ProxyIF gProxyGetDefaultForProtocol(string protocol);
154 	
155 	/**
156 	 * Some proxy protocols expect to be passed a hostname, which they
157 	 * will resolve to an IP address themselves. Others, like SOCKS4, do
158 	 * not allow this. This function will return FALSE if proxy is
159 	 * implementing such a protocol. When FALSE is returned, the caller
160 	 * should resolve the destination hostname first, and then pass a
161 	 * GProxyAddress containing the stringified IP address to
162 	 * g_proxy_connect() or g_proxy_connect_async().
163 	 * Since 2.26
164 	 * Returns: TRUE if hostname resolution is supported.
165 	 */
166 	public int gProxySupportsHostname();
167 }