Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gsocketconnection.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 * Copyright © 2008 Christian Kellner, Samuel Cormier-Iijima
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: Christian Kellner <gicmo@gnome.org>
21 * Samuel Cormier-Iijima <sciyoshi@gmail.com>
22 * Ryan Lortie <desrt@desrt.ca>
23 * Alexander Larsson <alexl@redhat.com>
24 */
25
26#ifndef __G_SOCKET_CONNECTION_H__
27#define __G_SOCKET_CONNECTION_H__
28
29#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
30#error "Only <gio/gio.h> can be included directly."
31#endif
32
33#include <glib-object.h>
34#include <gio/gsocket.h>
35#include <gio/giostream.h>
36
38
39#define G_TYPE_SOCKET_CONNECTION (g_socket_connection_get_type ())
40#define G_SOCKET_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
41 G_TYPE_SOCKET_CONNECTION, GSocketConnection))
42#define G_SOCKET_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
43 G_TYPE_SOCKET_CONNECTION, GSocketConnectionClass))
44#define G_IS_SOCKET_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
45 G_TYPE_SOCKET_CONNECTION))
46#define G_IS_SOCKET_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
47 G_TYPE_SOCKET_CONNECTION))
48#define G_SOCKET_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
49 G_TYPE_SOCKET_CONNECTION, GSocketConnectionClass))
50
51typedef struct _GSocketConnectionPrivate GSocketConnectionPrivate;
53
55{
57
58 /* Padding for future expansion */
59 void (*_g_reserved1) (void);
60 void (*_g_reserved2) (void);
61 void (*_g_reserved3) (void);
62 void (*_g_reserved4) (void);
63 void (*_g_reserved5) (void);
64 void (*_g_reserved6) (void);
65};
66
72
75
80 GSocketAddress *address,
81 GCancellable *cancellable,
82 GError **error);
85 GSocketAddress *address,
86 GCancellable *cancellable,
87 GAsyncReadyCallback callback,
88 gpointer user_data);
91 GAsyncResult *result,
92 GError **error);
93
98 GError **error);
101 GError **error);
102
105 GSocketFamily family,
106 GSocketType type,
107 gint protocol);
110 GSocketType type,
111 gint protocol_id);
114
116
117#endif /* __G_SOCKET_CONNECTION_H__ */
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_32
GSocketType
Definition gioenums.h:857
GSocketFamily
Definition gioenums.h:835
struct _GAsyncResult GAsyncResult
Definition giotypes.h:36
void(* GAsyncReadyCallback)(GObject *source_object, GAsyncResult *res, gpointer data)
Definition giotypes.h:190
#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 GSocketConnection * g_socket_connection_factory_create_connection(GSocket *socket)
GIO_AVAILABLE_IN_ALL void g_socket_connection_factory_register_type(GType g_type, GSocketFamily family, GSocketType type, gint protocol)
GIO_AVAILABLE_IN_2_32 void g_socket_connection_connect_async(GSocketConnection *connection, GSocketAddress *address, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_ALL GType g_socket_connection_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_ALL GSocketAddress * g_socket_connection_get_remote_address(GSocketConnection *connection, GError **error)
GIO_AVAILABLE_IN_ALL GSocket * g_socket_connection_get_socket(GSocketConnection *connection)
GIO_AVAILABLE_IN_2_32 gboolean g_socket_connection_connect_finish(GSocketConnection *connection, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_2_32 gboolean g_socket_connection_connect(GSocketConnection *connection, GSocketAddress *address, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_2_32 gboolean g_socket_connection_is_connected(GSocketConnection *connection)
struct _GSocketConnectionPrivate GSocketConnectionPrivate
GIO_AVAILABLE_IN_ALL GSocketAddress * g_socket_connection_get_local_address(GSocketConnection *connection, GError **error)
GIO_AVAILABLE_IN_ALL GType g_socket_connection_factory_lookup_type(GSocketFamily family, GSocketType type, gint protocol_id)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
int gint
Definition gtypes.h:55
static void error(LoadState *S, const char *why)
GSocketConnectionPrivate * priv