gio: Fix regression encoding an array of doubles
[platform/upstream/glib.git] / gio / gtlsclientconnection.c
index 92cd9f5..5d2a17d 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/>.
  */
 
 #include "config.h"
@@ -24,7 +22,6 @@
 #include "gtlsclientconnection.h"
 #include "ginitable.h"
 #include "gioenumtypes.h"
-#include "gio-marshal.h"
 #include "gsocket.h"
 #include "gsocketconnectable.h"
 #include "gtlsbackend.h"
@@ -38,8 +35,6 @@
  *
  * #GTlsClientConnection is the client-side subclass of
  * #GTlsConnection, representing a client-side TLS connection.
- *
- * Since: 2.28
  */
 
 /**
@@ -126,22 +121,24 @@ g_tls_client_connection_default_init (GTlsClientConnectionInterface *iface)
                                                             G_PARAM_STATIC_STRINGS));
 
   /**
-   * GTlsClientConnection:accepted-cas:
+   * GTlsClientConnection:accepted-cas: (type GLib.List) (element-type GLib.ByteArray):
    *
    * A list of the distinguished names of the Certificate Authorities
    * that the server will accept client certificates signed by. If the
    * server requests a client certificate during the handshake, then
    * this property will be set after the handshake completes.
    *
+   * Each item in the list is a #GByteArray which contains the complete
+   * subject DN of the certificate authority.
+   *
    * Since: 2.28
    */
   g_object_interface_install_property (iface,
-                                      g_param_spec_boxed ("accepted-cas",
-                                                          P_("Accepted CAs"),
-                                                          P_("Distinguished names of the CAs the server accepts certificates from"),
-                                                          G_TYPE_STRV,
-                                                          G_PARAM_READABLE |
-                                                          G_PARAM_STATIC_STRINGS));
+                                      g_param_spec_pointer ("accepted-cas",
+                                                            P_("Accepted CAs"),
+                                                            P_("Distinguished names of the CAs the server accepts certificates from"),
+                                                            G_PARAM_READABLE |
+                                                            G_PARAM_STATIC_STRINGS));
 }
 
 /**
@@ -154,7 +151,8 @@ g_tls_client_connection_default_init (GTlsClientConnectionInterface *iface)
  * must have pollable input and output streams) which is assumed to
  * communicate with the server identified by @server_identity.
  *
- * Return value: the new #GTlsClientConnection, or %NULL on error
+ * Returns: (transfer full) (type GTlsClientConnection): the new
+ * #GTlsClientConnection, or %NULL on error
  *
  * Since: 2.28
  */
@@ -181,7 +179,7 @@ g_tls_client_connection_new (GIOStream           *base_io_stream,
  *
  * Gets @conn's validation flags
  *
- * Return value: the validation flags
+ * Returns: the validation flags
  *
  * Since: 2.28
  */
@@ -222,7 +220,7 @@ g_tls_client_connection_set_validation_flags (GTlsClientConnection  *conn,
  *
  * Gets @conn's expected server identity
  *
- * Return value: a #GSocketConnectable describing the
+ * Returns: (transfer none): a #GSocketConnectable describing the
  * expected server identity, or %NULL if the expected identity is not
  * known.
  *
@@ -270,7 +268,7 @@ g_tls_client_connection_set_server_identity (GTlsClientConnection *conn,
  * highest-supported version of TLS; see
  * g_tls_client_connection_set_use_ssl3().
  *
- * Return value: whether @conn will use SSL 3.0
+ * Returns: whether @conn will use SSL 3.0
  *
  * Since: 2.28
  */
@@ -316,15 +314,19 @@ g_tls_client_connection_set_use_ssl3 (GTlsClientConnection *conn,
  * during the TLS handshake if the server requests a certificate.
  * Otherwise, it will be %NULL.
  *
- * Return value: (transfer full) (array zero-terminated=1): the list
- * of CA names, which you must free (eg, with g_strfreev()).
+ * Each item in the list is a #GByteArray which contains the complete
+ * subject DN of the certificate authority.
+ *
+ * Returns: (element-type GByteArray) (transfer full): the list of
+ * CA DNs. You should unref each element with g_byte_array_unref() and then
+ * the free the list with g_list_free().
  *
  * Since: 2.28
  */
-char **
+GList *
 g_tls_client_connection_get_accepted_cas (GTlsClientConnection *conn)
 {
-  char **accepted_cas = NULL;
+  GList *accepted_cas = NULL;
 
   g_return_val_if_fail (G_IS_TLS_CLIENT_CONNECTION (conn), NULL);