2013-02-13 [colin] 3.9.0cvs65
[claws.git] / src / plugins / vcalendar / plugin.c
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> and 
4  * the Claws Mail team
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20
21 #ifdef HAVE_CONFIG_H
22 #  include "config.h"
23 #include "claws-features.h"
24 #endif
25
26 #include <stddef.h>
27 #include <glib.h>
28 #include <glib/gi18n.h>
29
30 #include <time.h>
31 #include <stddef.h>
32 #include <curl/curl.h>
33
34 #include "version.h"
35 #include "vcalendar.h"
36 #include "claws.h"
37 #include "plugin.h"
38
39 #include "vcal_dbus.h"
40
41 gint plugin_init(gchar **error)
42 {
43         if (!check_plugin_version(MAKE_NUMERIC_VERSION(3,8,1,46),
44                                 VERSION_NUMERIC, _("vCalendar"), error))
45                 return -1;
46
47         tzset();
48
49         curl_global_init(CURL_GLOBAL_DEFAULT);
50         vcalendar_init();
51         connect_dbus();
52
53         return 0;       
54 }
55
56 gboolean plugin_done(void)
57 {
58         disconnect_dbus();
59         vcalendar_done();
60         return TRUE;
61 }
62
63 const gchar *plugin_name(void)
64 {
65         return _("vCalendar");
66 }
67
68 const gchar *plugin_desc(void)
69 {
70         return _("This plugin enables vCalendar message handling like that produced "
71                  "by Evolution or Outlook.\n\n"
72                  "When loaded, it will create a vCalendar mailbox in the Folder "
73                  "List, which will be populated by meetings that you have accepted "
74                  "or created.\n"
75                  "Meeting requests that you receive will be presented in an "
76                  "appropriate form and you will be able to accept or decline them.\n"
77                  "To create a meeting right-click on the vCalendar or "
78                  "Meetings folder and choose \"New meeting...\".\n\n"
79                  "You will also be able to subscribe to remote webCal feeds,"
80                  "export your meetings and calendars, publish your free/busy "
81                  "information and retrieve that information from others.");
82 }
83
84 const gchar *plugin_type(void)
85 {
86         return "GTK2";
87 }
88
89 const gchar *plugin_licence(void)
90 {
91         return "GPL3+";
92 }
93
94 const gchar *plugin_version(void)
95 {
96         return VERSION;
97 }
98
99 struct PluginFeature *plugin_provides(void)
100 {
101         static struct PluginFeature features[] = 
102                 { {PLUGIN_MIMEVIEWER, "text/calendar"},
103                   {PLUGIN_FOLDERCLASS, N_("Calendar")},
104                   {PLUGIN_NOTHING, NULL}};
105         return features;
106 }