ELinks 0.16.1.1
bookmarks.h File Reference
#include "main/module.h"
#include "main/object.h"
#include "util/lists.h"
Include dependency graph for bookmarks.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  bookmark

Functions

void read_bookmarks (void)
void write_bookmarks (void)
void bookmarks_set_dirty (void)
void bookmarks_unset_dirty (void)
int bookmarks_are_dirty (void)
void delete_bookmark (struct bookmark *)
struct bookmarkadd_bookmark (struct bookmark *, int, const char *, const char *)
 Add a bookmark to the bookmark list.
struct bookmarkadd_bookmark_cp (struct bookmark *, int, int, const char *, const char *)
 Add a bookmark to the bookmark list.
struct bookmarkget_bookmark_by_name (struct bookmark *folder, char *title)
 Search for a bookmark with the given title.
struct bookmarkget_bookmark (char *url)
void bookmark_terminal_tabs (struct terminal *term, char *foldername)
 Create a bookmark for each document on the specified terminal, and a folder to contain those bookmarks.
char * get_auto_save_bookmark_foldername_utf8 (void)
void bookmark_auto_save_tabs (struct terminal *term)
int update_bookmark (struct bookmark *, int, char *, char *)
void open_bookmark_folder (struct session *ses, char *foldername)
 Open all bookmarks from the named folder.

Variables

struct bookmark list bookmarks
struct module bookmarks_module

Function Documentation

◆ add_bookmark()

struct bookmark * add_bookmark ( struct bookmark * root,
int place,
const char * title,
const char * url )

Add a bookmark to the bookmark list.

Parameters
rootThe folder in which to add the bookmark, or NULL to add it at top level.
place0 means add to the top. 1 means add to the bottom.
titleTitle of the bookmark. Must be in UTF-8 and not NULL. "-" means add a separator.
urlURL to which the bookmark will point. Must be in UTF-8. NULL or "" means add a bookmark folder.
Returns
the new bookmark, or NULL on error.
See also
add_bookmark_cp()

◆ add_bookmark_cp()

struct bookmark * add_bookmark_cp ( struct bookmark * root,
int place,
int codepage,
const char * title,
const char * url )

Add a bookmark to the bookmark list.

Parameters
rootThe folder in which to add the bookmark, or NULL to add it at top level.
place0 means add to the top. 1 means add to the bottom.
codepageCodepage of title and url.
titleTitle of the bookmark. Must not be NULL. "-" means add a separator.
urlURL to which the bookmark will point. NULL or "" means add a bookmark folder.
Returns
the new bookmark.
See also
add_bookmark()

◆ bookmark_auto_save_tabs()

void bookmark_auto_save_tabs ( struct terminal * term)

◆ bookmark_terminal_tabs()

void bookmark_terminal_tabs ( struct terminal * term,
char * foldername )

Create a bookmark for each document on the specified terminal, and a folder to contain those bookmarks.

Parameters
termThe terminal whose open documents should be bookmarked.
foldernameThe name of the new bookmark folder, in UTF-8.

◆ bookmarks_are_dirty()

int bookmarks_are_dirty ( void )

◆ bookmarks_set_dirty()

void bookmarks_set_dirty ( void )

◆ bookmarks_unset_dirty()

void bookmarks_unset_dirty ( void )

◆ delete_bookmark()

void delete_bookmark ( struct bookmark * bm)

◆ get_auto_save_bookmark_foldername_utf8()

char * get_auto_save_bookmark_foldername_utf8 ( void )

◆ get_bookmark()

struct bookmark * get_bookmark ( char * url)
Todo
Bug 1066: URLs in bookmark_cache should be UTF-8

◆ get_bookmark_by_name()

struct bookmark * get_bookmark_by_name ( struct bookmark * folder,
char * title )

Search for a bookmark with the given title.

The search does not recurse into subfolders.

Parameters
folderSearch in this folder. NULL means search in the root.
titleSearch for this title. Must be in UTF-8 and not NULL.
Returns
The bookmark, or NULL if not found.

◆ open_bookmark_folder()

void open_bookmark_folder ( struct session * ses,
char * foldername )

Open all bookmarks from the named folder.

Parameters
sesThe session in which to open the first bookmark. The other bookmarks of the folder open in new tabs on the same terminal.
foldernameThe name of the bookmark folder, in UTF-8.
Todo
Bug 1066: Tell the URI layer that bookmark->url is UTF-8.

◆ read_bookmarks()

void read_bookmarks ( void )

◆ update_bookmark()

int update_bookmark ( struct bookmark * bm,
int codepage,
char * title,
char * url )

◆ write_bookmarks()

void write_bookmarks ( void )

Variable Documentation

◆ bookmarks

struct bookmark list bookmarks
extern

◆ bookmarks_module

struct module bookmarks_module
extern