summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-08-30 16:48:36 +0000
committerThomas Martitz <kugel@rockbox.org>2011-08-30 16:48:36 +0000
commit42f10e04df42ab19aac74f82a6f113ee29e2012b (patch)
treecf0561936fd8e22bc95b38a0575a078f7039acfa /apps/plugin.h
parent456170afdf8eb9c43abe7580a3b522c934273a1e (diff)
Remove buflib from the pluginlib and use the core one.
buflib_get_data() isn't inlined for plugins anymore, but can be if really needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30387 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 9bfe3fa16d..d566a5dc13 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -91,6 +91,7 @@ void* plugin_get_buffer(size_t *buffer_size);
#include "list.h"
#include "tree.h"
#include "color_picker.h"
+#include "buflib.h"
#include "buffering.h"
#include "tagcache.h"
#include "viewport.h"
@@ -928,6 +929,23 @@ struct plugin_api {
the API gets incompatible */
struct entry* (*tree_get_entries)(struct tree_context* t);
struct entry* (*tree_get_entry_at)(struct tree_context* t, int index);
+
+ /* the buflib memory management library */
+ void (*buflib_init)(struct buflib_context* ctx, void* buf, size_t size);
+ size_t (*buflib_available)(struct buflib_context* ctx);
+ int (*buflib_alloc)(struct buflib_context* ctx, size_t size);
+ int (*buflib_alloc_ex)(struct buflib_context* ctx, size_t size,
+ const char* name, struct buflib_callbacks *ops);
+ int (*buflib_alloc_maximum)(struct buflib_context* ctx, const char* name,
+ size_t* size, struct buflib_callbacks *ops);
+ void (*buflib_buffer_in)(struct buflib_context* ctx, int size);
+ void* (*buflib_buffer_out)(struct buflib_context* ctx, size_t* size);
+ int (*buflib_free)(struct buflib_context* ctx, int handle);
+ bool (*buflib_shrink)(struct buflib_context* ctx, int handle,
+ void* new_start, size_t new_size);
+ void* (*buflib_get_data)(struct buflib_context* ctx, int handle);
+ const char* (*buflib_get_name)(struct buflib_context* ctx, int handle);
+
};
/* plugin header */