FS#1535 - Minor plugin changes

Attached to Project: Rockbox
Opened by Hardeep Sidhu (hardeeps) - Monday, 21 July 2003, 18:48 GMT
Last edited by Hardeep Sidhu (hardeeps) - Sunday, 27 July 2003, 19:27 GMT
Task Type Patches
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


A couple of minor changes to the plugin code:

1. Changed plugin_test() to allow plugins that were
created with an older version of the api. So long as we
are only adding new functions and these functions are
added at the end of the api structure, the plugin code is
backwards compatible. To handle the case where
backwards compatibility breaks (e.g. if the existing APIs
change), added the PLUGIN_MIN_API_VERSION define.

2. Added the plugin_get_buffer() function which can be
called by both plugins and built-in modules and returns a
pointer to the portion of the plugin buffer not already
used by a plugin (returns entire buffer if no plugin
loaded). Modified text viewer plugin to use this function
(~30k vs. 1k of buffer space).
This task depends upon

Closed by  Hardeep Sidhu (hardeeps)
Sunday, 27 July 2003, 19:25 GMT
Reason for closing:  Accepted
Comment by Daniel Stenberg (bagder) - Thursday, 24 July 2003, 11:41 GMT

I say we add both these ones.

Regarding the 1, we need to make a huge comment in the code
about how to add new functions to the struct.