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 © 2008, 2009 Codethink Limited
0004  * Copyright © 2009 Red Hat, Inc
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-or-later
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Lesser General Public
0010  * License as published by the Free Software Foundation; either
0011  * version 2.1 of the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Lesser General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Lesser General
0019  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0020  *
0021  * Authors: Ryan Lortie <desrt@desrt.ca>
0022  *          Alexander Larsson <alexl@redhat.com>
0023  */
0024 
0025 #ifndef __G_SOCKET_CLIENT_H__
0026 #define __G_SOCKET_CLIENT_H__
0027 
0028 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0029 #error "Only <gio/gio.h> can be included directly."
0030 #endif
0031 
0032 #include <gio/giotypes.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 #define G_TYPE_SOCKET_CLIENT                                (g_socket_client_get_type ())
0037 #define G_SOCKET_CLIENT(inst)                               (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
0038                                                              G_TYPE_SOCKET_CLIENT, GSocketClient))
0039 #define G_SOCKET_CLIENT_CLASS(class)                        (G_TYPE_CHECK_CLASS_CAST ((class),                       \
0040                                                              G_TYPE_SOCKET_CLIENT, GSocketClientClass))
0041 #define G_IS_SOCKET_CLIENT(inst)                            (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
0042                                                              G_TYPE_SOCKET_CLIENT))
0043 #define G_IS_SOCKET_CLIENT_CLASS(class)                     (G_TYPE_CHECK_CLASS_TYPE ((class),                       \
0044                                                              G_TYPE_SOCKET_CLIENT))
0045 #define G_SOCKET_CLIENT_GET_CLASS(inst)                     (G_TYPE_INSTANCE_GET_CLASS ((inst),                      \
0046                                                              G_TYPE_SOCKET_CLIENT, GSocketClientClass))
0047 
0048 typedef struct _GSocketClientPrivate                        GSocketClientPrivate;
0049 typedef struct _GSocketClientClass                          GSocketClientClass;
0050 
0051 struct _GSocketClientClass
0052 {
0053   GObjectClass parent_class;
0054 
0055   void (* event) (GSocketClient       *client,
0056           GSocketClientEvent  event,
0057           GSocketConnectable  *connectable,
0058           GIOStream           *connection);
0059 
0060   /* Padding for future expansion */
0061   void (*_g_reserved1) (void);
0062   void (*_g_reserved2) (void);
0063   void (*_g_reserved3) (void);
0064   void (*_g_reserved4) (void);
0065 };
0066 
0067 struct _GSocketClient
0068 {
0069   GObject parent_instance;
0070   GSocketClientPrivate *priv;
0071 };
0072 
0073 GIO_AVAILABLE_IN_ALL
0074 GType                   g_socket_client_get_type                        (void) G_GNUC_CONST;
0075 
0076 GIO_AVAILABLE_IN_ALL
0077 GSocketClient          *g_socket_client_new                             (void);
0078 
0079 GIO_AVAILABLE_IN_ALL
0080 GSocketFamily           g_socket_client_get_family                      (GSocketClient        *client);
0081 GIO_AVAILABLE_IN_ALL
0082 void                    g_socket_client_set_family                      (GSocketClient        *client,
0083                                      GSocketFamily         family);
0084 GIO_AVAILABLE_IN_ALL
0085 GSocketType             g_socket_client_get_socket_type                 (GSocketClient        *client);
0086 GIO_AVAILABLE_IN_ALL
0087 void                    g_socket_client_set_socket_type                 (GSocketClient        *client,
0088                                      GSocketType           type);
0089 GIO_AVAILABLE_IN_ALL
0090 GSocketProtocol         g_socket_client_get_protocol                    (GSocketClient        *client);
0091 GIO_AVAILABLE_IN_ALL
0092 void                    g_socket_client_set_protocol                    (GSocketClient        *client,
0093                                      GSocketProtocol       protocol);
0094 GIO_AVAILABLE_IN_ALL
0095 GSocketAddress         *g_socket_client_get_local_address               (GSocketClient        *client);
0096 GIO_AVAILABLE_IN_ALL
0097 void                    g_socket_client_set_local_address               (GSocketClient        *client,
0098                                      GSocketAddress       *address);
0099 GIO_AVAILABLE_IN_ALL
0100 guint                   g_socket_client_get_timeout                     (GSocketClient        *client);
0101 GIO_AVAILABLE_IN_ALL
0102 void                    g_socket_client_set_timeout                     (GSocketClient        *client,
0103                                      guint                 timeout);
0104 GIO_AVAILABLE_IN_ALL
0105 gboolean                g_socket_client_get_enable_proxy                (GSocketClient        *client);
0106 GIO_AVAILABLE_IN_ALL
0107 void                    g_socket_client_set_enable_proxy                (GSocketClient        *client,
0108                                          gboolean         enable);
0109 
0110 GIO_AVAILABLE_IN_2_28
0111 gboolean                g_socket_client_get_tls                         (GSocketClient        *client);
0112 GIO_AVAILABLE_IN_2_28
0113 void                    g_socket_client_set_tls                         (GSocketClient        *client,
0114                                      gboolean              tls);
0115 GIO_DEPRECATED_IN_2_72
0116 GTlsCertificateFlags    g_socket_client_get_tls_validation_flags        (GSocketClient        *client);
0117 GIO_DEPRECATED_IN_2_72
0118 void                    g_socket_client_set_tls_validation_flags        (GSocketClient        *client,
0119                                      GTlsCertificateFlags  flags);
0120 GIO_AVAILABLE_IN_2_36
0121 GProxyResolver         *g_socket_client_get_proxy_resolver              (GSocketClient        *client);
0122 GIO_AVAILABLE_IN_2_36
0123 void                    g_socket_client_set_proxy_resolver              (GSocketClient        *client,
0124                                                                          GProxyResolver       *proxy_resolver);
0125 
0126 GIO_AVAILABLE_IN_ALL
0127 GSocketConnection *     g_socket_client_connect                         (GSocketClient        *client,
0128                                                                          GSocketConnectable   *connectable,
0129                                                                          GCancellable         *cancellable,
0130                                                                          GError              **error);
0131 GIO_AVAILABLE_IN_ALL
0132 GSocketConnection *     g_socket_client_connect_to_host                 (GSocketClient        *client,
0133                                      const gchar          *host_and_port,
0134                                      guint16               default_port,
0135                                                                          GCancellable         *cancellable,
0136                                                                          GError              **error);
0137 GIO_AVAILABLE_IN_ALL
0138 GSocketConnection *     g_socket_client_connect_to_service              (GSocketClient        *client,
0139                                      const gchar          *domain,
0140                                      const gchar          *service,
0141                                                                          GCancellable         *cancellable,
0142                                                                          GError              **error);
0143 GIO_AVAILABLE_IN_2_26
0144 GSocketConnection *     g_socket_client_connect_to_uri                  (GSocketClient        *client,
0145                                      const gchar          *uri,
0146                                      guint16               default_port,
0147                                                                          GCancellable         *cancellable,
0148                                                                          GError              **error);
0149 GIO_AVAILABLE_IN_ALL
0150 void                    g_socket_client_connect_async                   (GSocketClient        *client,
0151                                                                          GSocketConnectable   *connectable,
0152                                                                          GCancellable         *cancellable,
0153                                                                          GAsyncReadyCallback   callback,
0154                                                                          gpointer              user_data);
0155 GIO_AVAILABLE_IN_ALL
0156 GSocketConnection *     g_socket_client_connect_finish                  (GSocketClient        *client,
0157                                                                          GAsyncResult         *result,
0158                                                                          GError              **error);
0159 GIO_AVAILABLE_IN_ALL
0160 void                    g_socket_client_connect_to_host_async           (GSocketClient        *client,
0161                                      const gchar          *host_and_port,
0162                                      guint16               default_port,
0163                                                                          GCancellable         *cancellable,
0164                                                                          GAsyncReadyCallback   callback,
0165                                                                          gpointer              user_data);
0166 GIO_AVAILABLE_IN_ALL
0167 GSocketConnection *     g_socket_client_connect_to_host_finish          (GSocketClient        *client,
0168                                                                          GAsyncResult         *result,
0169                                                                          GError              **error);
0170 
0171 GIO_AVAILABLE_IN_ALL
0172 void                    g_socket_client_connect_to_service_async        (GSocketClient        *client,
0173                                      const gchar          *domain,
0174                                      const gchar          *service,
0175                                                                          GCancellable         *cancellable,
0176                                                                          GAsyncReadyCallback   callback,
0177                                                                          gpointer              user_data);
0178 GIO_AVAILABLE_IN_ALL
0179 GSocketConnection *     g_socket_client_connect_to_service_finish       (GSocketClient        *client,
0180                                                                          GAsyncResult         *result,
0181                                                                          GError              **error);
0182 GIO_AVAILABLE_IN_ALL
0183 void                    g_socket_client_connect_to_uri_async            (GSocketClient        *client,
0184                                      const gchar          *uri,
0185                                      guint16               default_port,
0186                                                                          GCancellable         *cancellable,
0187                                                                          GAsyncReadyCallback   callback,
0188                                                                          gpointer              user_data);
0189 GIO_AVAILABLE_IN_ALL
0190 GSocketConnection *     g_socket_client_connect_to_uri_finish           (GSocketClient        *client,
0191                                                                          GAsyncResult         *result,
0192                                                                          GError              **error);
0193 GIO_AVAILABLE_IN_ALL
0194 void            g_socket_client_add_application_proxy       (GSocketClient        *client,
0195                                      const gchar          *protocol);
0196 
0197 G_END_DECLS
0198 
0199 #endif /* __G_SOCKET_CLIENT_H___ */