source: appstream-generator/build/girepo/gio/ProxyIF.d @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 3.9 KB
Line 
1/*
2 * Licensed under the GNU Lesser General Public License Version 3
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the license, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18// generated automatically - do not change
19
20
21module gio.ProxyIF;
22
23private import gi.gio;
24public  import gi.giotypes;
25private import gio.AsyncResultIF;
26private import gio.Cancellable;
27private import gio.IOStream;
28private import gio.Proxy;
29private import gio.ProxyAddress;
30private import gio.ProxyIF;
31private import glib.ErrorG;
32private import glib.GException;
33private import glib.Str;
34private import gobject.ObjectG;
35
36
37/**
38 * A #GProxy handles connecting to a remote host via a given type of
39 * proxy server. It is implemented by the 'gio-proxy' extension point.
40 * The extensions are named after their proxy protocol name. As an
41 * example, a SOCKS5 proxy implementation can be retrieved with the
42 * name 'socks5' using the function
43 * g_io_extension_point_get_extension_by_name().
44 *
45 * Since: 2.26
46 */
47public interface ProxyIF{
48        /** Get the main Gtk struct */
49        public GProxy* getProxyStruct();
50
51        /** the main Gtk struct as a void* */
52        protected void* getStruct();
53
54
55        /**
56         * Lookup "gio-proxy" extension point for a proxy implementation that supports
57         * specified protocol.
58         *
59         * Params:
60         *     protocol = the proxy protocol name (e.g. http, socks, etc)
61         *
62         * Returns: return a #GProxy or NULL if protocol
63         *     is not supported.
64         *
65         * Since: 2.26
66         */
67        public static ProxyIF getDefaultForProtocol(string protocol);
68
69        /**
70         * Given @connection to communicate with a proxy (eg, a
71         * #GSocketConnection that is connected to the proxy server), this
72         * does the necessary handshake to connect to @proxy_address, and if
73         * required, wraps the #GIOStream to handle proxy payload.
74         *
75         * Params:
76         *     connection = a #GIOStream
77         *     proxyAddress = a #GProxyAddress
78         *     cancellable = a #GCancellable
79         *
80         * Returns: a #GIOStream that will replace @connection. This might
81         *     be the same as @connection, in which case a reference
82         *     will be added.
83         *
84         * Since: 2.26
85         *
86         * Throws: GException on failure.
87         */
88        public IOStream connect(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable);
89
90        /**
91         * Asynchronous version of g_proxy_connect().
92         *
93         * Params:
94         *     connection = a #GIOStream
95         *     proxyAddress = a #GProxyAddress
96         *     cancellable = a #GCancellable
97         *     callback = a #GAsyncReadyCallback
98         *     userData = callback data
99         *
100         * Since: 2.26
101         */
102        public void connectAsync(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable, GAsyncReadyCallback callback, void* userData);
103
104        /**
105         * See g_proxy_connect().
106         *
107         * Params:
108         *     result = a #GAsyncResult
109         *
110         * Returns: a #GIOStream.
111         *
112         * Since: 2.26
113         *
114         * Throws: GException on failure.
115         */
116        public IOStream connectFinish(AsyncResultIF result);
117
118        /**
119         * Some proxy protocols expect to be passed a hostname, which they
120         * will resolve to an IP address themselves. Others, like SOCKS4, do
121         * not allow this. This function will return %FALSE if @proxy is
122         * implementing such a protocol. When %FALSE is returned, the caller
123         * should resolve the destination hostname first, and then pass a
124         * #GProxyAddress containing the stringified IP address to
125         * g_proxy_connect() or g_proxy_connect_async().
126         *
127         * Returns: %TRUE if hostname resolution is supported.
128         *
129         * Since: 2.26
130         */
131        public bool supportsHostname();
132}
Note: See TracBrowser for help on using the repository browser.