File indexing completed on 2025-01-18 10:00:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __G_TLS_PASSWORD_H__
0024 #define __G_TLS_PASSWORD_H__
0025
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029
0030 #include <gio/giotypes.h>
0031
0032 G_BEGIN_DECLS
0033
0034 #define G_TYPE_TLS_PASSWORD (g_tls_password_get_type ())
0035 #define G_TLS_PASSWORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_PASSWORD, GTlsPassword))
0036 #define G_TLS_PASSWORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_PASSWORD, GTlsPasswordClass))
0037 #define G_IS_TLS_PASSWORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_PASSWORD))
0038 #define G_IS_TLS_PASSWORD_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_PASSWORD))
0039 #define G_TLS_PASSWORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_PASSWORD, GTlsPasswordClass))
0040
0041 typedef struct _GTlsPasswordClass GTlsPasswordClass;
0042 typedef struct _GTlsPasswordPrivate GTlsPasswordPrivate;
0043
0044 struct _GTlsPassword
0045 {
0046 GObject parent_instance;
0047
0048 GTlsPasswordPrivate *priv;
0049 };
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060 struct _GTlsPasswordClass
0061 {
0062 GObjectClass parent_class;
0063
0064
0065
0066 const guchar * ( *get_value) (GTlsPassword *password,
0067 gsize *length);
0068
0069 void ( *set_value) (GTlsPassword *password,
0070 guchar *value,
0071 gssize length,
0072 GDestroyNotify destroy);
0073
0074 const gchar* ( *get_default_warning) (GTlsPassword *password);
0075
0076
0077
0078 gpointer padding[4];
0079 };
0080
0081 GIO_AVAILABLE_IN_ALL
0082 GType g_tls_password_get_type (void) G_GNUC_CONST;
0083
0084 GIO_AVAILABLE_IN_ALL
0085 GTlsPassword * g_tls_password_new (GTlsPasswordFlags flags,
0086 const gchar *description);
0087
0088 GIO_AVAILABLE_IN_ALL
0089 const guchar * g_tls_password_get_value (GTlsPassword *password,
0090 gsize *length);
0091 GIO_AVAILABLE_IN_ALL
0092 void g_tls_password_set_value (GTlsPassword *password,
0093 const guchar *value,
0094 gssize length);
0095 GIO_AVAILABLE_IN_ALL
0096 void g_tls_password_set_value_full (GTlsPassword *password,
0097 guchar *value,
0098 gssize length,
0099 GDestroyNotify destroy);
0100
0101 GIO_AVAILABLE_IN_ALL
0102 GTlsPasswordFlags g_tls_password_get_flags (GTlsPassword *password);
0103 GIO_AVAILABLE_IN_ALL
0104 void g_tls_password_set_flags (GTlsPassword *password,
0105 GTlsPasswordFlags flags);
0106
0107 GIO_AVAILABLE_IN_ALL
0108 const gchar* g_tls_password_get_description (GTlsPassword *password);
0109 GIO_AVAILABLE_IN_ALL
0110 void g_tls_password_set_description (GTlsPassword *password,
0111 const gchar *description);
0112
0113 GIO_AVAILABLE_IN_ALL
0114 const gchar * g_tls_password_get_warning (GTlsPassword *password);
0115 GIO_AVAILABLE_IN_ALL
0116 void g_tls_password_set_warning (GTlsPassword *password,
0117 const gchar *warning);
0118
0119 G_END_DECLS
0120
0121 #endif