add G_TLS_ERROR_UNAVAILABLE
authorDan Winship <danw@gnome.org>
Mon, 6 Dec 2010 11:43:59 +0000 (12:43 +0100)
committerDan Winship <danw@gnome.org>
Tue, 7 Dec 2010 09:41:06 +0000 (10:41 +0100)
gio/gdummytlsbackend.c
gio/gioenums.h

index f2d7186..6a6b8a2 100644 (file)
@@ -150,7 +150,7 @@ g_dummy_tls_certificate_initable_init (GInitable       *initable,
                                       GCancellable    *cancellable,
                                       GError         **error)
 {
-  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
+  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_UNAVAILABLE,
                       _("TLS support is not available"));
   return FALSE;
 }
@@ -262,7 +262,7 @@ g_dummy_tls_connection_initable_init (GInitable       *initable,
                                      GCancellable    *cancellable,
                                      GError         **error)
 {
-  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
+  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_UNAVAILABLE,
                       _("TLS support is not available"));
   return FALSE;
 }
index 9ad291c..7aaba24 100644 (file)
@@ -1251,6 +1251,7 @@ typedef enum
 
 /**
  * GTlsError:
+ * @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
  * @G_TLS_ERROR_MISC: Miscellaneous TLS error
  * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
  * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the
@@ -1270,6 +1271,7 @@ typedef enum
  * Since: 2.28
  */
 typedef enum {
+  G_TLS_ERROR_UNAVAILABLE,
   G_TLS_ERROR_MISC,
   G_TLS_ERROR_BAD_CERTIFICATE,
   G_TLS_ERROR_NOT_TLS,