1 /* 2 This file is part of Deadbeef Player source code 3 http://deadbeef.sourceforge.net 4 5 plugin management 6 7 Copyright (C) 2009-2013 Alexey Yakovenko 8 9 This software is provided 'as-is', without any express or implied 10 warranty. In no event will the authors be held liable for any damages 11 arising from the use of this software. 12 13 Permission is granted to anyone to use this software for any purpose, 14 including commercial applications, and to alter it and redistribute it 15 freely, subject to the following restrictions: 16 17 1. The origin of this software must not be misrepresented; you must not 18 claim that you wrote the original software. If you use this software 19 in a product, an acknowledgment in the product documentation would be 20 appreciated but is not required. 21 2. Altered source versions must be plainly marked as such, and must not be 22 misrepresented as being the original software. 23 3. This notice may not be removed or altered from any source distribution. 24 25 Alexey Yakovenko waker@users.sourceforge.net 26 */ 27 #ifndef __PLUGINS_H 28 #define __PLUGINS_H 29 #include "deadbeef.h" 30 31 extern DB_functions_t *deadbeef; 32 33 struct playItem_s; 34 35 int 36 plug_load_all (void); 37 38 void 39 plug_unload_all (void); 40 41 void 42 plug_connect_all (void); 43 44 void 45 plug_disconnect_all (void); 46 47 void 48 plug_cleanup (void); 49 50 void 51 plug_ev_subscribe (DB_plugin_t *plugin, int ev, DB_callback_t callback, uintptr_t data); 52 53 void 54 plug_ev_unsubscribe (DB_plugin_t *plugin, int ev, DB_callback_t callback, uintptr_t data); 55 56 void 57 plug_md5 (uint8_t sig[16], const char *in, int len); 58 59 void 60 plug_md5_to_str (char *str, const uint8_t sig[16]); 61 62 float 63 plug_playback_get_pos (void); 64 65 void 66 plug_playback_set_pos (float pos); 67 68 struct DB_plugin_s ** 69 plug_get_list (void); 70 71 struct DB_decoder_s ** 72 plug_get_decoder_list (void); 73 74 struct DB_output_s ** 75 plug_get_output_list (void); 76 77 struct DB_vfs_s ** 78 plug_get_vfs_list (void); 79 80 struct DB_dsp_s ** 81 plug_get_dsp_list (void); 82 83 struct DB_playlist_s ** 84 plug_get_playlist_list (void); 85 86 void 87 plug_volume_set_db (float db); 88 89 void 90 plug_volume_set_amp (float amp); 91 92 const char * 93 plug_get_config_dir (void); 94 const char * 95 plug_get_prefix (void); 96 const char * 97 plug_get_doc_dir (void); 98 const char * 99 plug_get_plugin_dir (void); 100 const char * 101 plug_get_pixmap_dir (void); 102 103 const char * 104 plug_get_system_dir (int dir_id); 105 106 int 107 plug_activate (DB_plugin_t *plug, int activate); 108 109 DB_output_t * 110 plug_get_output (void); 111 112 void 113 plug_reinit_sound (void); 114 115 int 116 plug_select_output (void); 117 118 void 119 plug_set_output (DB_output_t *out); 120 121 const char * 122 plug_get_decoder_id (const char *id); 123 124 void 125 plug_remove_decoder_id (const char *id); 126 127 void 128 plug_free_decoder_ids (void); 129 130 DB_decoder_t * 131 plug_get_decoder_for_id (const char *id); 132 133 DB_plugin_t * 134 plug_get_for_id (const char *id); 135 136 int 137 plug_is_local_file (const char *fname); 138 139 const char ** 140 plug_get_gui_names (void); 141 142 void 143 plug_event_call (ddb_event_t *ev); 144 145 void 146 background_job_increment (void); 147 148 void 149 background_job_decrement (void); 150 151 int 152 have_background_jobs (void); 153 154 void 155 action_set_playlist (ddb_playlist_t *plt); 156 157 ddb_playlist_t * 158 action_get_playlist (void); 159 160 #endif // __PLUGINS_H 161