diff options
author | Dan Winship <danw@gnome.org> | 2009-06-06 18:57:51 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2009-06-06 22:58:53 -0400 |
commit | e636754a29691d96e89297c2d7c31d829d1de878 (patch) | |
tree | 4a32640e9251f4e44521abe6786362dc39a26e34 /libsoup/soup-proxy-uri-resolver.h | |
parent | 83da293b3f2038d969e83c4227db817046092d2d (diff) | |
download | libsoup-e636754a29691d96e89297c2d7c31d829d1de878.tar.gz |
Implement SoupProxyURIResolver, to replace SoupProxyResolver
Simplifies implementations, allows for non-http proxy resolution, and
allows authentication information to be passed.
http://bugzilla.gnome.org/show_bug.cgi?id=580051
Diffstat (limited to 'libsoup/soup-proxy-uri-resolver.h')
-rw-r--r-- | libsoup/soup-proxy-uri-resolver.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libsoup/soup-proxy-uri-resolver.h b/libsoup/soup-proxy-uri-resolver.h new file mode 100644 index 00000000..97476cb0 --- /dev/null +++ b/libsoup/soup-proxy-uri-resolver.h @@ -0,0 +1,57 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2009 Red Hat, Inc. + */ + +#ifndef SOUP_PROXY_URI_RESOLVER_H +#define SOUP_PROXY_URI_RESOLVER_H 1 + +#include <libsoup/soup-proxy-resolver.h> + +G_BEGIN_DECLS + +#define SOUP_TYPE_PROXY_URI_RESOLVER (soup_proxy_uri_resolver_get_type ()) +#define SOUP_PROXY_URI_RESOLVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_PROXY_URI_RESOLVER, SoupProxyURIResolver)) +#define SOUP_PROXY_URI_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_PROXY_URI_RESOLVER, SoupProxyURIResolverInterface)) +#define SOUP_IS_PROXY_URI_RESOLVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_PROXY_URI_RESOLVER)) +#define SOUP_IS_PROXY_URI_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_PROXY_URI_RESOLVER)) +#define SOUP_PROXY_URI_RESOLVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SOUP_TYPE_PROXY_URI_RESOLVER, SoupProxyURIResolverInterface)) + +typedef struct _SoupProxyURIResolver SoupProxyURIResolver; + +typedef void (*SoupProxyURIResolverCallback) (SoupProxyURIResolver *, + guint, SoupURI *, gpointer); + +typedef struct { + GTypeInterface base; + + /* virtual methods */ + void (*get_proxy_uri_async) (SoupProxyURIResolver *, SoupURI *, + GMainContext *, GCancellable *, + SoupProxyURIResolverCallback, gpointer); + guint (*get_proxy_uri_sync) (SoupProxyURIResolver *, SoupURI *, + GCancellable *, SoupURI **); + + /* Padding for future expansion */ + void (*_libsoup_reserved1) (void); + void (*_libsoup_reserved2) (void); + void (*_libsoup_reserved3) (void); + void (*_libsoup_reserved4) (void); +} SoupProxyURIResolverInterface; + +GType soup_proxy_uri_resolver_get_type (void); + +void soup_proxy_uri_resolver_get_proxy_uri_async (SoupProxyURIResolver *proxy_uri_resolver, + SoupURI *uri, + GMainContext *async_context, + GCancellable *cancellable, + SoupProxyURIResolverCallback callback, + gpointer user_data); +guint soup_proxy_uri_resolver_get_proxy_uri_sync (SoupProxyURIResolver *proxy_uri_resolver, + SoupURI *uri, + GCancellable *cancellable, + SoupURI **proxy_uri); + +G_END_DECLS + +#endif /*SOUP_PROXY_URI_RESOLVER_H*/ |