summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 390a65c7ad..6b198686f2 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -123,12 +123,6 @@ void* plugin_get_buffer(size_t *buffer_size);
123 123
124#endif 124#endif
125 125
126#ifdef SIMULATOR
127#define PREFIX(_x_) sim_ ## _x_
128#else
129#define PREFIX(_x_) _x_
130#endif
131
132#define PLUGIN_MAGIC 0x526F634B /* RocK */ 126#define PLUGIN_MAGIC 0x526F634B /* RocK */
133 127
134/* increase this every time the api struct changes */ 128/* increase this every time the api struct changes */
@@ -369,16 +363,16 @@ struct plugin_api {
369#endif /* HAVE_BUTTON_LIGHT */ 363#endif /* HAVE_BUTTON_LIGHT */
370 364
371 /* file */ 365 /* file */
372 int (*PREFIX(open))(const char* pathname, int flags); 366 int (*open)(const char* pathname, int flags);
373 int (*PREFIX(close))(int fd); 367 int (*close)(int fd);
374 ssize_t (*PREFIX(read))(int fd, void* buf, size_t count); 368 ssize_t (*read)(int fd, void* buf, size_t count);
375 off_t (*PREFIX(lseek))(int fd, off_t offset, int whence); 369 off_t (*lseek)(int fd, off_t offset, int whence);
376 int (*PREFIX(creat))(const char *pathname); 370 int (*creat)(const char *pathname);
377 ssize_t (*PREFIX(write))(int fd, const void* buf, size_t count); 371 ssize_t (*write)(int fd, const void* buf, size_t count);
378 int (*PREFIX(remove))(const char* pathname); 372 int (*remove)(const char* pathname);
379 int (*PREFIX(rename))(const char* path, const char* newname); 373 int (*rename)(const char* path, const char* newname);
380 int (*PREFIX(ftruncate))(int fd, off_t length); 374 int (*ftruncate)(int fd, off_t length);
381 off_t (*PREFIX(filesize))(int fd); 375 off_t (*filesize)(int fd);
382 int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); 376 int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
383 int (*read_line)(int fd, char* buffer, int buffer_size); 377 int (*read_line)(int fd, char* buffer, int buffer_size);
384 bool (*settings_parseline)(char* line, char** name, char** value); 378 bool (*settings_parseline)(char* line, char** name, char** value);
@@ -405,7 +399,7 @@ struct plugin_api {
405 bool (*dir_exists)(const char *path); 399 bool (*dir_exists)(const char *path);
406 400
407 /* kernel/ system */ 401 /* kernel/ system */
408 void (*PREFIX(sleep))(int ticks); 402 void (*sleep)(int ticks);
409 void (*yield)(void); 403 void (*yield)(void);
410 volatile long* current_tick; 404 volatile long* current_tick;
411 long (*default_event_handler)(long event); 405 long (*default_event_handler)(long event);
@@ -577,7 +571,7 @@ struct plugin_api {
577 int (*playlist_amount)(void); 571 int (*playlist_amount)(void);
578 int (*playlist_resume)(void); 572 int (*playlist_resume)(void);
579 int (*playlist_start)(int start_index, int offset); 573 int (*playlist_start)(int start_index, int offset);
580 void (*PREFIX(audio_play))(long offset); 574 void (*audio_play)(long offset);
581 void (*audio_stop)(void); 575 void (*audio_stop)(void);
582 void (*audio_pause)(void); 576 void (*audio_pause)(void);
583 void (*audio_resume)(void); 577 void (*audio_resume)(void);