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 <glib.h>
00026 #include <audacious/api.h>
00027 #include <audacious/types.h>
00028 #include <libaudcore/index.h>
00029 #include <libaudcore/tuple.h>
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 enum {
00040 PLAYLIST_UPDATE_SELECTION,
00041 PLAYLIST_UPDATE_METADATA,
00042 PLAYLIST_UPDATE_STRUCTURE,
00043 PLAYLIST_UPDATE_TYPES};
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 #define PlaylistFilenameCompareFunc PlaylistStringCompareFunc
00063 typedef gint (* PlaylistStringCompareFunc) (const gchar * a, const gchar * b);
00064 typedef gint (* 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 gboolean playlist_load (const gchar * filename, gchar * * title,
00077 struct index * * filenames, struct index * * tuples);
00078 gboolean playlist_insert_playlist_raw (gint list, gint at,
00079 const gchar * filename);
00080
00081
00082 void playlist_init (void);
00083 void playlist_end (void);
00084 void playlist_load_state (void);
00085 void playlist_save_state (void);
00086 void playlist_resume (void);
00087
00088 void playlist_reformat_titles (void);
00089 void playlist_trigger_scan (void);
00090
00091 void playlist_entry_insert_batch_raw (gint playlist, gint at,
00092 struct index * filenames, struct index * tuples, struct index * decoders);
00093
00094 gboolean playlist_prev_song (gint playlist);
00095 gboolean playlist_next_song (gint playlist, gboolean repeat);
00096
00097 gint playback_entry_get_position (void);
00098 PluginHandle * playback_entry_get_decoder (void);
00099 Tuple * playback_entry_get_tuple (void);
00100 gchar * playback_entry_get_title (void);
00101 gint playback_entry_get_length (void);
00102
00103 void playback_entry_set_tuple (Tuple * tuple);
00104
00105 gint playback_entry_get_start_time (void);
00106 gint playback_entry_get_end_time (void);
00107
00108
00109 void load_playlists (void);
00110 void save_playlists (gboolean exiting);
00111
00112 #else
00113
00114 #include <audacious/api-define-begin.h>
00115 #include <audacious/playlist-api.h>
00116 #include <audacious/api-define-end.h>
00117
00118 #include <audacious/api-alias-begin.h>
00119 #include <audacious/playlist-api.h>
00120 #include <audacious/api-alias-end.h>
00121
00122 #endif
00123
00124 #undef AUD_API_NAME
00125 #undef AUD_API_SYMBOL
00126
00127 #endif
00128
00129 #ifdef AUD_API_DECLARE
00130
00131 #define AUD_API_NAME PlaylistAPI
00132 #define AUD_API_SYMBOL playlist_api
00133
00134 #include "api-define-begin.h"
00135 #include "playlist-api.h"
00136 #include "api-define-end.h"
00137
00138 #include "api-declare-begin.h"
00139 #include "playlist-api.h"
00140 #include "api-declare-end.h"
00141
00142 #undef AUD_API_NAME
00143 #undef AUD_API_SYMBOL
00144
00145 #endif