1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
2 | /* |
3 | * Copyright (C) 2008 Red Hat, Inc. |
4 | */ |
5 | |
6 | #ifndef __SOUP_PROXY_RESOLVER_H__ |
7 | #define __SOUP_PROXY_RESOLVER_H__ 1 |
8 | |
9 | #include <libsoup/soup-types.h> |
10 | |
11 | G_BEGIN_DECLS |
12 | |
13 | #ifndef SOUP_DISABLE_DEPRECATED |
14 | |
15 | #define SOUP_TYPE_PROXY_RESOLVER (soup_proxy_resolver_get_type ()) |
16 | #define SOUP_PROXY_RESOLVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_PROXY_RESOLVER, SoupProxyResolver)) |
17 | #define SOUP_PROXY_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_PROXY_RESOLVER, SoupProxyResolverInterface)) |
18 | #define SOUP_IS_PROXY_RESOLVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_PROXY_RESOLVER)) |
19 | #define SOUP_IS_PROXY_RESOLVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_PROXY_RESOLVER)) |
20 | #define SOUP_PROXY_RESOLVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SOUP_TYPE_PROXY_RESOLVER, SoupProxyResolverInterface)) |
21 | |
22 | typedef struct _SoupProxyResolver SoupProxyResolver; |
23 | |
24 | typedef void (*SoupProxyResolverCallback) (SoupProxyResolver *proxy_resolver, SoupMessage *msg, |
25 | guint arg, SoupAddress *addr, gpointer user_data); |
26 | |
27 | typedef struct { |
28 | GTypeInterface base; |
29 | |
30 | /* virtual methods */ |
31 | void (*get_proxy_async) (SoupProxyResolver *proxy_resolver, |
32 | SoupMessage *msg, GMainContext *async_context, |
33 | GCancellable *cancellable, |
34 | SoupProxyResolverCallback callback, |
35 | gpointer user_data); |
36 | guint (*get_proxy_sync) (SoupProxyResolver *proxy_resolver, |
37 | SoupMessage *msg, GCancellable *cancellable, |
38 | SoupAddress **addr); |
39 | |
40 | } SoupProxyResolverInterface; |
41 | |
42 | SOUP_AVAILABLE_IN_2_4 |
43 | SOUP_DEPRECATED_IN_2_28 |
44 | GType soup_proxy_resolver_get_type (void); |
45 | |
46 | SOUP_AVAILABLE_IN_2_4 |
47 | SOUP_DEPRECATED_IN_2_28 |
48 | void soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, |
49 | SoupMessage *msg, |
50 | GMainContext *async_context, |
51 | GCancellable *cancellable, |
52 | SoupProxyResolverCallback callback, |
53 | gpointer user_data); |
54 | SOUP_AVAILABLE_IN_2_4 |
55 | SOUP_DEPRECATED_IN_2_28 |
56 | guint soup_proxy_resolver_get_proxy_sync (SoupProxyResolver *proxy_resolver, |
57 | SoupMessage *msg, |
58 | GCancellable *cancellable, |
59 | SoupAddress **addr); |
60 | |
61 | #endif |
62 | |
63 | G_END_DECLS |
64 | |
65 | #endif /* __SOUP_PROXY_RESOLVER_H__ */ |
66 | |