summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h46
1 files changed, 19 insertions, 27 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 6727ca4caf..7e198c97bd 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -144,12 +144,12 @@ void* plugin_get_buffer(size_t *buffer_size);
144#define PLUGIN_MAGIC 0x526F634B /* RocK */ 144#define PLUGIN_MAGIC 0x526F634B /* RocK */
145 145
146/* increase this every time the api struct changes */ 146/* increase this every time the api struct changes */
147#define PLUGIN_API_VERSION 186 147#define PLUGIN_API_VERSION 187
148 148
149/* update this to latest version if a change to the api struct breaks 149/* update this to latest version if a change to the api struct breaks
150 backwards compatibility (and please take the opportunity to sort in any 150 backwards compatibility (and please take the opportunity to sort in any
151 new function which are "waiting" at the end of the function table) */ 151 new function which are "waiting" at the end of the function table) */
152#define PLUGIN_MIN_API_VERSION 182 152#define PLUGIN_MIN_API_VERSION 187
153 153
154/* plugin return codes */ 154/* plugin return codes */
155enum plugin_status { 155enum plugin_status {
@@ -259,6 +259,9 @@ struct plugin_api {
259 struct event_queue *button_queue; 259 struct event_queue *button_queue;
260#endif 260#endif
261 unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); 261 unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation );
262#ifdef HAVE_LCD_BITMAP
263 bool (*is_diacritic)(const unsigned short char_code, bool *is_rtl);
264#endif
262 const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); 265 const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code );
263 int (*font_load)(struct font*, const char *path); 266 int (*font_load)(struct font*, const char *path);
264 struct font* (*font_get)(int font); 267 struct font* (*font_get)(int font);
@@ -577,6 +580,10 @@ struct plugin_api {
577 int (*sound_max)(int setting); 580 int (*sound_max)(int setting);
578 const char * (*sound_unit)(int setting); 581 const char * (*sound_unit)(int setting);
579 int (*sound_val2phys)(int setting, int value); 582 int (*sound_val2phys)(int setting, int value);
583#ifdef AUDIOHW_HAVE_EQ
584 int (*sound_enum_hw_eq_band_setting)(unsigned int band,
585 unsigned int band_setting);
586#endif /* AUDIOHW_HAVE_EQ */
580#ifndef SIMULATOR 587#ifndef SIMULATOR
581 void (*mp3_play_data)(const unsigned char* start, int size, 588 void (*mp3_play_data)(const unsigned char* start, int size,
582 void (*get_more)(unsigned char** start, size_t* size)); 589 void (*get_more)(unsigned char** start, size_t* size));
@@ -591,7 +598,7 @@ struct plugin_api {
591 const unsigned long *audio_master_sampr_list; 598 const unsigned long *audio_master_sampr_list;
592 const unsigned long *hw_freq_sampr; 599 const unsigned long *hw_freq_sampr;
593 void (*pcm_apply_settings)(void); 600 void (*pcm_apply_settings)(void);
594 void (*pcm_play_data)(pcm_more_callback_type get_more, 601 void (*pcm_play_data)(pcm_play_callback_type get_more,
595 unsigned char* start, size_t size); 602 unsigned char* start, size_t size);
596 void (*pcm_play_stop)(void); 603 void (*pcm_play_stop)(void);
597 void (*pcm_set_frequency)(unsigned int frequency); 604 void (*pcm_set_frequency)(unsigned int frequency);
@@ -610,9 +617,8 @@ struct plugin_api {
610 const unsigned long *rec_freq_sampr; 617 const unsigned long *rec_freq_sampr;
611 void (*pcm_init_recording)(void); 618 void (*pcm_init_recording)(void);
612 void (*pcm_close_recording)(void); 619 void (*pcm_close_recording)(void);
613 void (*pcm_record_data)(pcm_more_callback_type2 more_ready, 620 void (*pcm_record_data)(pcm_rec_callback_type more_ready,
614 void *start, size_t size); 621 void *start, size_t size);
615 void (*pcm_record_more)(void *start, size_t size);
616 void (*pcm_stop_recording)(void); 622 void (*pcm_stop_recording)(void);
617 void (*pcm_calculate_rec_peaks)(int *left, int *right); 623 void (*pcm_calculate_rec_peaks)(int *left, int *right);
618 void (*audio_set_recording_gain)(int left, int right, int type); 624 void (*audio_set_recording_gain)(int left, int right, int type);
@@ -774,7 +780,15 @@ struct plugin_api {
774 unsigned int *audio_thread_id); 780 unsigned int *audio_thread_id);
775 int (*codec_load_file)(const char* codec, struct codec_api *api); 781 int (*codec_load_file)(const char* codec, struct codec_api *api);
776 const char *(*get_codec_filename)(int cod_spec); 782 const char *(*get_codec_filename)(int cod_spec);
783 void ** (*find_array_ptr)(void **arr, void *ptr);
784 int (*remove_array_ptr)(void **arr, void *ptr);
785#if defined(HAVE_RECORDING) && (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN))
786int (*round_value_to_list32)(unsigned long value,
787 const unsigned long list[],
788 int count,
789 bool signd);
777#endif 790#endif
791#endif /* CONFIG_CODEC == SWCODEC */
778 bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname); 792 bool (*get_metadata)(struct mp3entry* id3, int fd, const char* trackname);
779 bool (*mp3info)(struct mp3entry *entry, const char *filename); 793 bool (*mp3info)(struct mp3entry *entry, const char *filename);
780 int (*count_mp3_frames)(int fd, int startpos, int filesize, 794 int (*count_mp3_frames)(int fd, int startpos, int filesize,
@@ -874,28 +888,6 @@ struct plugin_api {
874 const char *appsversion; 888 const char *appsversion;
875 /* new stuff at the end, sort into place next time 889 /* new stuff at the end, sort into place next time
876 the API gets incompatible */ 890 the API gets incompatible */
877
878#ifdef HAVE_LCD_BITMAP
879 bool (*is_diacritic)(const unsigned short char_code, bool *is_rtl);
880#endif
881
882#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && \
883 (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN))
884int (*round_value_to_list32)(unsigned long value,
885 const unsigned long list[],
886 int count,
887 bool signd);
888#endif
889
890#ifdef AUDIOHW_HAVE_EQ
891 int (*sound_enum_hw_eq_band_setting)(unsigned int band,
892 unsigned int band_setting);
893#endif /* AUDIOHW_HAVE_EQ */
894
895#if CONFIG_CODEC == SWCODEC
896 void ** (*find_array_ptr)(void **arr, void *ptr);
897 int (*remove_array_ptr)(void **arr, void *ptr);
898#endif
899}; 891};
900 892
901/* plugin header */ 893/* plugin header */