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
22 #include <goffice/goffice.h>
23 #include <gnumeric-config.h>
24 #include <go-data-cache-source.h>
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 */
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
;
46 * go_data_cache_source_allocate:
47 * @src: a #GODataCacheSource
49 * Creates a ref to a new #GODataCache from @src.
51 * Returns : a #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
);
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.
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
);