1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*
3 * Copyright (C) 2009 Red Hat, Inc.
4 */
5
6#ifndef __SOUP_PROXY_URI_RESOLVER_H__
7#define __SOUP_PROXY_URI_RESOLVER_H__ 1
8
9#include <libsoup/soup-proxy-resolver.h>
10
11G_BEGIN_DECLS
12
13#define SOUP_TYPE_PROXY_URI_RESOLVER (soup_proxy_uri_resolver_get_type ())
14#define SOUP_PROXY_URI_RESOLVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_PROXY_URI_RESOLVER, SoupProxyURIResolver))
15#define SOUP_PROXY_URI_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_PROXY_URI_RESOLVER, SoupProxyURIResolverInterface))
16#define SOUP_IS_PROXY_URI_RESOLVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_PROXY_URI_RESOLVER))
17#define SOUP_IS_PROXY_URI_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_PROXY_URI_RESOLVER))
18#define SOUP_PROXY_URI_RESOLVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SOUP_TYPE_PROXY_URI_RESOLVER, SoupProxyURIResolverInterface))
19
20typedef struct _SoupProxyURIResolver SoupProxyURIResolver;
21
22typedef void (*SoupProxyURIResolverCallback) (SoupProxyURIResolver *resolver,
23 guint status, SoupURI *proxy_uri,
24 gpointer user_data);
25
26typedef struct {
27 GTypeInterface base;
28
29 /* virtual methods */
30 void (*get_proxy_uri_async) (SoupProxyURIResolver *proxy_uri_resolver,
31 SoupURI *uri, GMainContext *async_context,
32 GCancellable *cancellable,
33 SoupProxyURIResolverCallback callback,
34 gpointer user_data);
35 guint (*get_proxy_uri_sync) (SoupProxyURIResolver *proxy_uri_resolver,
36 SoupURI *uri, GCancellable *cancellable,
37 SoupURI **proxy_uri);
38
39 /* Padding for future expansion */
40 void (*_libsoup_reserved1) (void);
41 void (*_libsoup_reserved2) (void);
42 void (*_libsoup_reserved3) (void);
43 void (*_libsoup_reserved4) (void);
44} SoupProxyURIResolverInterface;
45
46SOUP_AVAILABLE_IN_2_28
47SOUP_DEPRECATED_IN_2_44
48GType soup_proxy_uri_resolver_get_type (void);
49
50SOUP_AVAILABLE_IN_2_28
51SOUP_DEPRECATED_IN_2_44
52void soup_proxy_uri_resolver_get_proxy_uri_async (SoupProxyURIResolver *proxy_uri_resolver,
53 SoupURI *uri,
54 GMainContext *async_context,
55 GCancellable *cancellable,
56 SoupProxyURIResolverCallback callback,
57 gpointer user_data);
58SOUP_AVAILABLE_IN_2_28
59SOUP_DEPRECATED_IN_2_44
60guint soup_proxy_uri_resolver_get_proxy_uri_sync (SoupProxyURIResolver *proxy_uri_resolver,
61 SoupURI *uri,
62 GCancellable *cancellable,
63 SoupURI **proxy_uri);
64
65G_END_DECLS
66
67#endif /* __SOUP_PROXY_URI_RESOLVER_H__ */
68