diff options
author | Xan Lopez <xan@igalia.com> | 2012-09-29 16:10:37 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-10-01 04:46:04 +0800 |
commit | 253ce5aa8e437687f329d3d51469fdabda3ee8d7 (patch) | |
tree | 275cb8bf461cd2847465c6772d69c036cf8ab2fe /src/uri-tester.h | |
parent | 892cab7e083e801b5fb5e7047b6305cfe9acd7b6 (diff) | |
download | gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.tar gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.tar.gz gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.tar.bz2 gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.tar.lz gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.tar.xz gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.tar.zst gsoc2013-epiphany-253ce5aa8e437687f329d3d51469fdabda3ee8d7.zip |
Import adblock extension into the source tree
This commit imports the adblock extension from 'epiphany-extensions'
with as few modifications as possible. Further modifications and
simplifications are possible, but for now we just load it
unconditionally, enabled.
We have it in the src/ directory because it depends on some high-level
objects in Epiphany (EphyExtension, EphyWindow), but in the future
we'll probably move it to embed/, transforming it from an extension
into just the specific implementation of our EphyAdblockManager
object.
https://bugzilla.gnome.org/show_bug.cgi?id=681657
Diffstat (limited to 'src/uri-tester.h')
-rw-r--r-- | src/uri-tester.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/uri-tester.h b/src/uri-tester.h new file mode 100644 index 000000000..d8fb85aec --- /dev/null +++ b/src/uri-tester.h @@ -0,0 +1,72 @@ +/* + * Copyright © 2011 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 + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef URI_TESTER_H +#define URI_TESTER_H + +#include "ephy-adblock.h" + +#include <glib-object.h> +#include <glib.h> + +G_BEGIN_DECLS + +#define TYPE_URI_TESTER (uri_tester_get_type ()) +#define URI_TESTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_URI_TESTER, UriTester)) +#define URI_TESTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TYPE_URI_TESTER, UriTesterClass)) +#define IS_URI_TESTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_URI_TESTER)) +#define IS_URI_TESTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_URI_TESTER)) +#define URI_TESTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_URI_TESTER, UriTesterClass)) + +typedef struct _UriTester UriTester; +typedef struct _UriTesterClass UriTesterClass; +typedef struct _UriTesterPrivate UriTesterPrivate; + +struct _UriTester +{ + GObject parent_instance; + + /*< private >*/ + UriTesterPrivate *priv; +}; + +struct _UriTesterClass +{ + GObjectClass parent_class; +}; + +GType uri_tester_get_type (void); + +void uri_tester_register (GTypeModule *module); + +UriTester *uri_tester_new (void); + +gboolean uri_tester_test_uri (UriTester *tester, + const char *req_uri, + const char *page_uri, + AdUriCheckType type); + +void uri_tester_set_filters (UriTester *tester, GSList *filters); + +GSList *uri_tester_get_filters (UriTester *tester); + +void uri_tester_reload (UriTester *tester); + +G_END_DECLS + +#endif /* URI_TESTER_H */ |