2 * Copyright (C) 2010 Martin Willi
3 * Copyright (C) 2010 revosec AG
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 #include "soup_plugin.h"
17 #include "soup_fetcher.h"
20 #include <glib-object.h>
24 typedef struct private_soup_plugin_t private_soup_plugin_t
;
27 * private data of soup_plugin
29 struct private_soup_plugin_t
{
37 METHOD(plugin_t
, get_name
, char*,
38 private_soup_plugin_t
*this)
43 METHOD(plugin_t
, get_features
, int,
44 private_soup_plugin_t
*this, plugin_feature_t
*features
[])
46 static plugin_feature_t f
[] = {
47 PLUGIN_REGISTER(FETCHER
, soup_fetcher_create
),
48 PLUGIN_PROVIDE(FETCHER
, "http://"),
49 PLUGIN_PROVIDE(FETCHER
, "https://"),
55 METHOD(plugin_t
, destroy
, void,
56 private_soup_plugin_t
*this)
64 plugin_t
*soup_plugin_create()
66 private_soup_plugin_t
*this;
69 if (!g_thread_get_initialized())
77 .get_name
= _get_name
,
78 .get_features
= _get_features
,
84 return &this->public.plugin
;