~midori/midori/trunk

« back to all changes in this revision

Viewing changes to midori/midori-bookmarks-db.h

  • Committer: André Auzi
  • Date: 2013-08-05 19:52:52 UTC
  • mto: This revision was merged to the branch mainline in revision 6406.
  • Revision ID: aauzi@free.fr-20130805195252-89hqx89j37gl7v61
Derive MidoriBookmarksDb from KatzeArray in order to implement update-item signal
Implements, partially, signal redirection to parent KatzeArray after database operations.
On update-item signal, both bookmarkbar and bookmarks panel update themself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include <sqlite3.h>
17
17
#include <katze/katze.h>
18
18
 
19
 
KatzeArray*
20
 
midori_bookmarks_new (char** errmsg);
21
 
 
22
 
void
23
 
midori_bookmarks_on_quit (KatzeArray* array);
24
 
 
25
 
void
26
 
midori_array_update_item (KatzeArray* bookmarks, KatzeItem* item);
27
 
 
28
 
void
29
 
midori_bookmarks_import_array (KatzeArray* bookmarks,
30
 
                               KatzeArray* array,
31
 
                               gint64      parentid);
32
 
 
33
 
KatzeArray*
34
 
midori_array_query_recursive (KatzeArray*  bookmarks,
35
 
                              const gchar* fields,
36
 
                              const gchar* condition,
37
 
                              const gchar* value,
38
 
                              gboolean     recursive);
 
19
G_BEGIN_DECLS
 
20
 
 
21
#define TYPE_MIDORI_BOOKMARKS_DB \
 
22
    (midori_bookmarks_db_get_type ())
 
23
#define MIDORI_BOOKMARKS_DB(obj) \
 
24
    (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MIDORI_BOOKMARKS_DB, MidoriBookmarksDb))
 
25
#define MIDORI_BOOKMARKS_DB_CLASS(klass) \
 
26
    (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MIDORI_BOOKMARKS_DB, MidoriBookmarksDbClass))
 
27
#define IS_MIDORI_BOOKMARKS_DB(obj) \
 
28
    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MIDORI_BOOKMARKS_DB))
 
29
#define IS_MIDORI_BOOKMARKS_DB_CLASS(klass) \
 
30
    (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MIDORI_BOOKMARKS_DB))
 
31
#define MIDORI_BOOKMARKS_DB_GET_CLASS(obj) \
 
32
    (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MIDORI_BOOKMARKS_DB, MidoriBookmarksDbClass))
 
33
 
 
34
typedef struct _MidoriBookmarksDb                       MidoriBookmarksDb;
 
35
typedef struct _MidoriBookmarksDbClass                  MidoriBookmarksDbClass;
 
36
 
 
37
GType
 
38
midori_bookmarks_db_get_type               (void) G_GNUC_CONST;
 
39
 
 
40
MidoriBookmarksDb*
 
41
midori_bookmarks_db_new (char** errmsg);
 
42
 
 
43
void
 
44
midori_bookmarks_db_on_quit (MidoriBookmarksDb* array);
 
45
 
 
46
void
 
47
midori_bookmarks_db_add_item (MidoriBookmarksDb* bookmarks, KatzeItem* item);
 
48
 
 
49
void
 
50
midori_bookmarks_db_update_item (MidoriBookmarksDb* bookmarks, KatzeItem* item);
 
51
 
 
52
void
 
53
midori_bookmarks_db_remove_item (MidoriBookmarksDb* bookmarks, KatzeItem* item);
 
54
 
 
55
void
 
56
midori_bookmarks_db_import_array (MidoriBookmarksDb* bookmarks,
 
57
                                  KatzeArray* array,
 
58
                                  gint64      parentid);
 
59
 
 
60
KatzeArray*
 
61
midori_bookmarks_db_query_recursive (MidoriBookmarksDb*  bookmarks,
 
62
                                     const gchar* fields,
 
63
                                     const gchar* condition,
 
64
                                     const gchar* value,
 
65
                                     gboolean     recursive);
39
66
 
40
67
gint64
41
 
midori_array_count_recursive (KatzeArray*  bookmarks,
42
 
                              const gchar*        condition,
43
 
                              const gchar*        value,
44
 
                              KatzeItem*          folder,
45
 
                              gboolean            recursive);
 
68
midori_bookmarks_db_count_recursive (MidoriBookmarksDb*  bookmarks,
 
69
                                     const gchar*        condition,
 
70
                                     const gchar*        value,
 
71
                                     KatzeItem*          folder,
 
72
                                     gboolean            recursive);
46
73
 
47
74
#endif /* !__MIDORI_BOOKMARKS_DB_H__ */
48
75