source: appstream-generator/build/girepo/gio/ProxyResolverIF.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.ProxyResolverIF;
22
23private import gi.gio;
24public  import gi.giotypes;
25private import gio.AsyncResultIF;
26private import gio.Cancellable;
27private import gio.ProxyResolver;
28private import gio.ProxyResolverIF;
29private import glib.ErrorG;
30private import glib.GException;
31private import glib.Str;
32private import gobject.ObjectG;
33
34
35/**
36 * #GProxyResolver provides synchronous and asynchronous network proxy
37 * resolution. #GProxyResolver is used within #GSocketClient through
38 * the method g_socket_connectable_proxy_enumerate().
39 *
40 * Since: 2.26
41 */
42public interface ProxyResolverIF{
43        /** Get the main Gtk struct */
44        public GProxyResolver* getProxyResolverStruct();
45
46        /** the main Gtk struct as a void* */
47        protected void* getStruct();
48
49
50        /**
51         * Gets the default #GProxyResolver for the system.
52         *
53         * Returns: the default #GProxyResolver.
54         *
55         * Since: 2.26
56         */
57        public static ProxyResolverIF getDefault();
58
59        /**
60         * Checks if @resolver can be used on this system. (This is used
61         * internally; g_proxy_resolver_get_default() will only return a proxy
62         * resolver that returns %TRUE for this method.)
63         *
64         * Returns: %TRUE if @resolver is supported.
65         *
66         * Since: 2.26
67         */
68        public bool isSupported();
69
70        /**
71         * Looks into the system proxy configuration to determine what proxy,
72         * if any, to use to connect to @uri. The returned proxy URIs are of
73         * the form `<protocol>://[user[:password]@]host:port` or
74         * `direct://`, where <protocol> could be http, rtsp, socks
75         * or other proxying protocol.
76         *
77         * If you don't know what network protocol is being used on the
78         * socket, you should use `none` as the URI protocol.
79         * In this case, the resolver might still return a generic proxy type
80         * (such as SOCKS), but would not return protocol-specific proxy types
81         * (such as http).
82         *
83         * `direct://` is used when no proxy is needed.
84         * Direct connection should not be attempted unless it is part of the
85         * returned array of proxies.
86         *
87         * Params:
88         *     uri = a URI representing the destination to connect to
89         *     cancellable = a #GCancellable, or %NULL
90         *
91         * Returns: A
92         *     NULL-terminated array of proxy URIs. Must be freed
93         *     with g_strfreev().
94         *
95         * Since: 2.26
96         *
97         * Throws: GException on failure.
98         */
99        public string[] lookup(string uri, Cancellable cancellable);
100
101        /**
102         * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more
103         * details.
104         *
105         * Params:
106         *     uri = a URI representing the destination to connect to
107         *     cancellable = a #GCancellable, or %NULL
108         *     callback = callback to call after resolution completes
109         *     userData = data for @callback
110         *
111         * Since: 2.26
112         */
113        public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData);
114
115        /**
116         * Call this function to obtain the array of proxy URIs when
117         * g_proxy_resolver_lookup_async() is complete. See
118         * g_proxy_resolver_lookup() for more details.
119         *
120         * Params:
121         *     result = the result passed to your #GAsyncReadyCallback
122         *
123         * Returns: A
124         *     NULL-terminated array of proxy URIs. Must be freed
125         *     with g_strfreev().
126         *
127         * Since: 2.26
128         *
129         * Throws: GException on failure.
130         */
131        public string[] lookupFinish(AsyncResultIF result);
132}
Note: See TracBrowser for help on using the repository browser.