update copyright year
[claws.git] / src / plugins / pgpmime / plugin.c
index 6e8402e44916e8c7c9465fa3a4cd7dc7b347f1eb..b09f75e4159c56fa86b434eae6a94857921e1db3 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2021 the Claws Mail team
  *
  * 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 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * 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.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
+#include "claws-features.h"
 #endif
 
 #include <stddef.h>
-
-#include "intl.h"
+#include <glib.h>
+#include <glib/gi18n.h>
 
 #include "version.h"
-#include "common/sylpheed.h"
-#include "sgpgme.h"
+#include "common/claws.h"
 #include "pgpmime.h"
-#include "prefs_gpg.h"
+#include "plugin.h"
+
+#define PLUGIN_NAME (_("PGP/MIME"))
 
 gint plugin_init(gchar **error)
 {
-       if ((sylpheed_get_version() > VERSION_NUMERIC)) {
-               *error = g_strdup("Your sylpheed version is newer than the version the plugin was built with");
-               return -1;
-       }
-
-       if ((sylpheed_get_version() < MAKE_NUMERIC_VERSION(0, 9, 12, 34))) {
-               *error = g_strdup("Your sylpheed version is too old");
+       if (!check_plugin_version(MAKE_NUMERIC_VERSION(4,0,0,343),
+                               VERSION_NUMERIC, PLUGIN_NAME, error))
                return -1;
-       }
 
-       sgpgme_init();
        pgpmime_init();
-       prefs_gpg_init();
 
        return 0;       
 }
 
-void plugin_done(void)
+gboolean plugin_done(void)
 {
-       prefs_gpg_init();
        pgpmime_done();
-       sgpgme_done();
+       return TRUE;
 }
 
 const gchar *plugin_name(void)
 {
-       return _("PGP/MIME");
+       return PLUGIN_NAME;
 }
 
 const gchar *plugin_desc(void)
 {
-       return _("This plugin enables signature verification of "
-                "digitally signed messages, and decryption of "
-                "encrypted messages. \n"
+       return _("This plugin handles PGP/MIME signed and/or encrypted "
+                "mails. You can decrypt mails, verify signatures or "
+                 "sign and encrypt your own mails.\n"
+                "\n"
+                "It can be selected as the Default Privacy System in "
+                "/Configuration/[Account Preferences]/Privacy and when "
+                "composing a message from /Options/Privacy System\n"
+                "\n"
+                "The plugin uses the GPGME library as a wrapper for GnuPG.\n"
                 "\n"
-                "You don't need it to send signed or encrypted emails.");
+                "GPGME is copyright 2001 by Werner Koch <dd9jn@gnu.org>");
 }
 
 const gchar *plugin_type(void)
 {
-       return "GTK2";
+       return "GTK3";
+}
+
+const gchar *plugin_licence(void)
+{
+       return "GPL3+";
+}
+
+const gchar *plugin_version(void)
+{
+       return VERSION;
 }