More work on merging history view
[ephy-soc.git] / lib / ephy-node-db.h
blob44c70be32b3b64f2eb8c87fb215c29da64c561fe
1 /*
2 * Copyright © 2002 Jorn Baayen <jorn@nl.linux.org>
3 * Copyright © 2003 Marco Pesenti Gritti
4 * Copyright © 2003 Christian Persch
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * $Id: ephy-node-db.h 6952 2007-03-11 19:42:02Z chpe $
23 #ifndef EPHY_NODE_DB_H
24 #define EPHY_NODE_DB_H
26 #include <glib-object.h>
28 G_BEGIN_DECLS
30 #define EPHY_TYPE_NODE_DB (ephy_node_db_get_type ())
31 #define EPHY_NODE_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_NODE_DB, EphyNodeDb))
32 #define EPHY_NODE_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_NODE_DB, EphyNodeDbClass))
33 #define EPHY_IS_NODE_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_NODE_DB))
34 #define EPHY_IS_NODE_DB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_NODE_DB))
35 #define EPHY_NODE_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_NODE_DB, EphyNodeDbClass))
37 typedef struct _EphyNodeDb EphyNodeDb;
38 typedef struct _EphyNodeDbPrivate EphyNodeDbPrivate;
40 struct _EphyNodeDb
42 GObject parent;
44 /*< private >*/
45 EphyNodeDbPrivate *priv;
48 typedef struct
50 GObjectClass parent;
52 } EphyNodeDbClass;
54 #include "ephy-node.h"
56 GType ephy_node_db_get_type (void);
58 EphyNodeDb *ephy_node_db_new (const char *name);
60 gboolean ephy_node_db_load_from_file (EphyNodeDb *db,
61 const char *xml_file,
62 const xmlChar *xml_root,
63 const xmlChar *xml_version);
65 int ephy_node_db_write_to_xml_safe (EphyNodeDb *db,
66 const xmlChar *filename,
67 const xmlChar *root,
68 const xmlChar *version,
69 const xmlChar *comment,
70 EphyNode *node, ...);
72 const char *ephy_node_db_get_name (EphyNodeDb *db);
74 gboolean ephy_node_db_is_immutable (EphyNodeDb *db);
76 void ephy_node_db_set_immutable (EphyNodeDb *db,
77 gboolean immutable);
79 EphyNode *ephy_node_db_get_node_from_id (EphyNodeDb *db,
80 guint id);
82 guint _ephy_node_db_new_id (EphyNodeDb *db);
84 void _ephy_node_db_add_id (EphyNodeDb *db,
85 guint id,
86 EphyNode *node);
88 void _ephy_node_db_remove_id (EphyNodeDb *db,
89 guint id);
91 G_END_DECLS
93 #endif /* __EPHY_NODE_DB_H */