gsimpleproxyresolver.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* GIO - GLib Input, Output and Streaming Library
  2. *
  3. * Copyright 2010, 2013 Red Hat, Inc.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser 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. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General
  16. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef __G_SIMPLE_PROXY_RESOLVER_H__
  19. #define __G_SIMPLE_PROXY_RESOLVER_H__
  20. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  21. #error "Only <gio/gio.h> can be included directly."
  22. #endif
  23. #include <gio/gproxyresolver.h>
  24. G_BEGIN_DECLS
  25. #define G_TYPE_SIMPLE_PROXY_RESOLVER (g_simple_proxy_resolver_get_type ())
  26. #define G_SIMPLE_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolver))
  27. #define G_SIMPLE_PROXY_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolverClass))
  28. #define G_IS_SIMPLE_PROXY_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SIMPLE_PROXY_RESOLVER))
  29. #define G_IS_SIMPLE_PROXY_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_SIMPLE_PROXY_RESOLVER))
  30. #define G_SIMPLE_PROXY_RESOLVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_SIMPLE_PROXY_RESOLVER, GSimpleProxyResolverClass))
  31. /**
  32. * GSimpleProxyResolver:
  33. *
  34. * A #GProxyResolver implementation for using a fixed set of proxies.
  35. **/
  36. typedef struct _GSimpleProxyResolver GSimpleProxyResolver;
  37. typedef struct _GSimpleProxyResolverPrivate GSimpleProxyResolverPrivate;
  38. typedef struct _GSimpleProxyResolverClass GSimpleProxyResolverClass;
  39. struct _GSimpleProxyResolver
  40. {
  41. GObject parent_instance;
  42. /*< private >*/
  43. GSimpleProxyResolverPrivate *priv;
  44. };
  45. struct _GSimpleProxyResolverClass
  46. {
  47. GObjectClass parent_class;
  48. /*< private >*/
  49. /* Padding for future expansion */
  50. void (*_g_reserved1) (void);
  51. void (*_g_reserved2) (void);
  52. void (*_g_reserved3) (void);
  53. void (*_g_reserved4) (void);
  54. void (*_g_reserved5) (void);
  55. };
  56. GLIB_AVAILABLE_IN_2_36
  57. GType g_simple_proxy_resolver_get_type (void) G_GNUC_CONST;
  58. GLIB_AVAILABLE_IN_2_36
  59. GProxyResolver *g_simple_proxy_resolver_new (const gchar *default_proxy,
  60. gchar **ignore_hosts);
  61. GLIB_AVAILABLE_IN_2_36
  62. void g_simple_proxy_resolver_set_default_proxy (GSimpleProxyResolver *resolver,
  63. const gchar *default_proxy);
  64. GLIB_AVAILABLE_IN_2_36
  65. void g_simple_proxy_resolver_set_ignore_hosts (GSimpleProxyResolver *resolver,
  66. gchar **ignore_hosts);
  67. GLIB_AVAILABLE_IN_2_36
  68. void g_simple_proxy_resolver_set_uri_proxy (GSimpleProxyResolver *resolver,
  69. const gchar *uri_scheme,
  70. const gchar *proxy);
  71. G_END_DECLS
  72. #endif /* __G_SIMPLE_PROXY_RESOLVER_H__ */