diff options
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 51607a53e6..dc8a273c99 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -152,6 +152,7 @@ struct plugin_api { | |||
152 | #endif | 152 | #endif |
153 | void (*backlight_on)(void); | 153 | void (*backlight_on)(void); |
154 | void (*backlight_off)(void); | 154 | void (*backlight_off)(void); |
155 | void (*splash)(int ticks, bool center, char *fmt, ...); | ||
155 | 156 | ||
156 | /* button */ | 157 | /* button */ |
157 | int (*button_get)(bool block); | 158 | int (*button_get)(bool block); |
@@ -173,6 +174,9 @@ struct plugin_api { | |||
173 | int (*fprintf)(int fd, const char *fmt, ...); | 174 | int (*fprintf)(int fd, const char *fmt, ...); |
174 | int (*read_line)(int fd, char* buffer, int buffer_size); | 175 | int (*read_line)(int fd, char* buffer, int buffer_size); |
175 | bool (*settings_parseline)(char* line, char** name, char** value); | 176 | bool (*settings_parseline)(char* line, char** name, char** value); |
177 | #ifndef SIMULATOR | ||
178 | int (*ata_sleep)(void); | ||
179 | #endif | ||
176 | 180 | ||
177 | /* dir */ | 181 | /* dir */ |
178 | DIR* (*opendir)(const char* name); | 182 | DIR* (*opendir)(const char* name); |
@@ -187,6 +191,7 @@ struct plugin_api { | |||
187 | int (*default_event_handler)(int event); | 191 | int (*default_event_handler)(int event); |
188 | int (*create_thread)(void* function, void* stack, int stack_size, char *name); | 192 | int (*create_thread)(void* function, void* stack, int stack_size, char *name); |
189 | void (*remove_thread)(int threadnum); | 193 | void (*remove_thread)(int threadnum); |
194 | void (*reset_poweroff_timer)(void); | ||
190 | 195 | ||
191 | /* strings and memory */ | 196 | /* strings and memory */ |
192 | int (*snprintf)(char *buf, size_t size, const char *fmt, ...); | 197 | int (*snprintf)(char *buf, size_t size, const char *fmt, ...); |
@@ -201,6 +206,7 @@ struct plugin_api { | |||
201 | #ifndef SIMULATOR | 206 | #ifndef SIMULATOR |
202 | const char *_ctype_; | 207 | const char *_ctype_; |
203 | #endif | 208 | #endif |
209 | int (*atoi)(const char *str); | ||
204 | 210 | ||
205 | /* sound */ | 211 | /* sound */ |
206 | void (*mpeg_sound_set)(int setting, int value); | 212 | void (*mpeg_sound_set)(int setting, int value); |
@@ -210,9 +216,6 @@ struct plugin_api { | |||
210 | void (*mp3_play_stop)(void); | 216 | void (*mp3_play_stop)(void); |
211 | bool (*mp3_is_playing)(void); | 217 | bool (*mp3_is_playing)(void); |
212 | void (*bitswap)(unsigned char *data, int length); | 218 | void (*bitswap)(unsigned char *data, int length); |
213 | #ifdef HAVE_MAS3587F | ||
214 | int (*mas_codec_readreg)(int reg); | ||
215 | #endif | ||
216 | #endif | 219 | #endif |
217 | 220 | ||
218 | /* playback control */ | 221 | /* playback control */ |
@@ -227,17 +230,28 @@ struct plugin_api { | |||
227 | int (*playlist_amount)(void); | 230 | int (*playlist_amount)(void); |
228 | int (*mpeg_status)(void); | 231 | int (*mpeg_status)(void); |
229 | bool (*mpeg_has_changed_track)(void); | 232 | bool (*mpeg_has_changed_track)(void); |
233 | struct mp3entry* (*mpeg_current_track)(void); | ||
234 | |||
235 | /* MAS communication */ | ||
236 | #ifndef SIMULATOR | ||
237 | int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len); | ||
238 | int (*mas_writemem)(int bank, int addr, unsigned long* src, int len); | ||
239 | int (*mas_readreg)(int reg); | ||
240 | int (*mas_writereg)(int reg, unsigned int val); | ||
241 | #ifdef HAVE_MAS3587F | ||
242 | int (*mas_codec_writereg)(int reg, unsigned int val); | ||
243 | int (*mas_codec_readreg)(int reg); | ||
244 | #endif | ||
245 | #endif | ||
230 | 246 | ||
231 | /* misc */ | 247 | /* misc */ |
232 | void (*srand)(unsigned int seed); | 248 | void (*srand)(unsigned int seed); |
233 | int (*rand)(void); | 249 | int (*rand)(void); |
234 | void (*splash)(int ticks, bool center, char *fmt, ...); | ||
235 | void (*qsort)(void *base, size_t nmemb, size_t size, | 250 | void (*qsort)(void *base, size_t nmemb, size_t size, |
236 | int(*compar)(const void *, const void *)); | 251 | int(*compar)(const void *, const void *)); |
237 | int (*kbd_input)(char* buffer, int buflen); | 252 | int (*kbd_input)(char* buffer, int buflen); |
238 | struct mp3entry* (*mpeg_current_track)(void); | ||
239 | int (*atoi)(const char *str); | ||
240 | struct tm* (*get_time)(void); | 253 | struct tm* (*get_time)(void); |
254 | int (*set_time)(struct tm *tm); | ||
241 | void* (*plugin_get_buffer)(int* buffer_size); | 255 | void* (*plugin_get_buffer)(int* buffer_size); |
242 | void* (*plugin_get_mp3_buffer)(int* buffer_size); | 256 | void* (*plugin_get_mp3_buffer)(int* buffer_size); |
243 | #ifndef SIMULATOR | 257 | #ifndef SIMULATOR |
@@ -245,39 +259,23 @@ struct plugin_api { | |||
245 | void (*plugin_unregister_timer)(void); | 259 | void (*plugin_unregister_timer)(void); |
246 | #endif | 260 | #endif |
247 | void (*plugin_tsr)(void (*exit_callback)(void)); | 261 | void (*plugin_tsr)(void (*exit_callback)(void)); |
248 | |||
249 | /* new stuff, sort in next time the API gets broken! */ | ||
250 | |||
251 | struct user_settings* global_settings; | ||
252 | void (*backlight_set_timeout)(int index); | ||
253 | #ifndef SIMULATOR | ||
254 | int (*ata_sleep)(void); | ||
255 | #endif | ||
256 | |||
257 | |||
258 | #if defined(DEBUG) || defined(SIMULATOR) | 262 | #if defined(DEBUG) || defined(SIMULATOR) |
259 | void (*debugf)(char *fmt, ...); | 263 | void (*debugf)(char *fmt, ...); |
260 | #endif | ||
261 | bool (*mp3info)(struct mp3entry *entry, char *filename, bool v1first); | ||
262 | int (*count_mp3_frames)(int fd, int startpos, int filesize, | ||
263 | void (*progressfunc)(int)); | ||
264 | int (*create_xing_header)(int fd, int startpos, int filesize, | ||
265 | unsigned char *buf, int num_frames, | ||
266 | unsigned long header_template, | ||
267 | void (*progressfunc)(int), bool generate_toc); | ||
268 | |||
269 | #ifndef SIMULATOR | ||
270 | int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len); | ||
271 | int (*mas_writemem)(int bank, int addr, unsigned long* src, int len); | ||
272 | int (*mas_readreg)(int reg); | ||
273 | int (*mas_writereg)(int reg, unsigned int val); | ||
274 | #ifdef HAVE_MAS3587F | ||
275 | int (*mas_codec_writereg)(int reg, unsigned int val); | ||
276 | #endif | ||
277 | #endif | 264 | #endif |
265 | struct user_settings* global_settings; | ||
266 | void (*backlight_set_timeout)(int index); | ||
267 | bool (*mp3info)(struct mp3entry *entry, char *filename, bool v1first); | ||
268 | int (*count_mp3_frames)(int fd, int startpos, int filesize, | ||
269 | void (*progressfunc)(int)); | ||
270 | int (*create_xing_header)(int fd, int startpos, int filesize, | ||
271 | unsigned char *buf, int num_frames, | ||
272 | unsigned long header_template, | ||
273 | void (*progressfunc)(int), bool generate_toc); | ||
278 | int (*battery_level)(void); | 274 | int (*battery_level)(void); |
279 | int (*set_time)(struct tm *tm); | 275 | |
280 | void (*reset_poweroff_timer)(void); | 276 | /* new stuff at the end, sort into place next time |
277 | the API gets incompatible */ | ||
278 | |||
281 | 279 | ||
282 | }; | 280 | }; |
283 | 281 | ||