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 #ifndef __G_TLS_BACKEND_H__
0023 #define __G_TLS_BACKEND_H__
0024
0025 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0026 #error "Only <gio/gio.h> can be included directly."
0027 #endif
0028
0029 #include <gio/giotypes.h>
0030
0031 G_BEGIN_DECLS
0032
0033
0034
0035
0036
0037
0038
0039 #define G_TLS_BACKEND_EXTENSION_POINT_NAME "gio-tls-backend"
0040
0041 #define G_TYPE_TLS_BACKEND (g_tls_backend_get_type ())
0042 #define G_TLS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_TLS_BACKEND, GTlsBackend))
0043 #define G_IS_TLS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_TLS_BACKEND))
0044 #define G_TLS_BACKEND_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_TLS_BACKEND, GTlsBackendInterface))
0045
0046 typedef struct _GTlsBackend GTlsBackend;
0047 typedef struct _GTlsBackendInterface GTlsBackendInterface;
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 struct _GTlsBackendInterface
0067 {
0068 GTypeInterface g_iface;
0069
0070
0071 gboolean ( *supports_tls) (GTlsBackend *backend);
0072 GType ( *get_certificate_type) (void);
0073 GType ( *get_client_connection_type) (void);
0074 GType ( *get_server_connection_type) (void);
0075 GType ( *get_file_database_type) (void);
0076 GTlsDatabase * ( *get_default_database) (GTlsBackend *backend);
0077 gboolean ( *supports_dtls) (GTlsBackend *backend);
0078 GType ( *get_dtls_client_connection_type) (void);
0079 GType ( *get_dtls_server_connection_type) (void);
0080 };
0081
0082 GIO_AVAILABLE_IN_ALL
0083 GType g_tls_backend_get_type (void) G_GNUC_CONST;
0084
0085 GIO_AVAILABLE_IN_ALL
0086 GTlsBackend * g_tls_backend_get_default (void);
0087
0088 GIO_AVAILABLE_IN_ALL
0089 GTlsDatabase * g_tls_backend_get_default_database (GTlsBackend *backend);
0090 GIO_AVAILABLE_IN_2_60
0091 void g_tls_backend_set_default_database (GTlsBackend *backend,
0092 GTlsDatabase *database);
0093
0094 GIO_AVAILABLE_IN_ALL
0095 gboolean g_tls_backend_supports_tls (GTlsBackend *backend);
0096 GIO_AVAILABLE_IN_2_48
0097 gboolean g_tls_backend_supports_dtls (GTlsBackend *backend);
0098
0099 GIO_AVAILABLE_IN_ALL
0100 GType g_tls_backend_get_certificate_type (GTlsBackend *backend);
0101 GIO_AVAILABLE_IN_ALL
0102 GType g_tls_backend_get_client_connection_type (GTlsBackend *backend);
0103 GIO_AVAILABLE_IN_ALL
0104 GType g_tls_backend_get_server_connection_type (GTlsBackend *backend);
0105 GIO_AVAILABLE_IN_ALL
0106 GType g_tls_backend_get_file_database_type (GTlsBackend *backend);
0107
0108 GIO_AVAILABLE_IN_2_48
0109 GType g_tls_backend_get_dtls_client_connection_type (GTlsBackend *backend);
0110 GIO_AVAILABLE_IN_2_48
0111 GType g_tls_backend_get_dtls_server_connection_type (GTlsBackend *backend);
0112
0113 G_END_DECLS
0114
0115 #endif