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_UNIX_CONNECTION_H__
0024 #define __G_UNIX_CONNECTION_H__
0025
0026 #include <gio/gio.h>
0027
0028 G_BEGIN_DECLS
0029
0030 #define G_TYPE_UNIX_CONNECTION (g_unix_connection_get_type ())
0031 #define G_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
0032 G_TYPE_UNIX_CONNECTION, GUnixConnection))
0033 #define G_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
0034 G_TYPE_UNIX_CONNECTION, GUnixConnectionClass))
0035 #define G_IS_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
0036 G_TYPE_UNIX_CONNECTION))
0037 #define G_IS_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
0038 G_TYPE_UNIX_CONNECTION))
0039 #define G_UNIX_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
0040 G_TYPE_UNIX_CONNECTION, GUnixConnectionClass))
0041
0042 typedef struct _GUnixConnection GUnixConnection;
0043 typedef struct _GUnixConnectionPrivate GUnixConnectionPrivate;
0044 typedef struct _GUnixConnectionClass GUnixConnectionClass;
0045
0046 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixConnection, g_object_unref)
0047
0048 struct _GUnixConnectionClass
0049 {
0050 GSocketConnectionClass parent_class;
0051 };
0052
0053 struct _GUnixConnection
0054 {
0055 GSocketConnection parent_instance;
0056 GUnixConnectionPrivate *priv;
0057 };
0058
0059 GIO_AVAILABLE_IN_ALL
0060 GType g_unix_connection_get_type (void);
0061
0062 GIO_AVAILABLE_IN_ALL
0063 gboolean g_unix_connection_send_fd (GUnixConnection *connection,
0064 gint fd,
0065 GCancellable *cancellable,
0066 GError **error);
0067 GIO_AVAILABLE_IN_ALL
0068 gint g_unix_connection_receive_fd (GUnixConnection *connection,
0069 GCancellable *cancellable,
0070 GError **error);
0071
0072 GIO_AVAILABLE_IN_ALL
0073 gboolean g_unix_connection_send_credentials (GUnixConnection *connection,
0074 GCancellable *cancellable,
0075 GError **error);
0076 GIO_AVAILABLE_IN_2_32
0077 void g_unix_connection_send_credentials_async (GUnixConnection *connection,
0078 GCancellable *cancellable,
0079 GAsyncReadyCallback callback,
0080 gpointer user_data);
0081 GIO_AVAILABLE_IN_2_32
0082 gboolean g_unix_connection_send_credentials_finish (GUnixConnection *connection,
0083 GAsyncResult *result,
0084 GError **error);
0085
0086 GIO_AVAILABLE_IN_2_32
0087 GCredentials *g_unix_connection_receive_credentials (GUnixConnection *connection,
0088 GCancellable *cancellable,
0089 GError **error);
0090 GIO_AVAILABLE_IN_2_32
0091 void g_unix_connection_receive_credentials_async (GUnixConnection *connection,
0092 GCancellable *cancellable,
0093 GAsyncReadyCallback callback,
0094 gpointer user_data);
0095 GIO_AVAILABLE_IN_ALL
0096 GCredentials *g_unix_connection_receive_credentials_finish (GUnixConnection *connection,
0097 GAsyncResult *result,
0098 GError **error);
0099
0100 G_END_DECLS
0101
0102 #endif