[glib-networking] gnutls: Fix deprecation warnings



commit b20330d6476373b6a9ca2da29380a4246c6e6f55
Author: Olivier CrĂȘte <olivier crete collabora com>
Date:   Thu Mar 7 15:46:57 2013 -0500

    gnutls: Fix deprecation warnings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697908

 tls/gnutls/gtlsbackend-gnutls.c          |    8 ++++----
 tls/gnutls/gtlsbackend-gnutls.h          |    6 +++---
 tls/gnutls/gtlscertificate-gnutls.c      |    8 ++++----
 tls/gnutls/gtlscertificate-gnutls.h      |    4 ++--
 tls/gnutls/gtlsclientconnection-gnutls.c |    2 +-
 tls/gnutls/gtlsconnection-gnutls.c       |    8 ++++----
 tls/gnutls/gtlsconnection-gnutls.h       |    6 +++---
 7 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/tls/gnutls/gtlsbackend-gnutls.c b/tls/gnutls/gtlsbackend-gnutls.c
index 493a044..55ec1a5 100644
--- a/tls/gnutls/gtlsbackend-gnutls.c
+++ b/tls/gnutls/gtlsbackend-gnutls.c
@@ -212,7 +212,7 @@ cache_data_free (gpointer data)
 }
 
 static GHashTable *
-get_session_cache (gnutls_connection_end_t type,
+get_session_cache (unsigned int            type,
                   gboolean                create)
 {
   GHashTable **cache_p;
@@ -227,7 +227,7 @@ get_session_cache (gnutls_connection_end_t type,
 }
 
 void
-g_tls_backend_gnutls_store_session (gnutls_connection_end_t  type,
+g_tls_backend_gnutls_store_session (unsigned int             type,
                                    GBytes                  *session_id,
                                    GBytes                  *session_data)
 {
@@ -263,7 +263,7 @@ g_tls_backend_gnutls_store_session (gnutls_connection_end_t  type,
 }
 
 void
-g_tls_backend_gnutls_remove_session (gnutls_connection_end_t  type,
+g_tls_backend_gnutls_remove_session (unsigned int             type,
                                     GBytes                  *session_id)
 {
   GHashTable *cache;
@@ -278,7 +278,7 @@ g_tls_backend_gnutls_remove_session (gnutls_connection_end_t  type,
 }
 
 GBytes *
-g_tls_backend_gnutls_lookup_session (gnutls_connection_end_t  type,
+g_tls_backend_gnutls_lookup_session (unsigned int             type,
                                     GBytes                  *session_id)
 {
   GTlsBackendGnutlsCacheData *cache_data;
diff --git a/tls/gnutls/gtlsbackend-gnutls.h b/tls/gnutls/gtlsbackend-gnutls.h
index ceb686a..22caa00 100644
--- a/tls/gnutls/gtlsbackend-gnutls.h
+++ b/tls/gnutls/gtlsbackend-gnutls.h
@@ -46,12 +46,12 @@ struct _GTlsBackendGnutls
 GType g_tls_backend_gnutls_get_type (void) G_GNUC_CONST;
 void  g_tls_backend_gnutls_register (GIOModule *module);
 
-void    g_tls_backend_gnutls_store_session  (gnutls_connection_end_t  type,
+void    g_tls_backend_gnutls_store_session  (unsigned int             type,
                                             GBytes                  *session_id,
                                             GBytes                  *session_data);
-void    g_tls_backend_gnutls_remove_session (gnutls_connection_end_t  type,
+void    g_tls_backend_gnutls_remove_session (unsigned int             type,
                                             GBytes                  *session_id);
-GBytes *g_tls_backend_gnutls_lookup_session (gnutls_connection_end_t  type,
+GBytes *g_tls_backend_gnutls_lookup_session (unsigned int             type,
                                             GBytes                  *session_id);
 
 G_END_DECLS
diff --git a/tls/gnutls/gtlscertificate-gnutls.c b/tls/gnutls/gtlscertificate-gnutls.c
index 52192d0..c2786e7 100644
--- a/tls/gnutls/gtlscertificate-gnutls.c
+++ b/tls/gnutls/gtlscertificate-gnutls.c
@@ -371,7 +371,7 @@ g_tls_certificate_gnutls_real_copy (GTlsCertificateGnutls    *gnutls,
                                     gnutls_retr2_st          *st)
 {
   gnutls_x509_crt_t cert;
-  gnutls_datum data;
+  gnutls_datum_t data;
   size_t size = 0;
 
   gnutls_x509_crt_export (gnutls->priv->cert, GNUTLS_X509_FMT_DER,
@@ -429,8 +429,8 @@ g_tls_certificate_gnutls_initable_iface_init (GInitableIface  *iface)
 }
 
 GTlsCertificate *
-g_tls_certificate_gnutls_new (const gnutls_datum *datum,
-                             GTlsCertificate    *issuer)
+g_tls_certificate_gnutls_new (const gnutls_datum_t *datum,
+                             GTlsCertificate      *issuer)
 {
   GTlsCertificateGnutls *gnutls;
 
@@ -444,7 +444,7 @@ g_tls_certificate_gnutls_new (const gnutls_datum *datum,
 
 void
 g_tls_certificate_gnutls_set_data (GTlsCertificateGnutls *gnutls,
-                                   const gnutls_datum *datum)
+                                   const gnutls_datum_t  *datum)
 {
   g_return_if_fail (G_IS_TLS_CERTIFICATE_GNUTLS (gnutls));
   g_return_if_fail (!gnutls->priv->have_cert);
diff --git a/tls/gnutls/gtlscertificate-gnutls.h b/tls/gnutls/gtlscertificate-gnutls.h
index c73a870..94fddeb 100644
--- a/tls/gnutls/gtlscertificate-gnutls.h
+++ b/tls/gnutls/gtlscertificate-gnutls.h
@@ -46,13 +46,13 @@ struct _GTlsCertificateGnutls
 
 GType g_tls_certificate_gnutls_get_type (void) G_GNUC_CONST;
 
-GTlsCertificate *            g_tls_certificate_gnutls_new             (const gnutls_datum    *datum,
+GTlsCertificate *            g_tls_certificate_gnutls_new             (const gnutls_datum_t  *datum,
                                                                        GTlsCertificate       *issuer);
 
 GBytes *                     g_tls_certificate_gnutls_get_bytes       (GTlsCertificateGnutls *gnutls);
 
 void                         g_tls_certificate_gnutls_set_data        (GTlsCertificateGnutls *gnutls,
-                                                                       const gnutls_datum *datum);
+                                                                       const gnutls_datum_t  *datum);
 
 const gnutls_x509_crt_t      g_tls_certificate_gnutls_get_cert        (GTlsCertificateGnutls *gnutls);
 gboolean                     g_tls_certificate_gnutls_has_key         (GTlsCertificateGnutls *gnutls);
diff --git a/tls/gnutls/gtlsclientconnection-gnutls.c b/tls/gnutls/gtlsclientconnection-gnutls.c
index 478be2b..07a3a00 100644
--- a/tls/gnutls/gtlsclientconnection-gnutls.c
+++ b/tls/gnutls/gtlsclientconnection-gnutls.c
@@ -311,7 +311,7 @@ g_tls_client_connection_gnutls_finish_handshake (GTlsConnectionGnutls  *conn,
 
   if (gnutls->priv->session_id)
     {
-      gnutls_datum session_datum;
+      gnutls_datum_t session_datum;
 
       if (!*inout_error &&
          gnutls_session_get_data2 (g_tls_connection_gnutls_get_session (conn),
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index c911447..35bcaad 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -95,8 +95,8 @@ struct _GTlsConnectionGnutlsPrivate
   GPollableInputStream *base_istream;
   GPollableOutputStream *base_ostream;
 
-  gnutls_certificate_credentials creds;
-  gnutls_session session;
+  gnutls_certificate_credentials_t creds;
+  gnutls_session_t session;
 
   GTlsCertificate *certificate, *peer_certificate;
   GTlsCertificateFlags peer_certificate_errors;
@@ -464,13 +464,13 @@ g_tls_connection_gnutls_set_property (GObject      *object,
     }
 }
 
-gnutls_certificate_credentials
+gnutls_certificate_credentials_t
 g_tls_connection_gnutls_get_credentials (GTlsConnectionGnutls *gnutls)
 {
   return gnutls->priv->creds;
 }
 
-gnutls_session
+gnutls_session_t
 g_tls_connection_gnutls_get_session (GTlsConnectionGnutls *gnutls)
 {
   /* Ideally we would initialize gnutls->priv->session from
diff --git a/tls/gnutls/gtlsconnection-gnutls.h b/tls/gnutls/gtlsconnection-gnutls.h
index b217f97..3aa8473 100644
--- a/tls/gnutls/gtlsconnection-gnutls.h
+++ b/tls/gnutls/gtlsconnection-gnutls.h
@@ -48,9 +48,9 @@ struct _GTlsConnectionGnutls
 
 GType g_tls_connection_gnutls_get_type (void) G_GNUC_CONST;
 
-gnutls_certificate_credentials g_tls_connection_gnutls_get_credentials (GTlsConnectionGnutls *connection);
-gnutls_session                 g_tls_connection_gnutls_get_session     (GTlsConnectionGnutls *connection);
-void                           g_tls_connection_gnutls_get_certificate (GTlsConnectionGnutls *gnutls,
+gnutls_certificate_credentials_t g_tls_connection_gnutls_get_credentials (GTlsConnectionGnutls *connection);
+gnutls_session_t                 g_tls_connection_gnutls_get_session     (GTlsConnectionGnutls *connection);
+void                             g_tls_connection_gnutls_get_certificate (GTlsConnectionGnutls *gnutls,
                                                                         gnutls_retr2_st      *st);
 
 gssize   g_tls_connection_gnutls_read          (GTlsConnectionGnutls  *gnutls,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]