* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
*/
/**
* SECTION:gproxy
* @short_description: Interface for proxy handling
+ * @include: gio/gio.h
*
* A #GProxy handles connecting to a remote host via a given type of
* proxy server. It is implemented by the 'gio-proxy' extension point.
* Lookup "gio-proxy" extension point for a proxy implementation that supports
* specified protocol.
*
- * Return value: return a #GProxy or NULL if protocol is not supported.
+ * Returns: (transfer full): return a #GProxy or NULL if protocol
+ * is not supported.
*
* Since: 2.26
**/
/**
* g_proxy_connect:
* @proxy: a #GProxy
- * @io_stream: a #GIOStream
+ * @connection: a #GIOStream
* @proxy_address: a #GProxyAddress
- * @cancellable: a #GCancellable
+ * @cancellable: (allow-none): a #GCancellable
* @error: return #GError
*
- * Given @io_stream to communicate with a proxy (eg, a
+ * Given @connection to communicate with a proxy (eg, a
* #GSocketConnection that is connected to the proxy server), this
* does the necessary handshake to connect to @proxy_address, and if
* required, wraps the #GIOStream to handle proxy payload.
*
- * Return value: a #GIOStream that will replace @io_stream. This might
- * be the same as @io_stream, in which case a reference
+ * Returns: (transfer full): a #GIOStream that will replace @connection. This might
+ * be the same as @connection, in which case a reference
* will be added.
*
* Since: 2.26
*/
GIOStream *
g_proxy_connect (GProxy *proxy,
- GIOStream *io_stream,
+ GIOStream *connection,
GProxyAddress *proxy_address,
GCancellable *cancellable,
GError **error)
iface = G_PROXY_GET_IFACE (proxy);
return (* iface->connect) (proxy,
- io_stream,
+ connection,
proxy_address,
cancellable,
error);
/**
* g_proxy_connect_async:
* @proxy: a #GProxy
- * @io-stream: a #GIOStream
+ * @connection: a #GIOStream
* @proxy_address: a #GProxyAddress
- * @cancellable: a #GCancellable
- * @callback: a #GAsyncReadyCallback
- * @user_data: callback data
+ * @cancellable: (allow-none): a #GCancellable
+ * @callback: (scope async): a #GAsyncReadyCallback
+ * @user_data: (closure): callback data
*
* Asynchronous version of g_proxy_connect().
*
*/
void
g_proxy_connect_async (GProxy *proxy,
- GIOStream *io_stream,
+ GIOStream *connection,
GProxyAddress *proxy_address,
GCancellable *cancellable,
GAsyncReadyCallback callback,
iface = G_PROXY_GET_IFACE (proxy);
(* iface->connect_async) (proxy,
- io_stream,
+ connection,
proxy_address,
cancellable,
callback,
/**
* g_proxy_connect_finish:
* @proxy: a #GProxy
- * @result: a #GAsyncRetult
+ * @result: a #GAsyncResult
* @error: return #GError
*
* See g_proxy_connect().
*
- * Return value: a #GIOStream.
+ * Returns: (transfer full): a #GIOStream.
*
* Since: 2.26
*/
* #GProxyAddress containing the stringified IP address to
* g_proxy_connect() or g_proxy_connect_async().
*
- * Return value: %TRUE if hostname resolution is supported.
+ * Returns: %TRUE if hostname resolution is supported.
*
* Since: 2.26
*/
{
GProxyInterface *iface;
- g_return_val_if_fail (G_IS_PROXY (proxy), NULL);
+ g_return_val_if_fail (G_IS_PROXY (proxy), FALSE);
iface = G_PROXY_GET_IFACE (proxy);