1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright © 2009 Codethink Limited
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; either version 2 of the licence or (at
8 * your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 * Authors: Ryan Lortie <desrt@desrt.ca>
21 #ifndef __G_UNIX_CONNECTION_H__
22 #define __G_UNIX_CONNECTION_H__
28 #define G_TYPE_UNIX_CONNECTION (g_unix_connection_get_type ())
29 #define G_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
30 G_TYPE_UNIX_CONNECTION, GUnixConnection))
31 #define G_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
32 G_TYPE_UNIX_CONNECTION, GUnixConnectionClass))
33 #define G_IS_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
34 G_TYPE_UNIX_CONNECTION))
35 #define G_IS_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
36 G_TYPE_UNIX_CONNECTION))
37 #define G_UNIX_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
38 G_TYPE_UNIX_CONNECTION, GUnixConnectionClass))
40 typedef struct _GUnixConnection GUnixConnection
;
41 typedef struct _GUnixConnectionPrivate GUnixConnectionPrivate
;
42 typedef struct _GUnixConnectionClass GUnixConnectionClass
;
44 struct _GUnixConnectionClass
46 GSocketConnectionClass parent_class
;
49 struct _GUnixConnection
51 GSocketConnection parent_instance
;
52 GUnixConnectionPrivate
*priv
;
56 GType
g_unix_connection_get_type (void);
59 gboolean
g_unix_connection_send_fd (GUnixConnection
*connection
,
61 GCancellable
*cancellable
,
64 gint
g_unix_connection_receive_fd (GUnixConnection
*connection
,
65 GCancellable
*cancellable
,
69 gboolean
g_unix_connection_send_credentials (GUnixConnection
*connection
,
70 GCancellable
*cancellable
,
72 GLIB_AVAILABLE_IN_2_32
73 void g_unix_connection_send_credentials_async (GUnixConnection
*connection
,
74 GCancellable
*cancellable
,
75 GAsyncReadyCallback callback
,
77 GLIB_AVAILABLE_IN_2_32
78 gboolean
g_unix_connection_send_credentials_finish (GUnixConnection
*connection
,
82 GLIB_AVAILABLE_IN_2_32
83 GCredentials
*g_unix_connection_receive_credentials (GUnixConnection
*connection
,
84 GCancellable
*cancellable
,
86 GLIB_AVAILABLE_IN_2_32
87 void g_unix_connection_receive_credentials_async (GUnixConnection
*connection
,
88 GCancellable
*cancellable
,
89 GAsyncReadyCallback callback
,
92 GCredentials
*g_unix_connection_receive_credentials_finish (GUnixConnection
*connection
,
98 #endif /* __G_UNIX_CONNECTION_H__ */