diff options
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index 8b8481b6ac..e55dcf13cb 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -75,7 +75,7 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
75 | #include "profile.h" | 75 | #include "profile.h" |
76 | #endif | 76 | #endif |
77 | #include "misc.h" | 77 | #include "misc.h" |
78 | #include "filefuncs.h" | 78 | #include "pathfuncs.h" |
79 | #if (CONFIG_CODEC == SWCODEC) | 79 | #if (CONFIG_CODEC == SWCODEC) |
80 | #include "pcm_mixer.h" | 80 | #include "pcm_mixer.h" |
81 | #include "dsp-util.h" | 81 | #include "dsp-util.h" |
@@ -160,12 +160,12 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
160 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 160 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
161 | 161 | ||
162 | /* increase this every time the api struct changes */ | 162 | /* increase this every time the api struct changes */ |
163 | #define PLUGIN_API_VERSION 231 | 163 | #define PLUGIN_API_VERSION 232 |
164 | 164 | ||
165 | /* update this to latest version if a change to the api struct breaks | 165 | /* update this to latest version if a change to the api struct breaks |
166 | backwards compatibility (and please take the opportunity to sort in any | 166 | backwards compatibility (and please take the opportunity to sort in any |
167 | new function which are "waiting" at the end of the function table) */ | 167 | new function which are "waiting" at the end of the function table) */ |
168 | #define PLUGIN_MIN_API_VERSION 231 | 168 | #define PLUGIN_MIN_API_VERSION 232 |
169 | 169 | ||
170 | /* plugin return codes */ | 170 | /* plugin return codes */ |
171 | /* internal returns start at 0x100 to make exit(1..255) work */ | 171 | /* internal returns start at 0x100 to make exit(1..255) work */ |
@@ -433,17 +433,17 @@ struct plugin_api { | |||
433 | 433 | ||
434 | /* file */ | 434 | /* file */ |
435 | int (*open_utf8)(const char* pathname, int flags); | 435 | int (*open_utf8)(const char* pathname, int flags); |
436 | int (*open)(const char* pathname, int flags, ...); | 436 | int (*open)(const char *path, int oflag, ...); |
437 | int (*close)(int fd); | 437 | int (*creat)(const char *path, mode_t mode); |
438 | ssize_t (*read)(int fd, void* buf, size_t count); | 438 | int (*close)(int fildes); |
439 | off_t (*lseek)(int fd, off_t offset, int whence); | 439 | ssize_t (*read)(int fildes, void *buf, size_t nbyte); |
440 | int (*creat)(const char *pathname, mode_t mode); | 440 | off_t (*lseek)(int fildes, off_t offset, int whence); |
441 | ssize_t (*write)(int fd, const void* buf, size_t count); | 441 | ssize_t (*write)(int fildes, const void *buf, size_t nbyte); |
442 | int (*remove)(const char* pathname); | 442 | int (*remove)(const char *path); |
443 | int (*rename)(const char* path, const char* newname); | 443 | int (*rename)(const char *old, const char *new); |
444 | int (*ftruncate)(int fd, off_t length); | 444 | int (*ftruncate)(int fildes, off_t length); |
445 | off_t (*filesize)(int fd); | 445 | off_t (*filesize)(int fildes); |
446 | int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); | 446 | int (*fdprintf)(int fildes, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); |
447 | int (*read_line)(int fd, char* buffer, int buffer_size); | 447 | int (*read_line)(int fd, char* buffer, int buffer_size); |
448 | bool (*settings_parseline)(char* line, char** name, char** value); | 448 | bool (*settings_parseline)(char* line, char** name, char** value); |
449 | void (*storage_sleep)(void); | 449 | void (*storage_sleep)(void); |
@@ -457,7 +457,7 @@ struct plugin_api { | |||
457 | char *(*create_numbered_filename)(char *buffer, const char *path, | 457 | char *(*create_numbered_filename)(char *buffer, const char *path, |
458 | const char *prefix, const char *suffix, | 458 | const char *prefix, const char *suffix, |
459 | int numberlen IF_CNFN_NUM_(, int *num)); | 459 | int numberlen IF_CNFN_NUM_(, int *num)); |
460 | bool (*file_exists)(const char *file); | 460 | bool (*file_exists)(const char *path); |
461 | char* (*strip_extension)(char* buffer, int buffer_size, const char *filename); | 461 | char* (*strip_extension)(char* buffer, int buffer_size, const char *filename); |
462 | uint32_t (*crc_32)(const void *src, uint32_t len, uint32_t crc32); | 462 | uint32_t (*crc_32)(const void *src, uint32_t len, uint32_t crc32); |
463 | 463 | ||
@@ -466,13 +466,13 @@ struct plugin_api { | |||
466 | 466 | ||
467 | 467 | ||
468 | /* dir */ | 468 | /* dir */ |
469 | DIR* (*opendir)(const char* name); | 469 | DIR * (*opendir)(const char *dirname); |
470 | int (*closedir)(DIR* dir); | 470 | int (*closedir)(DIR *dirp); |
471 | struct dirent* (*readdir)(DIR* dir); | 471 | struct dirent * (*readdir)(DIR *dirp); |
472 | int (*mkdir)(const char *name); | 472 | int (*mkdir)(const char *path); |
473 | int (*rmdir)(const char *name); | 473 | int (*rmdir)(const char *path); |
474 | bool (*dir_exists)(const char *path); | 474 | bool (*dir_exists)(const char *dirname); |
475 | struct dirinfo (*dir_get_info)(DIR* parent, struct dirent *entry); | 475 | struct dirinfo (*dir_get_info)(DIR *dirp, struct dirent *entry); |
476 | 476 | ||
477 | /* browsing */ | 477 | /* browsing */ |
478 | void (*browse_context_init)(struct browse_context *browse, | 478 | void (*browse_context_init)(struct browse_context *browse, |
@@ -838,6 +838,7 @@ struct plugin_api { | |||
838 | int (*kbd_input)(char* buffer, int buflen); | 838 | int (*kbd_input)(char* buffer, int buflen); |
839 | struct tm* (*get_time)(void); | 839 | struct tm* (*get_time)(void); |
840 | int (*set_time)(const struct tm *tm); | 840 | int (*set_time)(const struct tm *tm); |
841 | struct tm * (*gmtime_r)(const time_t *timep, struct tm *tm); | ||
841 | #if CONFIG_RTC | 842 | #if CONFIG_RTC |
842 | time_t (*mktime)(struct tm *t); | 843 | time_t (*mktime)(struct tm *t); |
843 | #endif | 844 | #endif |