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-fwd.h> 27 28 G_BEGIN_DECLS 29 30 #define GSF_DOC_META_DATA_TYPE (gsf_doc_meta_data_get_type ()) 31 #define GSF_DOC_META_DATA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSF_DOC_META_DATA_TYPE, GsfDocMetaData)) 32 #define IS_GSF_DOC_META_DATA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSF_DOC_META_DATA_TYPE)) 33 34 GType gsf_doc_meta_data_get_type (void); 35 /* void gsf_doc_meta_data_register_type (GTypeModule *module); glib dynamic types are not thread safe */ 36 37 GsfDocMetaData *gsf_doc_meta_data_new (void); 38 GsfDocProp *gsf_doc_meta_data_lookup (GsfDocMetaData const *meta, 39 char const *name); 40 void gsf_doc_meta_data_insert (GsfDocMetaData *meta, 41 char *name, GValue *value); 42 void gsf_doc_meta_data_remove (GsfDocMetaData *meta, 43 char const *name); 44 GsfDocProp *gsf_doc_meta_data_steal (GsfDocMetaData *meta, 45 char const *name); 46 void gsf_doc_meta_data_store (GsfDocMetaData *meta, 47 GsfDocProp *prop); 48 void gsf_doc_meta_data_foreach (GsfDocMetaData const *meta, 49 GHFunc func, gpointer user_data); 50 gsize gsf_doc_meta_data_size (GsfDocMetaData const *meta); 51 void gsf_doc_meta_dump (GsfDocMetaData const *meta); 52 53 GType gsf_doc_prop_get_type (void); 54 GsfDocProp *gsf_doc_prop_new (char *name); 55 void gsf_doc_prop_free (GsfDocProp *prop); 56 char const *gsf_doc_prop_get_name (GsfDocProp const *prop); 57 GValue const *gsf_doc_prop_get_val (GsfDocProp const *prop); 58 void gsf_doc_prop_set_val (GsfDocProp *prop, GValue *val); 59 GValue *gsf_doc_prop_swap_val (GsfDocProp *prop, GValue *val); 60 char const *gsf_doc_prop_get_link (GsfDocProp const *prop); 61 void gsf_doc_prop_set_link (GsfDocProp *prop, char *link); 62 void gsf_doc_prop_dump (GsfDocProp const *prop); 63 64 G_END_DECLS 65 66 #endif /* GSF_DOC_META_DATA_H */ 67