1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
elinks/src/bookmarks/bookmarks.h
Kalle Olavi Niemitalo 99d1269bc5 bug 153, 1066: Convert session-snapshot bookmarks to/from UTF-8.
These functions now expect or return strings in UTF-8:
delete_folder_by_name (sneak in a const, too), bookmark_terminal_tabs,
open_bookmark_folder, and get_auto_save_bookmark_foldername_utf8 (new
function).
2009-02-08 18:26:19 +02:00

61 lines
1.7 KiB
C

#ifndef EL__BOOKMARKS_BOOKMARKS_H
#define EL__BOOKMARKS_BOOKMARKS_H
#include "main/module.h"
#include "main/object.h"
#include "util/lists.h"
struct listbox_item;
struct terminal;
/* Bookmark record structure */
struct bookmark {
OBJECT_HEAD(struct bookmark);
struct bookmark *root;
struct listbox_item *box_item;
/** @todo Bugs 153, 1066: The #title and #url strings should
* be in UTF-8, but this has not yet been fully implemented. */
unsigned char *title; /* title of bookmark */
unsigned char *url; /* Location of bookmarked item */
LIST_OF(struct bookmark) child;
};
/* Bookmark lists */
extern LIST_OF(struct bookmark) bookmarks;
/* The bookmarks module */
extern struct module bookmarks_module;
/* Read/write bookmarks functions */
void read_bookmarks(void);
void write_bookmarks(void);
/* Bookmarks manipulation */
void bookmarks_set_dirty(void);
void bookmarks_unset_dirty(void);
int bookmarks_are_dirty(void);
void delete_bookmark(struct bookmark *);
struct bookmark *add_bookmark(struct bookmark *, int, unsigned char *, unsigned char *);
struct bookmark *add_bookmark_cp(struct bookmark *, int, int,
unsigned char *, unsigned char *);
struct bookmark *get_bookmark_by_name(struct bookmark *folder,
unsigned char *title);
struct bookmark *get_bookmark(unsigned char *url);
void bookmark_terminal_tabs(struct terminal *term, unsigned char *foldername);
unsigned char *get_auto_save_bookmark_foldername_utf8(void);
void bookmark_auto_save_tabs(struct terminal *term);
int update_bookmark(struct bookmark *, int,
unsigned char *, unsigned char *);
void open_bookmark_folder(struct session *ses, unsigned char *foldername);
#endif