diff options
Diffstat (limited to 'src/bookmarks.h')
-rw-r--r-- | src/bookmarks.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/bookmarks.h b/src/bookmarks.h index 0de930d7..40170062 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h | |||
@@ -53,7 +53,8 @@ struct Impl_Bookmark { | |||
53 | int order; /* sort order */ | 53 | int order; /* sort order */ |
54 | }; | 54 | }; |
55 | 55 | ||
56 | iLocalDef uint32_t id_Bookmark (const iBookmark *d) { return d->node.key; } | 56 | iLocalDef uint32_t id_Bookmark (const iBookmark *d) { return d->node.key; } |
57 | iLocalDef iBool isFolder_Bookmark (const iBookmark *d) { return isEmpty_String(&d->url); } | ||
57 | 58 | ||
58 | iBool hasTag_Bookmark (const iBookmark *, const char *tag); | 59 | iBool hasTag_Bookmark (const iBookmark *, const char *tag); |
59 | void addTag_Bookmark (iBookmark *, const char *tag); | 60 | void addTag_Bookmark (iBookmark *, const char *tag); |
@@ -73,11 +74,17 @@ iLocalDef void addOrRemoveTag_Bookmark(iBookmark *d, const char *tag, iBool add) | |||
73 | } | 74 | } |
74 | } | 75 | } |
75 | 76 | ||
77 | int cmpTitleAscending_Bookmark (const iBookmark **, const iBookmark **); | ||
78 | int cmpTree_Bookmark (const iBookmark **, const iBookmark **); | ||
79 | |||
76 | /*----------------------------------------------------------------------------------------------*/ | 80 | /*----------------------------------------------------------------------------------------------*/ |
77 | 81 | ||
78 | iDeclareType(Bookmarks) | 82 | iDeclareType(Bookmarks) |
79 | iDeclareTypeConstruction(Bookmarks) | 83 | iDeclareTypeConstruction(Bookmarks) |
80 | 84 | ||
85 | typedef iBool (*iBookmarksFilterFunc) (void *context, const iBookmark *); | ||
86 | typedef int (*iBookmarksCompareFunc) (const iBookmark **, const iBookmark **); | ||
87 | |||
81 | void clear_Bookmarks (iBookmarks *); | 88 | void clear_Bookmarks (iBookmarks *); |
82 | void load_Bookmarks (iBookmarks *, const char *dirPath); | 89 | void load_Bookmarks (iBookmarks *, const char *dirPath); |
83 | void save_Bookmarks (const iBookmarks *, const char *dirPath); | 90 | void save_Bookmarks (const iBookmarks *, const char *dirPath); |
@@ -88,15 +95,13 @@ iBool remove_Bookmarks (iBookmarks *, uint32_t id); | |||
88 | iBookmark * get_Bookmarks (iBookmarks *, uint32_t id); | 95 | iBookmark * get_Bookmarks (iBookmarks *, uint32_t id); |
89 | void reorder_Bookmarks (iBookmarks *, uint32_t id, int newOrder); | 96 | void reorder_Bookmarks (iBookmarks *, uint32_t id, int newOrder); |
90 | iBool updateBookmarkIcon_Bookmarks(iBookmarks *, const iString *url, iChar icon); | 97 | iBool updateBookmarkIcon_Bookmarks(iBookmarks *, const iString *url, iChar icon); |
98 | void sort_Bookmarks (iBookmarks *, uint32_t parentId, iBookmarksCompareFunc cmp); | ||
91 | void fetchRemote_Bookmarks (iBookmarks *); | 99 | void fetchRemote_Bookmarks (iBookmarks *); |
92 | void requestFinished_Bookmarks (iBookmarks *, iGmRequest *req); | 100 | void requestFinished_Bookmarks (iBookmarks *, iGmRequest *req); |
93 | 101 | ||
94 | iChar siteIcon_Bookmarks (const iBookmarks *, const iString *url); | 102 | iChar siteIcon_Bookmarks (const iBookmarks *, const iString *url); |
95 | uint32_t findUrl_Bookmarks (const iBookmarks *, const iString *url); /* O(n) */ | 103 | uint32_t findUrl_Bookmarks (const iBookmarks *, const iString *url); /* O(n) */ |
96 | 104 | ||
97 | typedef iBool (*iBookmarksFilterFunc) (void *context, const iBookmark *); | ||
98 | typedef int (*iBookmarksCompareFunc)(const iBookmark **, const iBookmark **); | ||
99 | |||
100 | iBool filterTagsRegExp_Bookmarks (void *regExp, const iBookmark *); | 105 | iBool filterTagsRegExp_Bookmarks (void *regExp, const iBookmark *); |
101 | 106 | ||
102 | /** | 107 | /** |