1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * go-data-cache-source.c:
5 * Copyright (C) 2008 Jody Goldberg (jody@gnome.org)
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) version 3.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 #include <goffice/goffice.h>
24 #include <gnumeric-config.h>
25 #include "go-data-cache-source.h"
28 go_data_cache_source_get_type (void)
30 static GType go_data_cache_source_type
= 0;
32 if (!go_data_cache_source_type
) {
33 static GTypeInfo
const go_data_cache_source_info
= {
34 sizeof (GODataCacheSourceClass
), /* class_size */
36 NULL
, /* base_finalize */
39 go_data_cache_source_type
= g_type_register_static (G_TYPE_INTERFACE
,
40 "GODataCacheSource", &go_data_cache_source_info
, 0);
43 return go_data_cache_source_type
;
47 * go_data_cache_source_allocate:
48 * @src: a #GODataCacheSource
50 * Creates a ref to a new #GODataCache from @src.
52 * Returns : a #GODataCache
55 go_data_cache_source_allocate (GODataCacheSource
const *src
)
57 g_return_val_if_fail (IS_GO_DATA_CACHE_SOURCE (src
), NULL
);
59 return GO_DATA_CACHE_SOURCE_GET_CLASS (src
)->allocate (src
);
63 * go_data_cache_source_needs_update:
64 * @src: a #GODataCacheSource
66 * Has @src changed since the last call to go_data_cache_source_allocate.
68 * Returns: %TRUE if @src has changed.
71 go_data_cache_source_needs_update (GODataCacheSource
const *src
)
73 g_return_val_if_fail (IS_GO_DATA_CACHE_SOURCE (src
), FALSE
);
74 return GO_DATA_CACHE_SOURCE_GET_CLASS (src
)->needs_update (src
);