merged the tested and working ephy-history auto-completion prototype code
[ephy-soc.git] / embed / ephy-history.h
blobe24c31d7975852e38d27ce5d1090a1d8a7bb5ede
1 #ifndef EPHY_HISTORY_H
2 #define EPHY_HISTORY_H
4 #include <glib-object.h>
5 #include "ephy-history-page-node.h"
7 G_BEGIN_DECLS
8 #define EPHY_TYPE_HISTORY (ephy_history_get_type ())
9 #define EPHY_HISTORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_HISTORY, EphyHistory))
10 #define EPHY_HISTORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_HISTORY, EphyHistoryClass))
11 #define EPHY_IS_HISTORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_HISTORY))
12 #define EPHY_IS_HISTORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_HISTORY))
13 #define EPHY_HISTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_HISTORY, EphyHistoryClass))
14 #define EPHY_DB_ERROR_QUARK (ephy_db_error_quark)
15 typedef struct _EphyHistoryClass EphyHistoryClass;
16 typedef struct _EphyHistory EphyHistory;
17 typedef struct _EphyHistoryPrivate EphyHistoryPrivate;
19 struct _EphyHistory
21 GObject parent;
23 /*< private > */
24 EphyHistoryPrivate *priv;
27 struct _EphyHistoryClass
29 GObjectClass parent_class;
31 /* Signals */
32 gboolean (*page_added) (EphyHistory * history, guint64 id);
33 void (*page_removed) (EphyHistory * history, guint64 id);
34 void (*page_updated) (EphyHistory * history, guint64 id);
37 GType ephy_history_get_type (void);
39 EphyHistory *ephy_history_new (void);
41 gboolean ephy_history_is_enabled (EphyHistory * eh);
43 gint ephy_history_get_page_visit_count (EphyHistory * eh, const char *url);
45 /* Not implemented: unused in ephy-history
46 EphyHistoryPageNode *ephy_history_get_page (EphyHistory *eh,
47 const char *url);
49 EphyHistoryPageNode *ephy_history_get_host (EphyHistory *eh,
50 const char *url);
53 GPtrArray *ephy_history_get_hosts (EphyHistory * eh);
55 GPtrArray *ephy_history_get_pages (EphyHistory * eh);
57 gboolean ephy_history_set_icon (EphyHistory * eh,
58 const char *url, const char *icon);
60 const char *ephy_history_get_icon (EphyHistory * eh, const char *url);
62 void ephy_history_clear (EphyHistory * eh);
65 * nsIGlobalHistory2
68 gboolean ephy_history_add_page (EphyHistory * eh,
69 const char *url,
70 gboolean redirect,
71 gboolean toplevel, const char *ref_url);
73 gboolean ephy_history_is_page_visited (EphyHistory * eh, const char *url);
75 gboolean ephy_history_set_page_title (EphyHistory * eh,
76 const char *url, const char *title);
78 /*
79 * New stuff
82 GArray *ephy_history_get_page_ids (EphyHistory * eh);
84 EphyHistoryPageNode *ephy_history_get_page_by_id (EphyHistory * eh,
85 guint64 id);
87 gboolean ephy_history_remove_page (EphyHistory *eh, const char *url);
89 G_END_DECLS
90 #endif /* EPHY_HISTORY_H */