1
/* vi:set et ai sw=2 sts=2 ts=2: */
3
* Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Library General Public License for more details.
15
* You should have received a copy of the GNU Library General
16
* Public License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
26
#include <glib/gi18n.h>
27
#include <glib-object.h>
29
#include <tumbler/tumbler.h>
31
#include <jpeg-thumbnailer/jpeg-thumbnailer-provider.h>
32
#include <jpeg-thumbnailer/jpeg-thumbnailer.h>
36
G_MODULE_EXPORT void tumbler_plugin_initialize (TumblerProviderPlugin *plugin);
37
G_MODULE_EXPORT void tumbler_plugin_shutdown (void);
38
G_MODULE_EXPORT void tumbler_plugin_get_types (const GType **types,
43
static GType type_list[1];
48
tumbler_plugin_initialize (TumblerProviderPlugin *plugin)
50
const gchar *mismatch;
52
/* verify that the tumbler versions are compatible */
53
mismatch = tumbler_check_version (TUMBLER_MAJOR_VERSION, TUMBLER_MINOR_VERSION,
54
TUMBLER_MICRO_VERSION);
55
if (G_UNLIKELY (mismatch != NULL))
57
g_warning (_("Version mismatch: %s"), mismatch);
62
g_message (_("Initializing the Tumbler Pixbuf Thumbnailer plugin"));
65
/* register the types provided by this plugin */
66
jpeg_thumbnailer_register (plugin);
67
jpeg_thumbnailer_provider_register (plugin);
69
/* set up the plugin provider type list */
70
type_list[0] = TYPE_JPEG_THUMBNAILER_PROVIDER;
76
tumbler_plugin_shutdown (void)
79
g_message (_("Shutting down the Tumbler Pixbuf Thumbnailer plugin"));
86
tumbler_plugin_get_types (const GType **types,
90
*n_types = G_N_ELEMENTS (type_list);