Clipboard: check mime type before pasting image.
[gnumeric.git] / src / go-data-cache.h
blobbe0a852c83dc10ff3b293f290ad85508c010b110
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * go-data-cache.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_H
23 #define GO_DATA_CACHE_H
25 #include "goffice-data.h" /* remove after move to goffice */
26 #include <goffice/goffice.h>
27 #include <go-val.h>
28 #include <glib-object.h>
30 G_BEGIN_DECLS
31 #ifndef GOFFICE_NAMESPACE_DISABLE
33 #define GO_DATA_CACHE_TYPE (go_data_cache_get_type ())
34 #define GO_DATA_CACHE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_DATA_CACHE_TYPE, GODataCache))
35 #define IS_GO_DATA_CACHE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_DATA_CACHE_TYPE))
37 GType go_data_cache_get_type (void);
39 GODataCacheSource *go_data_cache_get_source (GODataCache const *dc);
40 void go_data_cache_set_source (GODataCache *dc,
41 GODataCacheSource *src);
42 void go_data_cache_add_field (GODataCache *dc,
43 GODataCacheField *field);
44 void go_data_cache_import_start (GODataCache *dc, unsigned int expected_records);
45 void go_data_cache_import_done (GODataCache *dc, unsigned int actual_records);
46 void go_data_cache_set_index (GODataCache *dc,
47 int field, unsigned int record_num, unsigned int idx);
48 void go_data_cache_set_val (GODataCache *dc,
49 int field, unsigned int record_num, GOVal *v);
50 int go_data_cache_get_index (GODataCache const *dc,
51 GODataCacheField const *field, unsigned int record_num);
53 /* Data Access */
54 unsigned int go_data_cache_num_items (GODataCache const *dc);
55 unsigned int go_data_cache_num_fields (GODataCache const *dc);
56 GODataCacheField *go_data_cache_get_field (GODataCache const *dc, int i);
58 /* Actions */
59 void go_data_cache_permute (GODataCache const *dc,
60 GArray const *field_order,
61 GArray *permutation);
63 /* debug util */
64 void go_data_cache_dump (GODataCache *dc,
65 GArray const *field_order,
66 GArray const *permutation);
67 void go_data_cache_dump_value (GOVal const *v);
69 #endif
70 G_END_DECLS
72 #endif /* GO_DATA_CACHE_H */