diff options
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index b46d9a7a1c..be08091eba 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -41,9 +41,11 @@ | |||
41 | #include "lcd.h" | 41 | #include "lcd.h" |
42 | #include "id3.h" | 42 | #include "id3.h" |
43 | #include "mpeg.h" | 43 | #include "mpeg.h" |
44 | #include "mp3_playback.h" | ||
45 | #include "settings.h" | ||
44 | 46 | ||
45 | /* increase this every time the api struct changes */ | 47 | /* increase this every time the api struct changes */ |
46 | #define PLUGIN_API_VERSION 9 | 48 | #define PLUGIN_API_VERSION 10 |
47 | 49 | ||
48 | /* update this to latest version if a change to the api struct breaks | 50 | /* update this to latest version if a change to the api struct breaks |
49 | backwards compatibility */ | 51 | backwards compatibility */ |
@@ -181,18 +183,33 @@ struct plugin_api { | |||
181 | int (*atoi)(const char *str); | 183 | int (*atoi)(const char *str); |
182 | struct tm* (*get_time)(void); | 184 | struct tm* (*get_time)(void); |
183 | void* (*plugin_get_buffer)(int* buffer_size); | 185 | void* (*plugin_get_buffer)(int* buffer_size); |
184 | /* new stuff */ | 186 | |
187 | /* new stuff, sort in next time the API gets broken! */ | ||
185 | #ifndef HAVE_LCD_CHARCELLS | 188 | #ifndef HAVE_LCD_CHARCELLS |
186 | unsigned char* lcd_framebuffer; | 189 | unsigned char* lcd_framebuffer; |
187 | /* performance function */ | 190 | /* performance function */ |
188 | void (*lcd_blit) (unsigned char* p_data, int x, int y, int width, int height, int stride); | 191 | void (*lcd_blit) (unsigned char* p_data, int x, int y, int width, int height, int stride); |
189 | #endif | 192 | #endif |
190 | void (*yield)(void); | 193 | void (*yield)(void); |
194 | |||
195 | void* (*plugin_get_mp3_buffer)(int* buffer_size); | ||
196 | void (*mpeg_sound_set)(int setting, int value); | ||
197 | #ifndef SIMULATOR | ||
198 | void (*mp3_play_init)(void); | ||
199 | void (*mp3_play_data)(unsigned char* start, int size, void (*get_more)(unsigned char** start, int* size)); | ||
200 | void (*mp3_play_pause)(bool play); | ||
201 | void (*mp3_play_stop)(void); | ||
202 | bool (*mp3_is_playing)(void); | ||
203 | void (*bitswap)(unsigned char *data, int length); | ||
204 | #endif | ||
205 | struct user_settings* global_settings; | ||
206 | void (*backlight_set_timeout)(unsigned int index); | ||
191 | }; | 207 | }; |
192 | 208 | ||
193 | /* defined by the plugin loader (plugin.c) */ | 209 | /* defined by the plugin loader (plugin.c) */ |
194 | int plugin_load(char* plugin, void* parameter); | 210 | int plugin_load(char* plugin, void* parameter); |
195 | void* plugin_get_buffer(int *buffer_size); | 211 | void* plugin_get_buffer(int *buffer_size); |
212 | void* plugin_get_mp3_buffer(int *buffer_size); | ||
196 | 213 | ||
197 | /* defined by the plugin */ | 214 | /* defined by the plugin */ |
198 | enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter) | 215 | enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter) |