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 © 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_SERVICE_H__
0026 #define __G_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/gsocketlistener.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 #define G_TYPE_SOCKET_SERVICE                               (g_socket_service_get_type ())
0037 #define G_SOCKET_SERVICE(inst)                              (G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
0038                                                              G_TYPE_SOCKET_SERVICE, GSocketService))
0039 #define G_SOCKET_SERVICE_CLASS(class)                       (G_TYPE_CHECK_CLASS_CAST ((class),                       \
0040                                                              G_TYPE_SOCKET_SERVICE, GSocketServiceClass))
0041 #define G_IS_SOCKET_SERVICE(inst)                           (G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
0042                                                              G_TYPE_SOCKET_SERVICE))
0043 #define G_IS_SOCKET_SERVICE_CLASS(class)                    (G_TYPE_CHECK_CLASS_TYPE ((class),                       \
0044                                                              G_TYPE_SOCKET_SERVICE))
0045 #define G_SOCKET_SERVICE_GET_CLASS(inst)                    (G_TYPE_INSTANCE_GET_CLASS ((inst),                      \
0046                                                              G_TYPE_SOCKET_SERVICE, GSocketServiceClass))
0047 
0048 typedef struct _GSocketServicePrivate                       GSocketServicePrivate;
0049 typedef struct _GSocketServiceClass                         GSocketServiceClass;
0050 
0051 /**
0052  * GSocketServiceClass:
0053  * @incoming: signal emitted when new connections are accepted
0054  *
0055  * Class structure for #GSocketService.
0056  */
0057 struct _GSocketServiceClass
0058 {
0059   GSocketListenerClass parent_class;
0060 
0061   gboolean (* incoming) (GSocketService    *service,
0062                          GSocketConnection *connection,
0063              GObject           *source_object);
0064 
0065   /* Padding for future expansion */
0066   void (*_g_reserved1) (void);
0067   void (*_g_reserved2) (void);
0068   void (*_g_reserved3) (void);
0069   void (*_g_reserved4) (void);
0070   void (*_g_reserved5) (void);
0071   void (*_g_reserved6) (void);
0072 };
0073 
0074 struct _GSocketService
0075 {
0076   GSocketListener parent_instance;
0077   GSocketServicePrivate *priv;
0078 };
0079 
0080 GIO_AVAILABLE_IN_ALL
0081 GType           g_socket_service_get_type  (void);
0082 
0083 GIO_AVAILABLE_IN_ALL
0084 GSocketService *g_socket_service_new       (void);
0085 GIO_AVAILABLE_IN_ALL
0086 void            g_socket_service_start     (GSocketService *service);
0087 GIO_AVAILABLE_IN_ALL
0088 void            g_socket_service_stop      (GSocketService *service);
0089 GIO_AVAILABLE_IN_ALL
0090 gboolean        g_socket_service_is_active (GSocketService *service);
0091 
0092 
0093 G_END_DECLS
0094 
0095 #endif /* __G_SOCKET_SERVICE_H__ */