add G_TLS_ERROR_UNAVAILABLE

This commit is contained in:
Dan Winship 2010-12-06 12:43:59 +01:00
parent 95cba18349
commit 68a3d6b27f
2 changed files with 4 additions and 2 deletions

View File

@ -150,7 +150,7 @@ g_dummy_tls_certificate_initable_init (GInitable *initable,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) 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")); _("TLS support is not available"));
return FALSE; return FALSE;
} }
@ -262,7 +262,7 @@ g_dummy_tls_connection_initable_init (GInitable *initable,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) 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")); _("TLS support is not available"));
return FALSE; return FALSE;
} }

View File

@ -1251,6 +1251,7 @@ typedef enum
/** /**
* GTlsError: * GTlsError:
* @G_TLS_ERROR_UNAVAILABLE: No TLS provider is available
* @G_TLS_ERROR_MISC: Miscellaneous TLS error * @G_TLS_ERROR_MISC: Miscellaneous TLS error
* @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed * @G_TLS_ERROR_BAD_CERTIFICATE: A certificate could not be parsed
* @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the * @G_TLS_ERROR_NOT_TLS: The TLS handshake failed because the
@ -1270,6 +1271,7 @@ typedef enum
* Since: 2.28 * Since: 2.28
*/ */
typedef enum { typedef enum {
G_TLS_ERROR_UNAVAILABLE,
G_TLS_ERROR_MISC, G_TLS_ERROR_MISC,
G_TLS_ERROR_BAD_CERTIFICATE, G_TLS_ERROR_BAD_CERTIFICATE,
G_TLS_ERROR_NOT_TLS, G_TLS_ERROR_NOT_TLS,