Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:00

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright © 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_THREADED_SOCKET_SERVICE_H__
0026 #define __G_THREADED_SOCKET_SERVICE_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/gsocketservice.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 #define G_TYPE_THREADED_SOCKET_SERVICE                      (g_threaded_socket_service_get_type ())
0037 #define G_THREADED_SOCKET_SERVICE(inst)                     (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
0038                                                              G_TYPE_THREADED_SOCKET_SERVICE,                         \
0039                                                              GThreadedSocketService))
0040 #define G_THREADED_SOCKET_SERVICE_CLASS(class)              (G_TYPE_CHECK_CLASS_CAST ((class),                       \
0041                                                              G_TYPE_THREADED_SOCKET_SERVICE,                         \
0042                                                              GThreadedSocketServiceClass))
0043 #define G_IS_THREADED_SOCKET_SERVICE(inst)                  (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
0044                                                              G_TYPE_THREADED_SOCKET_SERVICE))
0045 #define G_IS_THREADED_SOCKET_SERVICE_CLASS(class)           (G_TYPE_CHECK_CLASS_TYPE ((class),                       \
0046                                                              G_TYPE_THREADED_SOCKET_SERVICE))
0047 #define G_THREADED_SOCKET_SERVICE_GET_CLASS(inst)           (G_TYPE_INSTANCE_GET_CLASS ((inst),                      \
0048                                                              G_TYPE_THREADED_SOCKET_SERVICE,                         \
0049                                                              GThreadedSocketServiceClass))
0050 
0051 typedef struct _GThreadedSocketServicePrivate               GThreadedSocketServicePrivate;
0052 typedef struct _GThreadedSocketServiceClass                 GThreadedSocketServiceClass;
0053 
0054 struct _GThreadedSocketServiceClass
0055 {
0056   GSocketServiceClass parent_class;
0057 
0058   gboolean (* run) (GThreadedSocketService *service,
0059                     GSocketConnection      *connection,
0060                     GObject                *source_object);
0061 
0062   /* Padding for future expansion */
0063   void (*_g_reserved1) (void);
0064   void (*_g_reserved2) (void);
0065   void (*_g_reserved3) (void);
0066   void (*_g_reserved4) (void);
0067   void (*_g_reserved5) (void);
0068 };
0069 
0070 struct _GThreadedSocketService
0071 {
0072   GSocketService parent_instance;
0073   GThreadedSocketServicePrivate *priv;
0074 };
0075 
0076 GIO_AVAILABLE_IN_ALL
0077 GType                   g_threaded_socket_service_get_type              (void);
0078 GIO_AVAILABLE_IN_ALL
0079 GSocketService *        g_threaded_socket_service_new                   (int max_threads);
0080 
0081 G_END_DECLS
0082 
0083 #endif /* __G_THREADED_SOCKET_SERVICE_H__ */