00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AUDACIOUS_PLAYLIST_H
00023 #define AUDACIOUS_PLAYLIST_H
00024
00025 #include <stdint.h>
00026
00027 #include <audacious/api.h>
00028 #include <audacious/types.h>
00029 #include <libaudcore/index.h>
00030 #include <libaudcore/tuple.h>
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 enum {
00041 PLAYLIST_UPDATE_SELECTION = 1,
00042 PLAYLIST_UPDATE_METADATA,
00043 PLAYLIST_UPDATE_STRUCTURE};
00044
00045
00046
00047
00048
00049
00050
00051 enum {
00052 PLAYLIST_SORT_PATH,
00053 PLAYLIST_SORT_FILENAME,
00054 PLAYLIST_SORT_TITLE,
00055 PLAYLIST_SORT_ALBUM,
00056 PLAYLIST_SORT_ARTIST,
00057 PLAYLIST_SORT_DATE,
00058 PLAYLIST_SORT_TRACK,
00059 PLAYLIST_SORT_FORMATTED_TITLE,
00060 PLAYLIST_SORT_SCHEMES};
00061
00062 typedef bool_t (* PlaylistFilterFunc) (const char * filename, void * user);
00063 typedef int (* PlaylistStringCompareFunc) (const char * a, const char * b);
00064 typedef int (* PlaylistTupleCompareFunc) (const Tuple * a, const Tuple * b);
00065
00066 #define AUD_API_NAME PlaylistAPI
00067 #define AUD_API_SYMBOL playlist_api
00068
00069 #ifdef _AUDACIOUS_CORE
00070
00071 #include "api-local-begin.h"
00072 #include "playlist-api.h"
00073 #include "api-local-end.h"
00074
00075
00076 bool_t playlist_load (const char * filename, char * * title,
00077 Index * * filenames, Index * * tuples);
00078 bool_t playlist_insert_playlist_raw (int list, int at,
00079 const char * filename);
00080
00081
00082 void playlist_init (void);
00083 void playlist_end (void);
00084
00085 void playlist_insert_with_id (int at, int id);
00086 void playlist_set_modified (int playlist, bool_t modified);
00087 bool_t playlist_get_modified (int playlist);
00088
00089 void playlist_load_state (void);
00090 void playlist_save_state (void);
00091 void playlist_resume (void);
00092
00093 void playlist_reformat_titles (void);
00094 void playlist_trigger_scan (void);
00095
00096 void playlist_entry_insert_batch_raw (int playlist, int at,
00097 Index * filenames, Index * tuples, Index * decoders);
00098
00099 bool_t playlist_prev_song (int playlist);
00100 bool_t playlist_next_song (int playlist, bool_t repeat);
00101
00102 int playback_entry_get_position (void);
00103 PluginHandle * playback_entry_get_decoder (void);
00104 Tuple * playback_entry_get_tuple (void);
00105 char * playback_entry_get_title (void);
00106 int playback_entry_get_length (void);
00107
00108 void playback_entry_set_tuple (Tuple * tuple);
00109
00110 int playback_entry_get_start_time (void);
00111 int playback_entry_get_end_time (void);
00112
00113
00114 void load_playlists (void);
00115 void save_playlists (bool_t exiting);
00116
00117 #else
00118
00119 #include <audacious/api-define-begin.h>
00120 #include <audacious/playlist-api.h>
00121 #include <audacious/api-define-end.h>
00122
00123 #include <audacious/api-alias-begin.h>
00124 #include <audacious/playlist-api.h>
00125 #include <audacious/api-alias-end.h>
00126
00127 #endif
00128
00129 #undef AUD_API_NAME
00130 #undef AUD_API_SYMBOL
00131
00132 #endif
00133
00134 #ifdef AUD_API_DECLARE
00135
00136 #define AUD_API_NAME PlaylistAPI
00137 #define AUD_API_SYMBOL playlist_api
00138
00139 #include "api-define-begin.h"
00140 #include "playlist-api.h"
00141 #include "api-define-end.h"
00142
00143 #include "api-declare-begin.h"
00144 #include "playlist-api.h"
00145 #include "api-declare-end.h"
00146
00147 #undef AUD_API_NAME
00148 #undef AUD_API_SYMBOL
00149
00150 #endif