Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 10:13:10

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_FD_LIST_H__
0024 #define __G_UNIX_FD_LIST_H__
0025 
0026 #include <gio/gio.h>
0027 
0028 G_BEGIN_DECLS
0029 
0030 #define G_TYPE_UNIX_FD_LIST                                 (g_unix_fd_list_get_type ())
0031 #define G_UNIX_FD_LIST(inst)                                (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
0032                                                              G_TYPE_UNIX_FD_LIST, GUnixFDList))
0033 #define G_UNIX_FD_LIST_CLASS(class)                         (G_TYPE_CHECK_CLASS_CAST ((class),                       \
0034                                                              G_TYPE_UNIX_FD_LIST, GUnixFDListClass))
0035 #define G_IS_UNIX_FD_LIST(inst)                             (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
0036                                                              G_TYPE_UNIX_FD_LIST))
0037 #define G_IS_UNIX_FD_LIST_CLASS(class)                      (G_TYPE_CHECK_CLASS_TYPE ((class),                       \
0038                                                              G_TYPE_UNIX_FD_LIST))
0039 #define G_UNIX_FD_LIST_GET_CLASS(inst)                      (G_TYPE_INSTANCE_GET_CLASS ((inst),                      \
0040                                                              G_TYPE_UNIX_FD_LIST, GUnixFDListClass))
0041 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDList, g_object_unref)
0042 
0043 typedef struct _GUnixFDListPrivate                       GUnixFDListPrivate;
0044 typedef struct _GUnixFDListClass                         GUnixFDListClass;
0045 
0046 struct _GUnixFDListClass
0047 {
0048   GObjectClass parent_class;
0049 
0050   /*< private >*/
0051 
0052   /* Padding for future expansion */
0053   void (*_g_reserved1) (void);
0054   void (*_g_reserved2) (void);
0055   void (*_g_reserved3) (void);
0056   void (*_g_reserved4) (void);
0057   void (*_g_reserved5) (void);
0058 };
0059 
0060 struct _GUnixFDList
0061 {
0062   GObject parent_instance;
0063   GUnixFDListPrivate *priv;
0064 };
0065 
0066 GIO_AVAILABLE_IN_ALL
0067 GType                   g_unix_fd_list_get_type                         (void) G_GNUC_CONST;
0068 GIO_AVAILABLE_IN_ALL
0069 GUnixFDList *           g_unix_fd_list_new                              (void);
0070 GIO_AVAILABLE_IN_ALL
0071 GUnixFDList *           g_unix_fd_list_new_from_array                   (const gint   *fds,
0072                                                                          gint          n_fds);
0073 
0074 GIO_AVAILABLE_IN_ALL
0075 gint                    g_unix_fd_list_append                           (GUnixFDList  *list,
0076                                                                          gint          fd,
0077                                                                          GError      **error);
0078 
0079 GIO_AVAILABLE_IN_ALL
0080 gint                    g_unix_fd_list_get_length                       (GUnixFDList  *list);
0081 
0082 GIO_AVAILABLE_IN_ALL
0083 gint                    g_unix_fd_list_get                              (GUnixFDList  *list,
0084                                                                          gint          index_,
0085                                                                          GError      **error);
0086 
0087 GIO_AVAILABLE_IN_ALL
0088 const gint *            g_unix_fd_list_peek_fds                         (GUnixFDList  *list,
0089                                                                          gint         *length);
0090 
0091 GIO_AVAILABLE_IN_ALL
0092 gint *                  g_unix_fd_list_steal_fds                        (GUnixFDList  *list,
0093                                                                          gint         *length);
0094 
0095 G_END_DECLS
0096 
0097 #endif /* __G_UNIX_FD_LIST_H__ */