diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 20 | ||||
-rw-r--r-- | apps/plugin.h | 27 | ||||
-rw-r--r-- | apps/plugins/lib/id3.c | 2 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 2 | ||||
-rw-r--r-- | apps/plugins/playing_time.c | 5 | ||||
-rw-r--r-- | apps/plugins/properties.c | 4 | ||||
-rw-r--r-- | apps/plugins/vbrfix.c | 4 |
7 files changed, 30 insertions, 34 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index bd849dad50..20b438999b 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -352,7 +352,6 @@ static const struct plugin_api rockbox_api = { | |||
352 | yesno_pop, | 352 | yesno_pop, |
353 | 353 | ||
354 | /* action handling */ | 354 | /* action handling */ |
355 | list_do_action, | ||
356 | get_custom_action, | 355 | get_custom_action, |
357 | get_action, | 356 | get_action, |
358 | #ifdef HAVE_TOUCHSCREEN | 357 | #ifdef HAVE_TOUCHSCREEN |
@@ -422,6 +421,7 @@ static const struct plugin_api rockbox_api = { | |||
422 | crc_32, | 421 | crc_32, |
423 | crc_32r, | 422 | crc_32r, |
424 | filetype_get_attr, | 423 | filetype_get_attr, |
424 | filetype_get_plugin, | ||
425 | 425 | ||
426 | /* dir */ | 426 | /* dir */ |
427 | FS_PREFIX(opendir), | 427 | FS_PREFIX(opendir), |
@@ -582,6 +582,9 @@ static const struct plugin_api rockbox_api = { | |||
582 | utf8length, | 582 | utf8length, |
583 | utf8seek, | 583 | utf8seek, |
584 | 584 | ||
585 | /* language */ | ||
586 | lang_is_rtl, | ||
587 | |||
585 | /* the buflib memory management library */ | 588 | /* the buflib memory management library */ |
586 | buflib_init, | 589 | buflib_init, |
587 | buflib_available, | 590 | buflib_available, |
@@ -665,7 +668,7 @@ static const struct plugin_api rockbox_api = { | |||
665 | 668 | ||
666 | /* metadata */ | 669 | /* metadata */ |
667 | get_metadata, | 670 | get_metadata, |
668 | mp3info, | 671 | get_codec_string, |
669 | count_mp3_frames, | 672 | count_mp3_frames, |
670 | create_xing_header, | 673 | create_xing_header, |
671 | #ifdef HAVE_TAGCACHE | 674 | #ifdef HAVE_TAGCACHE |
@@ -677,6 +680,7 @@ static const struct plugin_api rockbox_api = { | |||
677 | tagcache_search_finish, | 680 | tagcache_search_finish, |
678 | tagcache_get_numeric, | 681 | tagcache_get_numeric, |
679 | tagcache_get_stat, | 682 | tagcache_get_stat, |
683 | tagcache_commit_finalize, | ||
680 | #if defined(HAVE_TC_RAMCACHE) | 684 | #if defined(HAVE_TC_RAMCACHE) |
681 | tagcache_is_in_ram, | 685 | tagcache_is_in_ram, |
682 | #if defined(HAVE_DIRCACHE) | 686 | #if defined(HAVE_DIRCACHE) |
@@ -694,6 +698,9 @@ static const struct plugin_api rockbox_api = { | |||
694 | playlist_get_current, | 698 | playlist_get_current, |
695 | playlist_get_resume_info, | 699 | playlist_get_resume_info, |
696 | playlist_get_track_info, | 700 | playlist_get_track_info, |
701 | playlist_get_first_index, | ||
702 | playlist_get_display_index, | ||
703 | playlist_entries_iterate, | ||
697 | playlist_amount, | 704 | playlist_amount, |
698 | playlist_resume, | 705 | playlist_resume, |
699 | playlist_resume_track, | 706 | playlist_resume_track, |
@@ -833,15 +840,6 @@ static const struct plugin_api rockbox_api = { | |||
833 | 840 | ||
834 | /* new stuff at the end, sort into place next time | 841 | /* new stuff at the end, sort into place next time |
835 | the API gets incompatible */ | 842 | the API gets incompatible */ |
836 | #ifdef HAVE_TAGCACHE | ||
837 | tagcache_commit_finalize, | ||
838 | #endif | ||
839 | playlist_get_first_index, | ||
840 | playlist_get_display_index, | ||
841 | filetype_get_plugin, | ||
842 | playlist_entries_iterate, | ||
843 | lang_is_rtl, | ||
844 | get_codec_string, | ||
845 | }; | 843 | }; |
846 | 844 | ||
847 | static int plugin_buffer_handle; | 845 | static int plugin_buffer_handle; |
diff --git a/apps/plugin.h b/apps/plugin.h index 66c895d0db..135a068898 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -163,7 +163,7 @@ int plugin_open(const char *plugin, const char *parameter); | |||
163 | * when this happens please take the opportunity to sort in | 163 | * when this happens please take the opportunity to sort in |
164 | * any new functions "waiting" at the end of the list. | 164 | * any new functions "waiting" at the end of the list. |
165 | */ | 165 | */ |
166 | #define PLUGIN_API_VERSION 270 | 166 | #define PLUGIN_API_VERSION 271 |
167 | 167 | ||
168 | /* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */ | 168 | /* 239 Marks the removal of ARCHOS HWCODEC and CHARCELL */ |
169 | 169 | ||
@@ -405,8 +405,6 @@ struct plugin_api { | |||
405 | bool (*yesno_pop)(const char* text); | 405 | bool (*yesno_pop)(const char* text); |
406 | 406 | ||
407 | /* action handling */ | 407 | /* action handling */ |
408 | bool (*list_do_action)(int context, int timeout, | ||
409 | struct gui_synclist *lists, int *action); | ||
410 | int (*get_custom_action)(int context,int timeout, | 408 | int (*get_custom_action)(int context,int timeout, |
411 | const struct button_mapping* (*get_context_map)(int)); | 409 | const struct button_mapping* (*get_context_map)(int)); |
412 | int (*get_action)(int context, int timeout); | 410 | int (*get_action)(int context, int timeout); |
@@ -479,6 +477,7 @@ struct plugin_api { | |||
479 | uint32_t (*crc_32r)(const void *src, uint32_t len, uint32_t crc32); | 477 | uint32_t (*crc_32r)(const void *src, uint32_t len, uint32_t crc32); |
480 | 478 | ||
481 | int (*filetype_get_attr)(const char* file); | 479 | int (*filetype_get_attr)(const char* file); |
480 | char* (*filetype_get_plugin)(int attr, char *buffer, size_t buffer_len); | ||
482 | 481 | ||
483 | /* dir */ | 482 | /* dir */ |
484 | DIR * (*opendir)(const char *dirname); | 483 | DIR * (*opendir)(const char *dirname); |
@@ -662,6 +661,9 @@ struct plugin_api { | |||
662 | unsigned long (*utf8length)(const unsigned char *utf8); | 661 | unsigned long (*utf8length)(const unsigned char *utf8); |
663 | int (*utf8seek)(const unsigned char* utf8, int offset); | 662 | int (*utf8seek)(const unsigned char* utf8, int offset); |
664 | 663 | ||
664 | /* language */ | ||
665 | int (*lang_is_rtl)(void); | ||
666 | |||
665 | /* the buflib memory management library */ | 667 | /* the buflib memory management library */ |
666 | void (*buflib_init)(struct buflib_context* ctx, void* buf, size_t size); | 668 | void (*buflib_init)(struct buflib_context* ctx, void* buf, size_t size); |
667 | size_t (*buflib_available)(struct buflib_context* ctx); | 669 | size_t (*buflib_available)(struct buflib_context* ctx); |
@@ -761,7 +763,7 @@ struct plugin_api { | |||
761 | 763 | ||
762 | /* metadata */ | 764 | /* metadata */ |
763 | bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname); | 765 | bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname); |
764 | bool (*mp3info)(struct mp3entry *entry, const char *filename); | 766 | const char* (*get_codec_string)(int codectype); |
765 | int (*count_mp3_frames)(int fd, int startpos, int filesize, | 767 | int (*count_mp3_frames)(int fd, int startpos, int filesize, |
766 | void (*progressfunc)(int), | 768 | void (*progressfunc)(int), |
767 | unsigned char* buf, size_t buflen); | 769 | unsigned char* buf, size_t buflen); |
@@ -782,6 +784,7 @@ struct plugin_api { | |||
782 | void (*tagcache_search_finish)(struct tagcache_search *tcs); | 784 | void (*tagcache_search_finish)(struct tagcache_search *tcs); |
783 | long (*tagcache_get_numeric)(const struct tagcache_search *tcs, int tag); | 785 | long (*tagcache_get_numeric)(const struct tagcache_search *tcs, int tag); |
784 | struct tagcache_stat* (*tagcache_get_stat)(void); | 786 | struct tagcache_stat* (*tagcache_get_stat)(void); |
787 | void (*tagcache_commit_finalize)(void); | ||
785 | #if defined(HAVE_TC_RAMCACHE) | 788 | #if defined(HAVE_TC_RAMCACHE) |
786 | bool (*tagcache_is_in_ram)(void); | 789 | bool (*tagcache_is_in_ram)(void); |
787 | #if defined(HAVE_DIRCACHE) | 790 | #if defined(HAVE_DIRCACHE) |
@@ -801,6 +804,11 @@ struct plugin_api { | |||
801 | int (*playlist_get_resume_info)(int *resume_index); | 804 | int (*playlist_get_resume_info)(int *resume_index); |
802 | int (*playlist_get_track_info)(struct playlist_info* playlist, int index, | 805 | int (*playlist_get_track_info)(struct playlist_info* playlist, int index, |
803 | struct playlist_track_info* info); | 806 | struct playlist_track_info* info); |
807 | int (*playlist_get_first_index)(const struct playlist_info* playlist); | ||
808 | int (*playlist_get_display_index)(void); | ||
809 | bool (*playlist_entries_iterate)(const char *filename, | ||
810 | struct playlist_insert_context *pl_context, | ||
811 | bool (*action_cb)(const char *file_name)); | ||
804 | int (*playlist_amount)(void); | 812 | int (*playlist_amount)(void); |
805 | int (*playlist_resume)(void); | 813 | int (*playlist_resume)(void); |
806 | void (*playlist_resume_track)(int start_index, unsigned int crc, | 814 | void (*playlist_resume_track)(int start_index, unsigned int crc, |
@@ -969,17 +977,6 @@ struct plugin_api { | |||
969 | #endif | 977 | #endif |
970 | /* new stuff at the end, sort into place next time | 978 | /* new stuff at the end, sort into place next time |
971 | the API gets incompatible */ | 979 | the API gets incompatible */ |
972 | #ifdef HAVE_TAGCACHE | ||
973 | void (*tagcache_commit_finalize)(void); | ||
974 | #endif | ||
975 | int (*playlist_get_first_index)(const struct playlist_info* playlist); | ||
976 | int (*playlist_get_display_index)(void); | ||
977 | char* (*filetype_get_plugin)(int attr, char *buffer, size_t buffer_len); | ||
978 | bool (*playlist_entries_iterate)(const char *filename, | ||
979 | struct playlist_insert_context *pl_context, | ||
980 | bool (*action_cb)(const char *file_name)); | ||
981 | int (*lang_is_rtl)(void); | ||
982 | const char* (*get_codec_string)(int codectype); | ||
983 | }; | 980 | }; |
984 | 981 | ||
985 | /* plugin header */ | 982 | /* plugin header */ |
diff --git a/apps/plugins/lib/id3.c b/apps/plugins/lib/id3.c index b0202b1d9c..6af715b1fb 100644 --- a/apps/plugins/lib/id3.c +++ b/apps/plugins/lib/id3.c | |||
@@ -35,5 +35,5 @@ bool retrieve_id3(struct mp3entry *id3, const char* file) | |||
35 | } | 35 | } |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | return !rb->mp3info(id3, file); | 38 | return rb->get_metadata(id3, -1, file); |
39 | } | 39 | } |
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 87ad1a403f..e5492cf01c 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -4040,7 +4040,7 @@ static int show_id3_info(const char *selected_file) | |||
4040 | i = 0; | 4040 | i = 0; |
4041 | do { | 4041 | do { |
4042 | file_name = i == 0 ? selected_file : get_track_filename(i); | 4042 | file_name = i == 0 ? selected_file : get_track_filename(i); |
4043 | if (rb->mp3info(&id3, file_name)) | 4043 | if (!rb->get_metadata(&id3, -1, file_name)) |
4044 | return 0; | 4044 | return 0; |
4045 | 4045 | ||
4046 | if (is_multiple_tracks) | 4046 | if (is_multiple_tracks) |
diff --git a/apps/plugins/playing_time.c b/apps/plugins/playing_time.c index f8b4b006a9..1da0d437c0 100644 --- a/apps/plugins/playing_time.c +++ b/apps/plugins/playing_time.c | |||
@@ -350,7 +350,7 @@ static bool playing_time(void) | |||
350 | continue; | 350 | continue; |
351 | 351 | ||
352 | if (rb->playlist_get_track_info(NULL, index, &pltrack) < 0 | 352 | if (rb->playlist_get_track_info(NULL, index, &pltrack) < 0 |
353 | || rb->mp3info(&id3, pltrack.filename)) | 353 | || !rb->get_metadata(&id3, -1, pltrack.filename)) |
354 | { | 354 | { |
355 | error_count++; | 355 | error_count++; |
356 | continue; | 356 | continue; |
@@ -392,7 +392,8 @@ static bool playing_time(void) | |||
392 | rb->gui_synclist_draw(&pt_lists); | 392 | rb->gui_synclist_draw(&pt_lists); |
393 | rb->gui_synclist_speak_item(&pt_lists); | 393 | rb->gui_synclist_speak_item(&pt_lists); |
394 | while (true) { | 394 | while (true) { |
395 | if (rb->list_do_action(CONTEXT_LIST, HZ/2, &pt_lists, &key) == 0 | 395 | key = rb->get_action(CONTEXT_LIST, HZ/2); |
396 | if (rb->gui_synclist_do_button(&pt_lists, &key) == 0 | ||
396 | && key!=ACTION_NONE && key!=ACTION_UNKNOWN) | 397 | && key!=ACTION_NONE && key!=ACTION_UNKNOWN) |
397 | { | 398 | { |
398 | bool usb = rb->default_event_handler(key) == SYS_USB_CONNECTED; | 399 | bool usb = rb->default_event_handler(key) == SYS_USB_CONNECTED; |
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 73ec64be80..dc55b8128b 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -130,7 +130,7 @@ static bool file_properties(const char* selected_file) | |||
130 | rb->snprintf(str_time, sizeof str_time, "%02d:%02d:%02d", | 130 | rb->snprintf(str_time, sizeof str_time, "%02d:%02d:%02d", |
131 | tm.tm_hour, tm.tm_min, tm.tm_sec); | 131 | tm.tm_hour, tm.tm_min, tm.tm_sec); |
132 | 132 | ||
133 | if (props_type != PROPS_PLAYLIST && !rb->mp3info(&id3, selected_file)) | 133 | if (props_type != PROPS_PLAYLIST && rb->get_metadata(&id3, -1, selected_file)) |
134 | props_type = PROPS_ID3; | 134 | props_type = PROPS_ID3; |
135 | found = true; | 135 | found = true; |
136 | break; | 136 | break; |
@@ -416,7 +416,7 @@ static bool determine_file_or_dir(void) | |||
416 | 416 | ||
417 | bool mul_id3_add(const char *file_name) | 417 | bool mul_id3_add(const char *file_name) |
418 | { | 418 | { |
419 | if (!file_name || rb->mp3info(&id3, file_name)) | 419 | if (!file_name || !rb->get_metadata(&id3, -1, file_name)) |
420 | skipped_count++; | 420 | skipped_count++; |
421 | else | 421 | else |
422 | { | 422 | { |
diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c index 5aaf2ffada..622a0a4f07 100644 --- a/apps/plugins/vbrfix.c +++ b/apps/plugins/vbrfix.c | |||
@@ -155,8 +155,8 @@ static bool vbr_fix(const char *selected_file) | |||
155 | 155 | ||
156 | xingupdate(0); | 156 | xingupdate(0); |
157 | 157 | ||
158 | rc = rb->mp3info(&entry, selected_file); | 158 | rc = rb->get_metadata(&entry, -1, selected_file); |
159 | if(rc) { | 159 | if(!rc) { |
160 | fileerror(rc); | 160 | fileerror(rc); |
161 | return true; | 161 | return true; |
162 | } | 162 | } |