summaryrefslogtreecommitdiff
path: root/src/bookmarks.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks.h')
-rw-r--r--src/bookmarks.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bookmarks.h b/src/bookmarks.h
index 2572e3b2..e1f517ad 100644
--- a/src/bookmarks.h
+++ b/src/bookmarks.h
@@ -1,5 +1,6 @@
1#pragma once 1#pragma once
2 2
3#include <the_Foundation/hash.h>
3#include <the_Foundation/ptrarray.h> 4#include <the_Foundation/ptrarray.h>
4#include <the_Foundation/string.h> 5#include <the_Foundation/string.h>
5#include <the_Foundation/time.h> 6#include <the_Foundation/time.h>
@@ -8,6 +9,7 @@ iDeclareType(Bookmark)
8iDeclareTypeConstruction(Bookmark) 9iDeclareTypeConstruction(Bookmark)
9 10
10struct Impl_Bookmark { 11struct Impl_Bookmark {
12 iHashNode node;
11 iString url; 13 iString url;
12 iString title; 14 iString title;
13 iString tags; 15 iString tags;
@@ -15,6 +17,8 @@ struct Impl_Bookmark {
15 iTime when; 17 iTime when;
16}; 18};
17 19
20iLocalDef uint32_t id_Bookmark (const iBookmark *d) { return d->node.key; }
21
18iDeclareType(Bookmarks) 22iDeclareType(Bookmarks)
19iDeclareTypeConstruction(Bookmarks) 23iDeclareTypeConstruction(Bookmarks)
20 24
@@ -23,6 +27,7 @@ void load_Bookmarks (iBookmarks *, const char *dirPath);
23void save_Bookmarks (const iBookmarks *, const char *dirPath); 27void save_Bookmarks (const iBookmarks *, const char *dirPath);
24 28
25void add_Bookmarks (iBookmarks *, const iString *url, const iString *title, const iString *tags, iChar icon); 29void add_Bookmarks (iBookmarks *, const iString *url, const iString *title, const iString *tags, iChar icon);
30void remove_Bookmarks (iBookmarks *, uint32_t id);
26 31
27typedef iBool (*iBookmarksFilterFunc) (const iBookmark *); 32typedef iBool (*iBookmarksFilterFunc) (const iBookmark *);
28typedef int (*iBookmarksCompareFunc)(const iBookmark **, const iBookmark **); 33typedef int (*iBookmarksCompareFunc)(const iBookmark **, const iBookmark **);