Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:00

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright © 2009 Codethink Limited
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Authors: Ryan Lortie <desrt@desrt.ca>
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 /* __G_UNIX_CONNECTION_H__ */