Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:59

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright (C) 2010 Collabora, Ltd.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
0021  */
0022 
0023 #ifndef __G_PROXY_RESOLVER_H__
0024 #define __G_PROXY_RESOLVER_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_PROXY_RESOLVER         (g_proxy_resolver_get_type ())
0035 #define G_PROXY_RESOLVER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_PROXY_RESOLVER, GProxyResolver))
0036 #define G_IS_PROXY_RESOLVER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_PROXY_RESOLVER))
0037 #define G_PROXY_RESOLVER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_PROXY_RESOLVER, GProxyResolverInterface))
0038 
0039 /**
0040  * G_PROXY_RESOLVER_EXTENSION_POINT_NAME:
0041  *
0042  * Extension point for proxy resolving functionality.
0043  * See [Extending GIO][extending-gio].
0044  */
0045 #define G_PROXY_RESOLVER_EXTENSION_POINT_NAME "gio-proxy-resolver"
0046 
0047 typedef struct _GProxyResolverInterface GProxyResolverInterface;
0048 
0049 struct _GProxyResolverInterface {
0050   GTypeInterface g_iface;
0051 
0052   /* Virtual Table */
0053   gboolean (* is_supported)  (GProxyResolver       *resolver);
0054 
0055   gchar ** (* lookup)        (GProxyResolver       *resolver,
0056                   const gchar          *uri,
0057                   GCancellable         *cancellable,
0058                   GError              **error);
0059 
0060   void     (* lookup_async)  (GProxyResolver       *resolver,
0061                   const gchar          *uri,
0062                   GCancellable         *cancellable,
0063                   GAsyncReadyCallback   callback,
0064                   gpointer              user_data);
0065 
0066   gchar ** (* lookup_finish) (GProxyResolver       *resolver,
0067                   GAsyncResult         *result,
0068                   GError              **error);
0069 };
0070 
0071 GIO_AVAILABLE_IN_ALL
0072 GType       g_proxy_resolver_get_type       (void) G_GNUC_CONST;
0073 GIO_AVAILABLE_IN_ALL
0074 GProxyResolver *g_proxy_resolver_get_default    (void);
0075 
0076 GIO_AVAILABLE_IN_ALL
0077 gboolean        g_proxy_resolver_is_supported   (GProxyResolver       *resolver);
0078 GIO_AVAILABLE_IN_ALL
0079 gchar         **g_proxy_resolver_lookup     (GProxyResolver       *resolver,
0080                          const gchar          *uri,
0081                          GCancellable         *cancellable,
0082                          GError              **error);
0083 GIO_AVAILABLE_IN_ALL
0084 void        g_proxy_resolver_lookup_async   (GProxyResolver       *resolver,
0085                          const gchar          *uri,
0086                          GCancellable         *cancellable,
0087                          GAsyncReadyCallback   callback,
0088                          gpointer              user_data);
0089 GIO_AVAILABLE_IN_ALL
0090 gchar         **g_proxy_resolver_lookup_finish  (GProxyResolver       *resolver,
0091                          GAsyncResult         *result,
0092                          GError              **error);
0093 
0094 
0095 G_END_DECLS
0096 
0097 #endif /* __G_PROXY_RESOLVER_H__ */