From 4e3ff1b24118a1913a77285efc33ca38685a3ea5 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Wed, 27 Mar 2013 17:58:32 +0100 Subject: Make ephy-about-handler a GObject and handle all request using the same API about:plugins was handled differently because it's asynchrounous, now all handlers can be implemented asynchronously too. https://bugzilla.gnome.org/show_bug.cgi?id=696728 --- embed/ephy-about-handler.h | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'embed/ephy-about-handler.h') diff --git a/embed/ephy-about-handler.h b/embed/ephy-about-handler.h index 1b9fa6c65..ae4fdb812 100644 --- a/embed/ephy-about-handler.h +++ b/embed/ephy-about-handler.h @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* - * Copyright © 2012 Igalia S.L. + * Copyright © 2012, 2013 Igalia S.L. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,16 +21,41 @@ #ifndef EPHY_ABOUT_HANDLER_H #define EPHY_ABOUT_HANDLER_H -#include +#include G_BEGIN_DECLS +#define EPHY_TYPE_ABOUT_HANDLER (ephy_about_handler_get_type ()) +#define EPHY_ABOUT_HANDLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_ABOUT_HANDLER, EphyAboutHandler)) +#define EPHY_ABOUT_HANDLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_ABOUT_HANDLER, EphyAboutHandlerClass)) +#define EPHY_IS_ABOUT_HANDLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_ABOUT_HANDLER)) +#define EPHY_IS_ABOUT_HANDLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_ABOUT_HANDLER)) +#define EPHY_ABOUT_HANDLER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_ABOUT_HANDLER, EphyAboutHandlerClass)) + #define EPHY_ABOUT_SCHEME "ephy-about" #define EPHY_ABOUT_SCHEME_LEN 10 -GString * ephy_about_handler_handle (const char *about); -void _ephy_about_handler_handle_plugins (GString *data_str, - GList *plugin_list); +typedef struct _EphyAboutHandlerClass EphyAboutHandlerClass; +typedef struct _EphyAboutHandler EphyAboutHandler; +typedef struct _EphyAboutHandlerPrivate EphyAboutHandlerPrivate; + +struct _EphyAboutHandler +{ + GObject parent; + + EphyAboutHandlerPrivate *priv; +}; + +struct _EphyAboutHandlerClass +{ + GObjectClass parent_class; +}; + +GType ephy_about_handler_get_type (void); + +EphyAboutHandler *ephy_about_handler_new (void); +void ephy_about_handler_handle_request (EphyAboutHandler *handler, + WebKitURISchemeRequest *request); G_END_DECLS #endif /* EPHY_ABOUT_HANDLER_H */ -- cgit v1.2.3