diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c index 021409d3c..2fa683fe8 100644 --- a/gio/gthreadedresolver.c +++ b/gio/gthreadedresolver.c @@ -38,6 +38,10 @@ #include "gsocketaddress.h" #include "gsrvtarget.h" +struct _GThreadedResolver +{ + GResolver parent_instance; +}; G_DEFINE_TYPE (GThreadedResolver, g_threaded_resolver, G_TYPE_RESOLVER) diff --git a/gio/gthreadedresolver.h b/gio/gthreadedresolver.h index ea76e4bfd..099df5b84 100644 --- a/gio/gthreadedresolver.h +++ b/gio/gthreadedresolver.h @@ -21,28 +21,23 @@ #ifndef __G_THREADED_RESOLVER_H__ #define __G_THREADED_RESOLVER_H__ +#include #include G_BEGIN_DECLS +/** + * GThreadedResolver: + * + * #GThreadedResolver is an implementation of #GResolver which calls the libc + * lookup functions in threads to allow them to run asynchronously. + * + * Since: 2.20 + */ #define G_TYPE_THREADED_RESOLVER (g_threaded_resolver_get_type ()) -#define G_THREADED_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_THREADED_RESOLVER, GThreadedResolver)) -#define G_THREADED_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_THREADED_RESOLVER, GThreadedResolverClass)) -#define G_IS_THREADED_RESOLVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_THREADED_RESOLVER)) -#define G_IS_THREADED_RESOLVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_THREADED_RESOLVER)) -#define G_THREADED_RESOLVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_THREADED_RESOLVER, GThreadedResolverClass)) - -typedef struct { - GResolver parent_instance; -} GThreadedResolver; - -typedef struct { - GResolverClass parent_class; - -} GThreadedResolverClass; GIO_AVAILABLE_IN_ALL -GType g_threaded_resolver_get_type (void) G_GNUC_CONST; +G_DECLARE_FINAL_TYPE (GThreadedResolver, g_threaded_resolver, G, THREADED_RESOLVER, GResolver) /* Used for a private test API */ #ifdef G_OS_UNIX