gsocketaddressenumerator.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright (C) 2008 Red Hat, Inc.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General
  18. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef __G_SOCKET_ADDRESS_ENUMERATOR_H__
  21. #define __G_SOCKET_ADDRESS_ENUMERATOR_H__
  22. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  23. #error "Only <gio/gio.h> can be included directly."
  24. #endif
  25. #include <gio/giotypes.h>
  26. G_BEGIN_DECLS
  27. #define G_TYPE_SOCKET_ADDRESS_ENUMERATOR (g_socket_address_enumerator_get_type ())
  28. #define G_SOCKET_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumerator))
  29. #define G_SOCKET_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumeratorClass))
  30. #define G_IS_SOCKET_ADDRESS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR))
  31. #define G_IS_SOCKET_ADDRESS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SOCKET_ADDRESS_ENUMERATOR))
  32. #define G_SOCKET_ADDRESS_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SOCKET_ADDRESS_ENUMERATOR, GSocketAddressEnumeratorClass))
  33. typedef struct _GSocketAddressEnumeratorClass GSocketAddressEnumeratorClass;
  34. struct _GSocketAddressEnumerator
  35. {
  36. /*< private >*/
  37. GObject parent_instance;
  38. };
  39. /**
  40. * GSocketAddressEnumeratorClass:
  41. * @next: Virtual method for g_socket_address_enumerator_next().
  42. * @next_async: Virtual method for g_socket_address_enumerator_next_async().
  43. * @next_finish: Virtual method for g_socket_address_enumerator_next_finish().
  44. *
  45. * Class structure for #GSocketAddressEnumerator.
  46. */
  47. struct _GSocketAddressEnumeratorClass
  48. {
  49. /*< private >*/
  50. GObjectClass parent_class;
  51. /*< public >*/
  52. /* Virtual Table */
  53. GSocketAddress * (* next) (GSocketAddressEnumerator *enumerator,
  54. GCancellable *cancellable,
  55. GError **error);
  56. void (* next_async) (GSocketAddressEnumerator *enumerator,
  57. GCancellable *cancellable,
  58. GAsyncReadyCallback callback,
  59. gpointer user_data);
  60. GSocketAddress * (* next_finish) (GSocketAddressEnumerator *enumerator,
  61. GAsyncResult *result,
  62. GError **error);
  63. };
  64. GIO_AVAILABLE_IN_ALL
  65. GType g_socket_address_enumerator_get_type (void) G_GNUC_CONST;
  66. GIO_AVAILABLE_IN_ALL
  67. GSocketAddress *g_socket_address_enumerator_next (GSocketAddressEnumerator *enumerator,
  68. GCancellable *cancellable,
  69. GError **error);
  70. GIO_AVAILABLE_IN_ALL
  71. void g_socket_address_enumerator_next_async (GSocketAddressEnumerator *enumerator,
  72. GCancellable *cancellable,
  73. GAsyncReadyCallback callback,
  74. gpointer user_data);
  75. GIO_AVAILABLE_IN_ALL
  76. GSocketAddress *g_socket_address_enumerator_next_finish (GSocketAddressEnumerator *enumerator,
  77. GAsyncResult *result,
  78. GError **error);
  79. G_END_DECLS
  80. #endif /* __G_SOCKET_ADDRESS_ENUMERATOR_H__ */