Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:59

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_SOCKET_CONTROL_MESSAGE_H__
0024 #define __G_SOCKET_CONTROL_MESSAGE_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_SOCKET_CONTROL_MESSAGE                       (g_socket_control_message_get_type ())
0035 #define G_SOCKET_CONTROL_MESSAGE(inst)                      (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
0036                                                              G_TYPE_SOCKET_CONTROL_MESSAGE,                          \
0037                                                              GSocketControlMessage))
0038 #define G_SOCKET_CONTROL_MESSAGE_CLASS(class)               (G_TYPE_CHECK_CLASS_CAST ((class),                       \
0039                                                              G_TYPE_SOCKET_CONTROL_MESSAGE,                          \
0040                                                              GSocketControlMessageClass))
0041 #define G_IS_SOCKET_CONTROL_MESSAGE(inst)                   (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
0042                                                              G_TYPE_SOCKET_CONTROL_MESSAGE))
0043 #define G_IS_SOCKET_CONTROL_MESSAGE_CLASS(class)            (G_TYPE_CHECK_CLASS_TYPE ((class),                       \
0044                                                              G_TYPE_SOCKET_CONTROL_MESSAGE))
0045 #define G_SOCKET_CONTROL_MESSAGE_GET_CLASS(inst)            (G_TYPE_INSTANCE_GET_CLASS ((inst),                      \
0046                                                              G_TYPE_SOCKET_CONTROL_MESSAGE,                          \
0047                                                              GSocketControlMessageClass))
0048 
0049 typedef struct _GSocketControlMessagePrivate                GSocketControlMessagePrivate;
0050 typedef struct _GSocketControlMessageClass                  GSocketControlMessageClass;
0051 
0052 /**
0053  * GSocketControlMessageClass:
0054  * @get_size: gets the size of the message.
0055  * @get_level: gets the protocol of the message.
0056  * @get_type: gets the protocol specific type of the message.
0057  * @serialize: Writes out the message data.
0058  * @deserialize: Tries to deserialize a message.
0059  *
0060  * Class structure for #GSocketControlMessage.
0061  **/
0062 
0063 struct _GSocketControlMessageClass
0064 {
0065   GObjectClass parent_class;
0066 
0067   gsize                  (* get_size)  (GSocketControlMessage  *message);
0068   int                    (* get_level) (GSocketControlMessage  *message);
0069   int                    (* get_type)  (GSocketControlMessage  *message);
0070   void                   (* serialize) (GSocketControlMessage  *message,
0071                     gpointer                data);
0072   GSocketControlMessage *(* deserialize) (int                   level,
0073                       int                   type,
0074                       gsize                 size,
0075                       gpointer              data);
0076 
0077   /*< private >*/
0078 
0079   /* Padding for future expansion */
0080   void (*_g_reserved1) (void);
0081   void (*_g_reserved2) (void);
0082   void (*_g_reserved3) (void);
0083   void (*_g_reserved4) (void);
0084   void (*_g_reserved5) (void);
0085 };
0086 
0087 struct _GSocketControlMessage
0088 {
0089   GObject parent_instance;
0090   GSocketControlMessagePrivate *priv;
0091 };
0092 
0093 GIO_AVAILABLE_IN_ALL
0094 GType                  g_socket_control_message_get_type     (void) G_GNUC_CONST;
0095 GIO_AVAILABLE_IN_ALL
0096 gsize                  g_socket_control_message_get_size     (GSocketControlMessage *message);
0097 GIO_AVAILABLE_IN_ALL
0098 int                    g_socket_control_message_get_level    (GSocketControlMessage *message);
0099 GIO_AVAILABLE_IN_ALL
0100 int                    g_socket_control_message_get_msg_type (GSocketControlMessage *message);
0101 GIO_AVAILABLE_IN_ALL
0102 void                   g_socket_control_message_serialize    (GSocketControlMessage *message,
0103                                   gpointer               data);
0104 GIO_AVAILABLE_IN_ALL
0105 GSocketControlMessage *g_socket_control_message_deserialize  (int                    level,
0106                                   int                    type,
0107                                   gsize                  size,
0108                                   gpointer               data);
0109 
0110 
0111 G_END_DECLS
0112 
0113 #endif /* __G_SOCKET_CONTROL_MESSAGE_H__ */