Update Spanish translation
[gnumeric.git] / src / go-data-cache-source.c
blob7eb7e5c3d6e836a784e6b5dfea30b22a03c87078
1 /*
2 * go-data-cache-source.c:
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
19 * USA
22 #include <goffice/goffice.h>
23 #include <gnumeric-config.h>
24 #include <go-data-cache-source.h>
26 GType
27 go_data_cache_source_get_type (void)
29 static GType go_data_cache_source_type = 0;
31 if (!go_data_cache_source_type) {
32 static GTypeInfo const go_data_cache_source_info = {
33 sizeof (GODataCacheSourceClass), /* class_size */
34 NULL, /* base_init */
35 NULL, /* base_finalize */
38 go_data_cache_source_type = g_type_register_static (G_TYPE_INTERFACE,
39 "GODataCacheSource", &go_data_cache_source_info, 0);
42 return go_data_cache_source_type;
45 /**
46 * go_data_cache_source_allocate:
47 * @src: a #GODataCacheSource
49 * Creates a ref to a new #GODataCache from @src.
51 * Returns : a #GODataCache
52 **/
53 GODataCache *
54 go_data_cache_source_allocate (GODataCacheSource const *src)
56 g_return_val_if_fail (IS_GO_DATA_CACHE_SOURCE (src), NULL);
58 return GO_DATA_CACHE_SOURCE_GET_CLASS (src)->allocate (src);
61 /**
62 * go_data_cache_source_needs_update:
63 * @src: a #GODataCacheSource
65 * Has @src changed since the last call to go_data_cache_source_allocate.
67 * Returns: %TRUE if @src has changed.
68 **/
69 gboolean
70 go_data_cache_source_needs_update (GODataCacheSource const *src)
72 g_return_val_if_fail (IS_GO_DATA_CACHE_SOURCE (src), FALSE);
73 return GO_DATA_CACHE_SOURCE_GET_CLASS (src)->needs_update (src);