2 * go-data-cache-source.h :
4 * Copyright (C) 2008 Jody Goldberg (jody@gnome.org)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) version 3.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
21 #ifndef GO_DATA_CACHE_SOURCE_H
22 #define GO_DATA_CACHE_SOURCE_H
24 #include <goffice-data.h> /* remove after move to goffice */
25 #include <goffice/goffice.h>
26 #include <glib-object.h>
29 #ifndef GOFFICE_NAMESPACE_DISABLE
34 GODataCache
* (*allocate
) (GODataCacheSource
const *src
);
35 GError
* (*validate
) (GODataCacheSource
const *src
);
36 gboolean (*needs_update
) (GODataCacheSource
const *src
);
37 } GODataCacheSourceClass
;
39 #define GO_DATA_CACHE_SOURCE_TYPE (go_data_cache_source_get_type ())
40 #define GO_DATA_CACHE_SOURCE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_DATA_CACHE_SOURCE_TYPE, GODataCacheSource))
41 #define IS_GO_DATA_CACHE_SOURCE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_DATA_CACHE_SOURCE_TYPE))
42 #define GO_DATA_CACHE_SOURCE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GO_DATA_CACHE_SOURCE_TYPE, GODataCacheSourceClass))
43 #define IS_GO_DATA_CACHE_SOURCE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GO_DATA_CACHE_SOURCE_TYPE))
44 #define GO_DATA_CACHE_SOURCE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GO_DATA_CACHE_SOURCE_TYPE, GODataCacheSourceClass))
46 GType
go_data_cache_source_get_type (void);
48 GODataCache
* go_data_cache_source_allocate (GODataCacheSource
const *src
);
49 gboolean
go_data_cache_source_needs_update (GODataCacheSource
const *src
);
54 #endif /* GO_DATA_CACHE_SOURCE_H */