Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gsocketclient.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright © 2008, 2009 Codethink Limited
4 * Copyright © 2009 Red Hat, Inc
5 *
6 * SPDX-License-Identifier: LGPL-2.1-or-later
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General
19 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 *
21 * Authors: Ryan Lortie <desrt@desrt.ca>
22 * Alexander Larsson <alexl@redhat.com>
23 */
24
25#ifndef __G_SOCKET_CLIENT_H__
26#define __G_SOCKET_CLIENT_H__
27
28#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
29#error "Only <gio/gio.h> can be included directly."
30#endif
31
32#include <gio/giotypes.h>
33
35
36#define G_TYPE_SOCKET_CLIENT (g_socket_client_get_type ())
37#define G_SOCKET_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
38 G_TYPE_SOCKET_CLIENT, GSocketClient))
39#define G_SOCKET_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
40 G_TYPE_SOCKET_CLIENT, GSocketClientClass))
41#define G_IS_SOCKET_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
42 G_TYPE_SOCKET_CLIENT))
43#define G_IS_SOCKET_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
44 G_TYPE_SOCKET_CLIENT))
45#define G_SOCKET_CLIENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
46 G_TYPE_SOCKET_CLIENT, GSocketClientClass))
47
48typedef struct _GSocketClientPrivate GSocketClientPrivate;
50
52{
54
55 void (* event) (GSocketClient *client,
57 GSocketConnectable *connectable,
58 GIOStream *connection);
59
60 /* Padding for future expansion */
61 void (*_g_reserved1) (void);
62 void (*_g_reserved2) (void);
63 void (*_g_reserved3) (void);
64 void (*_g_reserved4) (void);
65};
66
72
75
78
83 GSocketFamily family);
88 GSocketType type);
93 GSocketProtocol protocol);
98 GSocketAddress *address);
103 guint timeout);
108 gboolean enable);
109
114 gboolean tls);
124 GProxyResolver *proxy_resolver);
125
128 GSocketConnectable *connectable,
129 GCancellable *cancellable,
130 GError **error);
133 const gchar *host_and_port,
135 GCancellable *cancellable,
136 GError **error);
139 const gchar *domain,
140 const gchar *service,
141 GCancellable *cancellable,
142 GError **error);
145 const gchar *uri,
147 GCancellable *cancellable,
148 GError **error);
151 GSocketConnectable *connectable,
152 GCancellable *cancellable,
153 GAsyncReadyCallback callback,
154 gpointer user_data);
157 GAsyncResult *result,
158 GError **error);
161 const gchar *host_and_port,
163 GCancellable *cancellable,
164 GAsyncReadyCallback callback,
165 gpointer user_data);
168 GAsyncResult *result,
169 GError **error);
170
173 const gchar *domain,
174 const gchar *service,
175 GCancellable *cancellable,
176 GAsyncReadyCallback callback,
177 gpointer user_data);
180 GAsyncResult *result,
181 GError **error);
184 const gchar *uri,
186 GCancellable *cancellable,
187 GAsyncReadyCallback callback,
188 gpointer user_data);
191 GAsyncResult *result,
192 GError **error);
195 const gchar *protocol);
196
198
199#endif /* __G_SOCKET_CLIENT_H___ */
unsigned default_port
Definition civetweb.c:18380
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_26
#define GIO_AVAILABLE_IN_2_36
#define GIO_AVAILABLE_IN_2_28
#define GIO_DEPRECATED_IN_2_72
GSocketType
Definition gioenums.h:857
GTlsCertificateFlags
Definition gioenums.h:1633
GSocketClientEvent
Definition gioenums.h:1948
GSocketFamily
Definition gioenums.h:835
GSocketProtocol
Definition gioenums.h:907
struct _GSocketConnectable GSocketConnectable
Definition giotypes.h:143
struct _GProxyResolver GProxyResolver
Definition giotypes.h:163
struct _GAsyncResult GAsyncResult
Definition giotypes.h:36
void(* GAsyncReadyCallback)(GObject *source_object, GAsyncResult *res, gpointer data)
Definition giotypes.h:190
unsigned short guint16
Definition glibconfig.h:49
#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 void g_socket_client_connect_to_host_async(GSocketClient *client, const gchar *host_and_port, guint16 default_port, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_2_28 gboolean g_socket_client_get_tls(GSocketClient *client)
GIO_AVAILABLE_IN_ALL GSocketFamily g_socket_client_get_family(GSocketClient *client)
GIO_AVAILABLE_IN_ALL void g_socket_client_connect_to_uri_async(GSocketClient *client, const gchar *uri, guint16 default_port, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
struct _GSocketClientPrivate GSocketClientPrivate
GIO_AVAILABLE_IN_2_28 void g_socket_client_set_tls(GSocketClient *client, gboolean tls)
GIO_AVAILABLE_IN_ALL GSocketAddress * g_socket_client_get_local_address(GSocketClient *client)
GIO_AVAILABLE_IN_ALL void g_socket_client_add_application_proxy(GSocketClient *client, const gchar *protocol)
GIO_AVAILABLE_IN_ALL gboolean g_socket_client_get_enable_proxy(GSocketClient *client)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect_to_host_finish(GSocketClient *client, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_socket_client_set_socket_type(GSocketClient *client, GSocketType type)
GIO_AVAILABLE_IN_2_36 GProxyResolver * g_socket_client_get_proxy_resolver(GSocketClient *client)
GIO_AVAILABLE_IN_ALL void g_socket_client_set_protocol(GSocketClient *client, GSocketProtocol protocol)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect(GSocketClient *client, GSocketConnectable *connectable, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GSocketClient * g_socket_client_new(void)
GIO_AVAILABLE_IN_ALL GSocketType g_socket_client_get_socket_type(GSocketClient *client)
GIO_AVAILABLE_IN_ALL GType g_socket_client_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_ALL void g_socket_client_set_enable_proxy(GSocketClient *client, gboolean enable)
GIO_DEPRECATED_IN_2_72 void g_socket_client_set_tls_validation_flags(GSocketClient *client, GTlsCertificateFlags flags)
GIO_DEPRECATED_IN_2_72 GTlsCertificateFlags g_socket_client_get_tls_validation_flags(GSocketClient *client)
GIO_AVAILABLE_IN_ALL void g_socket_client_set_family(GSocketClient *client, GSocketFamily family)
GIO_AVAILABLE_IN_ALL GSocketProtocol g_socket_client_get_protocol(GSocketClient *client)
GIO_AVAILABLE_IN_ALL void g_socket_client_connect_to_service_async(GSocketClient *client, const gchar *domain, const gchar *service, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_2_26 GSocketConnection * g_socket_client_connect_to_uri(GSocketClient *client, const gchar *uri, guint16 default_port, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect_to_service_finish(GSocketClient *client, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL guint g_socket_client_get_timeout(GSocketClient *client)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect_to_host(GSocketClient *client, const gchar *host_and_port, guint16 default_port, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL void g_socket_client_set_local_address(GSocketClient *client, GSocketAddress *address)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect_finish(GSocketClient *client, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_ALL void g_socket_client_set_timeout(GSocketClient *client, guint timeout)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect_to_service(GSocketClient *client, const gchar *domain, const gchar *service, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_ALL GSocketConnection * g_socket_client_connect_to_uri_finish(GSocketClient *client, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_2_36 void g_socket_client_set_proxy_resolver(GSocketClient *client, GProxyResolver *proxy_resolver)
GIO_AVAILABLE_IN_ALL void g_socket_client_connect_async(GSocketClient *client, GSocketConnectable *connectable, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
void * gpointer
Definition gtypes.h:109
unsigned int guint
Definition gtypes.h:61
static void error(LoadState *S, const char *why)
void(* _g_reserved4)(void)
void(* event)(GSocketClient *client, GSocketClientEvent event, GSocketConnectable *connectable, GIOStream *connection)
void(* _g_reserved2)(void)
void(* _g_reserved3)(void)
GObjectClass parent_class
void(* _g_reserved1)(void)
GObject parent_instance
GSocketClientPrivate * priv