soup-requester.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  2. /*
  3. * Copyright (C) 2010 Igalia S.L.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef SOUP_REQUESTER_H
  21. #define SOUP_REQUESTER_H 1
  22. #ifdef LIBSOUP_USE_UNSTABLE_REQUEST_API
  23. #include <libsoup/soup-types.h>
  24. G_BEGIN_DECLS
  25. #define SOUP_TYPE_REQUESTER (soup_requester_get_type ())
  26. #define SOUP_REQUESTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_REQUESTER, SoupRequester))
  27. #define SOUP_REQUESTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_REQUESTER, SoupRequesterClass))
  28. #define SOUP_IS_REQUESTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_REQUESTER))
  29. #define SOUP_IS_REQUESTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_REQUESTER))
  30. #define SOUP_REQUESTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_REQUESTER, SoupRequesterClass))
  31. typedef struct _SoupRequester SoupRequester;
  32. typedef struct _SoupRequesterPrivate SoupRequesterPrivate;
  33. struct _SoupRequester {
  34. GObject parent;
  35. SoupRequesterPrivate *priv;
  36. };
  37. typedef struct {
  38. GObjectClass parent_class;
  39. } SoupRequesterClass;
  40. SOUP_AVAILABLE_IN_2_34
  41. SOUP_DEPRECATED_IN_2_42
  42. GType soup_requester_get_type (void);
  43. SOUP_AVAILABLE_IN_2_34
  44. SOUP_DEPRECATED_IN_2_42
  45. SoupRequester *soup_requester_new (void);
  46. SOUP_AVAILABLE_IN_2_34
  47. SOUP_DEPRECATED_IN_2_42_FOR(soup_session_request)
  48. SoupRequest *soup_requester_request (SoupRequester *requester,
  49. const char *uri_string,
  50. GError **error);
  51. SOUP_AVAILABLE_IN_2_34
  52. SOUP_DEPRECATED_IN_2_42_FOR(soup_session_request_uri)
  53. SoupRequest *soup_requester_request_uri (SoupRequester *requester,
  54. SoupURI *uri,
  55. GError **error);
  56. SOUP_AVAILABLE_IN_2_34
  57. SOUP_DEPRECATED_IN_2_42_FOR(SOUP_REQUEST_ERROR)
  58. GQuark soup_requester_error_quark (void);
  59. #define SOUP_REQUESTER_ERROR soup_requester_error_quark ()
  60. typedef enum {
  61. SOUP_REQUESTER_ERROR_BAD_URI,
  62. SOUP_REQUESTER_ERROR_UNSUPPORTED_URI_SCHEME
  63. } SoupRequesterError;
  64. G_END_DECLS
  65. #endif /* LIBSOUP_USE_UNSTABLE_REQUEST_API */
  66. #endif /* SOUP_REQUESTER_H */