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_SCHEMES};
00060
00061 typedef gint (* PlaylistFilenameCompareFunc) (const gchar * a, const gchar * b);
00062 typedef gint (* PlaylistTupleCompareFunc) (const Tuple * a, const Tuple * b);
00063
00064 #define AUD_API_NAME PlaylistAPI
00065 #define AUD_API_SYMBOL playlist_api
00066
00067 #ifdef _AUDACIOUS_CORE
00068
00069 #include "api-local-begin.h"
00070 #include "playlist-api.h"
00071 #include "api-local-end.h"
00072
00073
00074 void playlist_init (void);
00075 void playlist_end (void);
00076 void playlist_load_state (void);
00077 void playlist_save_state (void);
00078
00079 void playlist_reformat_titles (void);
00080
00081 InputPlugin * playlist_entry_get_decoder (gint playlist, gint entry);
00082 void playlist_entry_set_tuple (gint playlist, gint entry, Tuple * tuple);
00083
00084 gboolean playlist_entry_is_segmented (gint playlist, gint entry);
00085 gint playlist_entry_get_start_time (gint playlist, gint entry);
00086 gint playlist_entry_get_end_time (gint playlist, gint entry);
00087
00088 gboolean playlist_prev_song (gint playlist);
00089 gboolean playlist_next_song (gint playlist, gboolean repeat);
00090
00091
00092 void save_playlists (void);
00093 void load_playlists (void);
00094
00095 #else
00096
00097 #include <audacious/api-define-begin.h>
00098 #include <audacious/playlist-api.h>
00099 #include <audacious/api-define-end.h>
00100
00101 #include <audacious/api-alias-begin.h>
00102 #include <audacious/playlist-api.h>
00103 #include <audacious/api-alias-end.h>
00104
00105 #endif
00106
00107 #undef AUD_API_NAME
00108 #undef AUD_API_SYMBOL
00109
00110 #endif
00111
00112 #ifdef AUD_API_DECLARE
00113
00114 #define AUD_API_NAME PlaylistAPI
00115 #define AUD_API_SYMBOL playlist_api
00116
00117 #include "api-define-begin.h"
00118 #include "playlist-api.h"
00119 #include "api-define-end.h"
00120
00121 #include "api-declare-begin.h"
00122 #include "playlist-api.h"
00123 #include "api-declare-end.h"
00124
00125 #undef AUD_API_NAME
00126 #undef AUD_API_SYMBOL
00127
00128 #endif