2013-02-20 [colin] 3.9.0cvs87
[claws.git] / src / plugins / rssyl / plugin.c
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2004 Hiroyuki Yamamoto
4  * This file (C) 2005 Andrej Kacian <andrej@kacian.sk>
5  *
6  * - generic s-c plugin stuff
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  */
22
23 #ifdef HAVE_CONFIG_H
24 #  include "config.h"
25 #include "claws-features.h"
26 #endif
27
28 #include <glib.h>
29 #include <glib/gi18n.h>
30
31 #include "common/version.h"
32 #include "claws.h"
33 #include <curl/curl.h>
34
35 #include "rssyl.h"
36 #include "plugin.h"
37
38 gint plugin_init(gchar **error)
39 {
40         if( !check_plugin_version(MAKE_NUMERIC_VERSION(3,7,8,31),
41                                 VERSION_NUMERIC, PLUGIN_NAME, error) )
42                 return -1;
43
44         curl_global_init(CURL_GLOBAL_DEFAULT);
45         rssyl_init();
46
47         return 0;
48 }
49
50 gboolean plugin_done(void)
51 {
52         rssyl_done();
53         return TRUE;
54 }
55
56 const gchar *plugin_name(void)
57 {
58         return PLUGIN_NAME;
59 }
60
61 const gchar *plugin_desc(void)
62 {
63         return _("This plugin allows you to create a mailbox tree where you can add "
64                 "newsfeeds in RSS 1.0, RSS 2.0 or Atom format.\n\n"
65                 "Each newsfeed will create a folder with appropriate entries, fetched "
66                 "from the web. You can read them, and delete or keep old entries.");
67 }
68
69 const gchar *plugin_type(void)
70 {
71         return "GTK2";
72 }
73
74 const gchar *plugin_licence(void)
75 {
76         return "GPL2+";
77 }
78
79 const gchar *plugin_version(void)
80 {
81         return VERSION;
82 }
83
84 struct PluginFeature *plugin_provides(void)
85 {
86         static struct PluginFeature features[] = 
87                 { {PLUGIN_FOLDERCLASS, N_("RSS feed")},
88                   {PLUGIN_NOTHING, NULL}};
89         return features;
90 }