Introspection: add col/row manipulations
[gnumeric.git] / src / go-data-cache-impl.h
blob48a4c52aa2ed8a1916d2fb68715a97ec49295c83
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * go-data-cache-impl.h :
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
20 * USA
22 #ifndef GO_DATA_CACHE_IMPL_H
23 #define GO_DATA_CACHE_IMPL_H
25 #include <go-data-cache.h>
26 #include <glib-object.h>
28 G_BEGIN_DECLS
29 #ifndef GOFFICE_NAMESPACE_DISABLE
31 struct _GODataCache {
32 GObject base;
34 GODataCacheSource *data_source;
35 GPtrArray *fields;
37 unsigned int record_size;
38 unsigned int records_len;
39 unsigned int records_allocated;
40 guint8 *records;
42 char *refreshed_by;
43 GOVal *refreshed_on;
44 gboolean refresh_upgrades;
46 /* store some XL specific versioning to simplify round trips */
47 unsigned int XL_created_ver, XL_refresh_ver;
49 typedef struct {
50 GObjectClass base;
51 } GODataCacheClass;
53 /* utility macro */
54 #define go_data_cache_records_index(c, i) ((c)->records + ((c)->record_size * (i)))
56 #endif
57 G_END_DECLS
59 #endif /* GO_DATA_CACHE_IMPL_H */