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.
21
#if !defined (TUMBLER_INSIDE_TUMBLER_H) && !defined (TUMBLER_COMPILATION)
22
#error "Only <tumbler/tumbler.h> may be included directly. This file might disappear or change contents."
25
#ifndef __TUMBLER_CACHE_H__
26
#define __TUMBLER_CACHE_H__
28
#include <tumbler/tumbler-thumbnail.h>
29
#include <tumbler/tumbler-thumbnail-flavor.h>
33
#define TUMBLER_TYPE_CACHE (tumbler_cache_get_type ())
34
#define TUMBLER_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUMBLER_TYPE_CACHE, TumblerCache))
35
#define TUMBLER_IS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUMBLER_TYPE_CACHE))
36
#define TUMBLER_CACHE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUMBLER_TYPE_CACHE, TumblerCacheIface))
38
typedef struct _TumblerCache TumblerCache;
39
typedef struct _TumblerCacheIface TumblerCacheIface;
41
struct _TumblerCacheIface
43
GTypeInterface __parent__;
48
TumblerThumbnail *(*get_thumbnail) (TumblerCache *cache,
50
TumblerThumbnailFlavor *flavor);
51
void (*cleanup) (TumblerCache *cache,
54
void (*do_delete) (TumblerCache *cache,
56
void (*copy) (TumblerCache *cache,
57
const GStrv from_uris,
59
void (*move) (TumblerCache *cache,
60
const GStrv from_uris,
62
gboolean (*is_thumbnail) (TumblerCache *cache,
64
GList *(*get_flavors) (TumblerCache *cache);
67
GType tumbler_cache_get_type (void) G_GNUC_CONST;
69
TumblerCache *tumbler_cache_get_default (void) G_GNUC_WARN_UNUSED_RESULT;
71
TumblerThumbnail *tumbler_cache_get_thumbnail (TumblerCache *cache,
73
TumblerThumbnailFlavor *flavor) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
74
void tumbler_cache_cleanup (TumblerCache *cache,
75
const gchar *uri_prefix,
77
void tumbler_cache_delete (TumblerCache *cache,
79
void tumbler_cache_copy (TumblerCache *cache,
80
const GStrv from_uris,
82
void tumbler_cache_move (TumblerCache *cache,
83
const GStrv from_uris,
85
gboolean tumbler_cache_is_thumbnail (TumblerCache *cache,
87
GList *tumbler_cache_get_flavors (TumblerCache *cache) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
88
TumblerThumbnailFlavor *tumbler_cache_get_flavor (TumblerCache *cache,
89
const gchar *name) G_GNUC_WARN_UNUSED_RESULT;
93
#endif /* !__TUMBLER_CACHE_H__ */