Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gsocketcontrolmessage.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright © 2009 Codethink Limited
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Authors: Ryan Lortie <desrt@desrt.ca>
21 */
22
23#ifndef __G_SOCKET_CONTROL_MESSAGE_H__
24#define __G_SOCKET_CONTROL_MESSAGE_H__
25
26#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27#error "Only <gio/gio.h> can be included directly."
28#endif
29
30#include <gio/giotypes.h>
31
33
34#define G_TYPE_SOCKET_CONTROL_MESSAGE (g_socket_control_message_get_type ())
35#define G_SOCKET_CONTROL_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
36 G_TYPE_SOCKET_CONTROL_MESSAGE, \
37 GSocketControlMessage))
38#define G_SOCKET_CONTROL_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
39 G_TYPE_SOCKET_CONTROL_MESSAGE, \
40 GSocketControlMessageClass))
41#define G_IS_SOCKET_CONTROL_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
42 G_TYPE_SOCKET_CONTROL_MESSAGE))
43#define G_IS_SOCKET_CONTROL_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
44 G_TYPE_SOCKET_CONTROL_MESSAGE))
45#define G_SOCKET_CONTROL_MESSAGE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
46 G_TYPE_SOCKET_CONTROL_MESSAGE, \
47 GSocketControlMessageClass))
48
49typedef struct _GSocketControlMessagePrivate GSocketControlMessagePrivate;
51
52/**
53 * GSocketControlMessageClass:
54 * @get_size: gets the size of the message.
55 * @get_level: gets the protocol of the message.
56 * @get_type: gets the protocol specific type of the message.
57 * @serialize: Writes out the message data.
58 * @deserialize: Tries to deserialize a message.
59 *
60 * Class structure for #GSocketControlMessage.
61 **/
62
64{
66
68 int (* get_level) (GSocketControlMessage *message);
69 int (* get_type) (GSocketControlMessage *message);
70 void (* serialize) (GSocketControlMessage *message,
71 gpointer data);
72 GSocketControlMessage *(* deserialize) (int level,
73 int type,
74 gsize size,
75 gpointer data);
76
77 /*< private >*/
78
79 /* Padding for future expansion */
80 void (*_g_reserved1) (void);
81 void (*_g_reserved2) (void);
82 void (*_g_reserved3) (void);
83 void (*_g_reserved4) (void);
84 void (*_g_reserved5) (void);
85};
86
92
103 gpointer data);
106 int type,
107 gsize size,
108 gpointer data);
109
110
112
113#endif /* __G_SOCKET_CONTROL_MESSAGE_H__ */
#define GIO_AVAILABLE_IN_ALL
unsigned long gsize
Definition glibconfig.h:83
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
GIO_AVAILABLE_IN_ALL gsize g_socket_control_message_get_size(GSocketControlMessage *message)
GIO_AVAILABLE_IN_ALL int g_socket_control_message_get_level(GSocketControlMessage *message)
GIO_AVAILABLE_IN_ALL GSocketControlMessage * g_socket_control_message_deserialize(int level, int type, gsize size, gpointer data)
GIO_AVAILABLE_IN_ALL GType g_socket_control_message_get_type(void) G_GNUC_CONST
struct _GSocketControlMessagePrivate GSocketControlMessagePrivate
GIO_AVAILABLE_IN_ALL void g_socket_control_message_serialize(GSocketControlMessage *message, gpointer data)
GIO_AVAILABLE_IN_ALL int g_socket_control_message_get_msg_type(GSocketControlMessage *message)
gsize GType
Definition gtype.h:427
void * gpointer
Definition gtypes.h:109
int(* get_level)(GSocketControlMessage *message)
gsize(* get_size)(GSocketControlMessage *message)
void(* serialize)(GSocketControlMessage *message, gpointer data)
int(* get_type)(GSocketControlMessage *message)
GSocketControlMessagePrivate * priv