1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * gsf-doc-meta-data.h: get, set, remove custom meta properties associated with documents
5 * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com)
6 * Jody Goldberg (jody@gnome.org)
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2.1 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
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 Lesser 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 #ifndef GSF_DOC_META_DATA_H
24 #define GSF_DOC_META_DATA_H
27 #include <glib-object.h>
28 #include <sys/types.h>
32 #define GSF_DOC_META_DATA_TYPE (gsf_doc_meta_data_get_type ())
33 #define GSF_DOC_META_DATA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_DOC_META_DATA_TYPE, GsfDocMetaData))
34 #define IS_GSF_DOC_META_DATA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_DOC_META_DATA_TYPE))
36 GType gsf_doc_meta_data_get_type (void) G_GNUC_CONST;
37 /* void gsf_doc_meta_data_register_type (GTypeModule *module); glib dynamic types are not thread safe */
39 GsfDocMetaData *gsf_doc_meta_data_new (void);
40 GsfDocProp *gsf_doc_meta_data_lookup (GsfDocMetaData const *meta,
42 void gsf_doc_meta_data_insert (GsfDocMetaData *meta,
43 char *name, GValue *value);
44 void gsf_doc_meta_data_remove (GsfDocMetaData *meta,
46 GsfDocProp *gsf_doc_meta_data_steal (GsfDocMetaData *meta,
48 void gsf_doc_meta_data_store (GsfDocMetaData *meta,
50 void gsf_doc_meta_data_foreach (GsfDocMetaData const *meta,
51 GHFunc func, gpointer user_data);
52 gsize gsf_doc_meta_data_size (GsfDocMetaData const *meta);
53 void gsf_doc_meta_dump (GsfDocMetaData const *meta);
55 GsfDocProp *gsf_doc_prop_new (char *name);
56 void gsf_doc_prop_free (GsfDocProp *prop);
57 char const *gsf_doc_prop_get_name (GsfDocProp const *prop);
58 GValue const *gsf_doc_prop_get_val (GsfDocProp const *prop);
59 void gsf_doc_prop_set_val (GsfDocProp *prop, GValue *val);
60 GValue *gsf_doc_prop_swap_val (GsfDocProp *prop, GValue *val);
61 char const *gsf_doc_prop_get_link (GsfDocProp const *prop);
62 void gsf_doc_prop_set_link (GsfDocProp *prop, char *link);
63 void gsf_doc_prop_dump (GsfDocProp const *prop);
67 #endif /* GSF_DOC_META_DATA_H */