1 /*
2 * Claws Mail -- 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 /* Global includes */
29 #include <glib/gi18n.h>
30 #include <curl/curl.h>
31
32 /* Claws Mail includes */
33 #include <common/claws.h>
34 #include <common/version.h>
35 #include <plugin.h>
36
37 /* Local includes */
38 #include "rssyl.h"
39
plugin_init(gchar ** error)40 gint plugin_init(gchar **error)
41 {
42 if( !check_plugin_version(MAKE_NUMERIC_VERSION(3, 7, 8, 31),
43 VERSION_NUMERIC, PLUGIN_NAME, error) )
44 return -1;
45
46 curl_global_init(CURL_GLOBAL_DEFAULT);
47 rssyl_init();
48
49 return 0;
50 }
51
plugin_done(void)52 gboolean plugin_done(void)
53 {
54 rssyl_done();
55 return TRUE;
56 }
57
plugin_name(void)58 const gchar *plugin_name(void)
59 {
60 return PLUGIN_NAME;
61 }
62
plugin_desc(void)63 const gchar *plugin_desc(void)
64 {
65 return _("This plugin allows you to create a mailbox tree where you can add "
66 "newsfeeds in RSS 1.0, RSS 2.0 or Atom format.\n\n"
67 "Each newsfeed will create a folder with appropriate entries, fetched "
68 "from the web. You can read them, and delete or keep old entries.");
69 }
70
plugin_type(void)71 const gchar *plugin_type(void)
72 {
73 return "GTK2";
74 }
75
plugin_licence(void)76 const gchar *plugin_licence(void)
77 {
78 return "GPL2+";
79 }
80
plugin_version(void)81 const gchar *plugin_version(void)
82 {
83 return VERSION;
84 }
85
plugin_provides(void)86 struct PluginFeature *plugin_provides(void)
87 {
88 static struct PluginFeature features[] =
89 { {PLUGIN_FOLDERCLASS, N_("RSS feed")},
90 {PLUGIN_NOTHING, NULL}};
91 return features;
92 }
93