Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

82 Zeilen
3.6 KiB

  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright © 2009 Codethink Limited
  4. * Copyright © 2009 Red Hat, Inc
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published
  8. * by the Free Software Foundation; either version 2 of the licence or (at
  9. * your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General
  17. * Public License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. *
  21. * Authors: Ryan Lortie <desrt@desrt.ca>
  22. * Alexander Larsson <alexl@redhat.com>
  23. */
  24. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  25. #error "Only <gio/gio.h> can be included directly."
  26. #endif
  27. #ifndef __G_THREADED_SOCKET_SERVICE_H__
  28. #define __G_THREADED_SOCKET_SERVICE_H__
  29. #include <gio/gsocketservice.h>
  30. G_BEGIN_DECLS
  31. #define G_TYPE_THREADED_SOCKET_SERVICE (g_threaded_socket_service_get_type ())
  32. #define G_THREADED_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
  33. G_TYPE_THREADED_SOCKET_SERVICE, \
  34. GThreadedSocketService))
  35. #define G_THREADED_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
  36. G_TYPE_THREADED_SOCKET_SERVICE, \
  37. GThreadedSocketServiceClass))
  38. #define G_IS_THREADED_SOCKET_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
  39. G_TYPE_THREADED_SOCKET_SERVICE))
  40. #define G_IS_THREADED_SOCKET_SERVICE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
  41. G_TYPE_THREADED_SOCKET_SERVICE))
  42. #define G_THREADED_SOCKET_SERVICE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
  43. G_TYPE_THREADED_SOCKET_SERVICE, \
  44. GThreadedSocketServiceClass))
  45. typedef struct _GThreadedSocketServicePrivate GThreadedSocketServicePrivate;
  46. typedef struct _GThreadedSocketServiceClass GThreadedSocketServiceClass;
  47. struct _GThreadedSocketServiceClass
  48. {
  49. GSocketServiceClass parent_class;
  50. gboolean (* run) (GThreadedSocketService *service,
  51. GSocketConnection *connection,
  52. GObject *source_object);
  53. /* Padding for future expansion */
  54. void (*_g_reserved1) (void);
  55. void (*_g_reserved2) (void);
  56. void (*_g_reserved3) (void);
  57. void (*_g_reserved4) (void);
  58. void (*_g_reserved5) (void);
  59. };
  60. struct _GThreadedSocketService
  61. {
  62. GSocketService parent_instance;
  63. GThreadedSocketServicePrivate *priv;
  64. };
  65. GType g_threaded_socket_service_get_type (void);
  66. GSocketService * g_threaded_socket_service_new (int max_threads);
  67. G_END_DECLS
  68. #endif /* __G_THREADED_SOCKET_SERVICE_H__ */