"Initial commit to Gerrit"
[profile/ivi/libgsf.git] / gsf / gsf-doc-meta-data.h
1 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * gsf-doc-meta-data.h: get, set, remove custom meta properties associated with documents
4  *
5  * Copyright (C) 2002-2006 Dom Lachowicz (cinamod@hotmail.com)
6  *                         Jody Goldberg (jody@gnome.org)
7  *
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.
11  *
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.
16  *
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
20  * USA
21  */
22
23 #ifndef GSF_DOC_META_DATA_H
24 #define GSF_DOC_META_DATA_H
25
26 #include <gsf/gsf.h>
27 #include <glib-object.h>
28 #include <sys/types.h>
29
30 G_BEGIN_DECLS
31
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))
35
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 */
38
39 GsfDocMetaData *gsf_doc_meta_data_new     (void);
40 GsfDocProp     *gsf_doc_meta_data_lookup  (GsfDocMetaData const *meta,
41                                            char const *name);
42 void            gsf_doc_meta_data_insert  (GsfDocMetaData *meta,
43                                            char *name, GValue *value);
44 void            gsf_doc_meta_data_remove  (GsfDocMetaData *meta,
45                                            char const *name);
46 GsfDocProp     *gsf_doc_meta_data_steal   (GsfDocMetaData *meta,
47                                            char const *name);
48 void            gsf_doc_meta_data_store   (GsfDocMetaData *meta,
49                                            GsfDocProp     *prop);
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);
54
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);
64
65 G_END_DECLS
66
67 #endif /* GSF_DOC_META_DATA_H */