[kdbus] Do not set body message if signature field is empty
[platform/upstream/glib.git] / gio / gproxy.c
index 79a63ad..bf5b1e2 100644 (file)
@@ -13,9 +13,7 @@
  * 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>
  */
@@ -31,6 +29,7 @@
 /**
  * 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.
@@ -56,7 +55,8 @@ g_proxy_default_init (GProxyInterface *iface)
  * 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
  **/
@@ -82,25 +82,25 @@ g_proxy_get_default_for_protocol (const gchar *protocol)
 /**
  * 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)
@@ -112,7 +112,7 @@ g_proxy_connect (GProxy            *proxy,
   iface = G_PROXY_GET_IFACE (proxy);
 
   return (* iface->connect) (proxy,
-                            io_stream,
+                            connection,
                             proxy_address,
                             cancellable,
                             error);
@@ -121,11 +121,11 @@ g_proxy_connect (GProxy            *proxy,
 /**
  * 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().
  *
@@ -133,7 +133,7 @@ g_proxy_connect (GProxy            *proxy,
  */
 void
 g_proxy_connect_async (GProxy               *proxy,
-                      GIOStream            *io_stream,
+                      GIOStream            *connection,
                       GProxyAddress        *proxy_address,
                       GCancellable         *cancellable,
                       GAsyncReadyCallback   callback,
@@ -146,7 +146,7 @@ g_proxy_connect_async (GProxy               *proxy,
   iface = G_PROXY_GET_IFACE (proxy);
 
   (* iface->connect_async) (proxy,
-                           io_stream,
+                           connection,
                            proxy_address,
                            cancellable,
                            callback,
@@ -156,12 +156,12 @@ g_proxy_connect_async (GProxy               *proxy,
 /**
  * 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
  */
@@ -191,7 +191,7 @@ g_proxy_connect_finish (GProxy       *proxy,
  * #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
  */
@@ -200,7 +200,7 @@ g_proxy_supports_hostname (GProxy *proxy)
 {
   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);