Public buffer API. More...
#include <unistd.h>#include "buffer_source.h"#include "buffer_options.h"#include "buffer_event.h"

Go to the source code of this file.
Typedefs | |
| typedef struct bless_buffer | bless_buffer_t | 
| Opaque data type for a bless buffer.  | |
| typedef int( | bless_progress_func )(void *info) | 
| Callback function called to report the progress of long operations.   | |
| typedef void( | bless_buffer_event_func_t )(bless_buffer_t *buf, struct bless_buffer_event_info *info, void *user_data) | 
| Callback function called to report a buffer event.   | |
Functions | |
File Operations  | |
| int | bless_buffer_new (bless_buffer_t **buf) | 
| Creates an empty bless_buffer_t.   | |
| int | bless_buffer_save (bless_buffer_t *buf, int fd, bless_progress_func *progress_func) | 
| Saves the contents of a bless_buffer_t to a file.   | |
| int | bless_buffer_free (bless_buffer_t *buf) | 
| Frees a bless_buffer_t.   | |
Edit Actions  | |
| int | bless_buffer_append (bless_buffer_t *buf, bless_buffer_source_t *src, off_t src_offset, off_t length) | 
| Appends data to a bless_buffer_t.   | |
| int | bless_buffer_insert (bless_buffer_t *buf, off_t offset, bless_buffer_source_t *src, off_t src_offset, off_t length) | 
| Inserts data into a bless_buffer_t.   | |
| int | bless_buffer_delete (bless_buffer_t *buf, off_t offset, off_t length) | 
| Delete data from a bless_buffer_t.   | |
| int | bless_buffer_read (bless_buffer_t *src, off_t src_offset, void *dst, size_t dst_offset, size_t length) | 
| Reads data from a bless_buffer_t.   | |
Undo - Redo Operations  | |
| int | bless_buffer_undo (bless_buffer_t *buf) | 
| Undoes the last operation in a bless_buffer_t.   | |
| int | bless_buffer_redo (bless_buffer_t *buf) | 
| Redoes the last undone operation in a bless_buffer_t.   | |
| int | bless_buffer_begin_multi_action (bless_buffer_t *buf) | 
| Marks the beginning of a multi-action.   | |
| int | bless_buffer_end_multi_action (bless_buffer_t *buf) | 
| Marks the end of a multi-action.   | |
Buffer Information/Options  | |
| int | bless_buffer_can_undo (bless_buffer_t *buf, int *can_undo) | 
| Checks whether the last operation in a bless_buffer_t can be undone.   | |
| int | bless_buffer_can_redo (bless_buffer_t *buf, int *can_redo) | 
| Checks whether the last undone operation in a bless_buffer_t can be redone.   | |
| int | bless_buffer_get_size (bless_buffer_t *buf, off_t *size) | 
| Gets the size of a bless_buffer_t.   | |
| int | bless_buffer_set_option (bless_buffer_t *buf, bless_buffer_option_t opt, char *val) | 
| Sets a buffer option.   | |
| int | bless_buffer_get_option (bless_buffer_t *buf, char **val, bless_buffer_option_t opt) | 
| Gets a buffer option.   | |
| int | bless_buffer_set_event_callback (bless_buffer_t *buf, bless_buffer_event_func_t *func, void *user_data) | 
| Sets the callback function used to report buffer events.   | |
Public buffer API.
Definition in file buffer.h.
 1.6.1