File: plugin.c

package info (click to toggle)
sylpheed-claws-maildir-plugin 0.7-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,588 kB
  • ctags: 130
  • sloc: sh: 10,992; ansic: 1,551; makefile: 326; xml: 103
file content (64 lines) | stat: -rw-r--r-- 1,590 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Maildir Plugin -- Maildir++ support for Sylpheed
 * Copyright (C) 2003-2004 Christoph Hohmann
 *
 * 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
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * 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.
 */

#include "common/version.h"
#include "common/plugin.h"
#include "folder.h"

#include "maildir.h"
#include "uiddb.h"

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, 10, 48))) {
		*error = g_strdup("Your sylpheed version is too old");
		return -1;
	}

	uiddb_init();
	folder_register_class(maildir_get_class());

	return 0;
}

void plugin_done()
{
	folder_unregister_class(maildir_get_class());
	uiddb_done();
}

const gchar *plugin_name()
{
	return "Maildir++";
}

const gchar *plugin_desc()
{
	return "";
}

const gchar *plugin_type()
{
	return "Common";
}