annotate audacious/playlist.h @ 2127:63af5b9c5026 trunk

[svn] - add playlist_select_playlist() to select a literal playlist - add xmms_remote_playlist_enqueue_to_temp() - add controlsocket handler for enqueue to temp - add commandline parsing for enqueue to temp
author nenolod
date Fri, 15 Dec 2006 08:23:51 -0800
parents 97e2cbd87df0
children 0d845907c0b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1230
a5d5f404b933 [svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents: 984
diff changeset
1 /* Audacious - Cross-platform multimedia player
2077
e074c9ba7072 [svn] - cleanup the declaration of PlaylistEntry, and add some initial structure for migrating to multiple playlists.
nenolod
parents: 1738
diff changeset
2 * Copyright (C) 2005-2007 William Pitcock, Tony Vroon, George Averill,
1230
a5d5f404b933 [svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents: 984
diff changeset
3 * Giacomo Lozito, Derek Pomery and Yoshiki Yazawa.
a5d5f404b933 [svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents: 984
diff changeset
4 *
a5d5f404b933 [svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents: 984
diff changeset
5 * XMMS - Cross-platform multimedia player
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * Thomas Nilsson and 4Front Technologies
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 * Copyright (C) 1999-2003 Haavard Kvaalen
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
2105
f18a5b617c34 [svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents: 2098
diff changeset
12 * the Free Software Foundation; under version 2 of the License.
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 #ifndef PLAYLIST_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 #define PLAYLIST_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 #include <glib.h>
1736
fed902161f2a [svn] - use audacious/titlestring.h instead of libaudacious/titlestring.h
nenolod
parents: 1584
diff changeset
27 #include "audacious/titlestring.h"
355
1c701dfe5098 [svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents: 0
diff changeset
28 #include "input.h"
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29
1738
f157e22c70c4 [svn] - C++ friendliness
nenolod
parents: 1736
diff changeset
30 G_BEGIN_DECLS
f157e22c70c4 [svn] - C++ friendliness
nenolod
parents: 1736
diff changeset
31
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 typedef enum {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 PLAYLIST_SORT_PATH,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 PLAYLIST_SORT_FILENAME,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 PLAYLIST_SORT_TITLE,
1251
5f09d64c61e2 [svn] - sort by Artist
nenolod
parents: 1235
diff changeset
36 PLAYLIST_SORT_ARTIST,
1415
01dcb223833a [svn] - sort by track number
nenolod
parents: 1251
diff changeset
37 PLAYLIST_SORT_DATE,
1430
740c08db08d9 [svn] via Christian Birchinger <joker -at- netswarm.net>:
nenolod
parents: 1415
diff changeset
38 PLAYLIST_SORT_TRACK,
740c08db08d9 [svn] via Christian Birchinger <joker -at- netswarm.net>:
nenolod
parents: 1415
diff changeset
39 PLAYLIST_SORT_PLAYLIST
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 } PlaylistSortType;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 typedef enum {
852
bcff46a2558d [svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents: 840
diff changeset
43 PLAYLIST_DUPS_PATH,
bcff46a2558d [svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents: 840
diff changeset
44 PLAYLIST_DUPS_FILENAME,
bcff46a2558d [svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents: 840
diff changeset
45 PLAYLIST_DUPS_TITLE
bcff46a2558d [svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents: 840
diff changeset
46 } PlaylistDupsType;
bcff46a2558d [svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents: 840
diff changeset
47
bcff46a2558d [svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents: 840
diff changeset
48 typedef enum {
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 PLAYLIST_FORMAT_UNKNOWN = -1,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 PLAYLIST_FORMAT_M3U,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 PLAYLIST_FORMAT_PLS,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 PLAYLIST_FORMAT_COUNT
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 } PlaylistFormat;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 #define PLAYLIST_ENTRY(x) ((PlaylistEntry*)(x))
2077
e074c9ba7072 [svn] - cleanup the declaration of PlaylistEntry, and add some initial structure for migrating to multiple playlists.
nenolod
parents: 1738
diff changeset
56 typedef struct _PlaylistEntry {
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 gchar *filename;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 gchar *title;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 gint length;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 gboolean selected;
355
1c701dfe5098 [svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents: 0
diff changeset
61 InputPlugin *decoder;
1230
a5d5f404b933 [svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents: 984
diff changeset
62 TitleInput *tuple; /* cached entry tuple, if available */
2077
e074c9ba7072 [svn] - cleanup the declaration of PlaylistEntry, and add some initial structure for migrating to multiple playlists.
nenolod
parents: 1738
diff changeset
63 } PlaylistEntry;
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64
2077
e074c9ba7072 [svn] - cleanup the declaration of PlaylistEntry, and add some initial structure for migrating to multiple playlists.
nenolod
parents: 1738
diff changeset
65 #define PLAYLIST(x) ((Playlist *)(x))
e074c9ba7072 [svn] - cleanup the declaration of PlaylistEntry, and add some initial structure for migrating to multiple playlists.
nenolod
parents: 1738
diff changeset
66 typedef struct _Playlist {
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
67 gchar *title;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
68 gchar *filename;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
69 gint length;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
70 GList *entries;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
71 GList *queue;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
72 GList *shuffle;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
73 PlaylistEntry *position; /* bleah */
2085
472be23d11a1 [svn] - finish conversion to new API.
nenolod
parents: 2084
diff changeset
74 gulong pl_total_time;
472be23d11a1 [svn] - finish conversion to new API.
nenolod
parents: 2084
diff changeset
75 gulong pl_selection_time;
472be23d11a1 [svn] - finish conversion to new API.
nenolod
parents: 2084
diff changeset
76 gboolean pl_total_more;
472be23d11a1 [svn] - finish conversion to new API.
nenolod
parents: 2084
diff changeset
77 gboolean pl_selection_more;
2077
e074c9ba7072 [svn] - cleanup the declaration of PlaylistEntry, and add some initial structure for migrating to multiple playlists.
nenolod
parents: 1738
diff changeset
78 } Playlist;
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
80 typedef enum {
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
81 PLAYLIST_ASSOC_LINEAR,
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
82 PLAYLIST_ASSOC_QUEUE,
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
83 PLAYLIST_ASSOC_SHUFFLE
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
84 } PlaylistAssociation;
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
85
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 PlaylistEntry *playlist_entry_new(const gchar * filename,
355
1c701dfe5098 [svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents: 0
diff changeset
87 const gchar * title, const gint len,
1c701dfe5098 [svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents: 0
diff changeset
88 InputPlugin * dec);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89 void playlist_entry_free(PlaylistEntry * entry);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
91 void playlist_entry_associate(Playlist * playlist, PlaylistEntry * entry,
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
92 PlaylistAssociation assoc);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
93
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
94 void playlist_entry_associate_pos(Playlist * playlist, PlaylistEntry * entry,
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
95 PlaylistAssociation assoc, gint pos);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
96
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
97 void playlist_init(void);
2120
1d67cf383e32 [svn] - dynamically allocate the playlist at startup and fix some lingering improper uses of playlist_get()
nenolod
parents: 2105
diff changeset
98 void playlist_add_playlist(Playlist *);
1d67cf383e32 [svn] - dynamically allocate the playlist at startup and fix some lingering improper uses of playlist_get()
nenolod
parents: 2105
diff changeset
99 void playlist_remove_playlist(Playlist *);
2127
63af5b9c5026 [svn] - add playlist_select_playlist() to select a literal playlist
nenolod
parents: 2123
diff changeset
100
63af5b9c5026 [svn] - add playlist_select_playlist() to select a literal playlist
nenolod
parents: 2123
diff changeset
101 void playlist_select_playlist(Playlist *);
2123
97e2cbd87df0 [svn] - add playlist_select_next(), playlist_select_prev()
nenolod
parents: 2120
diff changeset
102 void playlist_select_next(void);
97e2cbd87df0 [svn] - add playlist_select_next(), playlist_select_prev()
nenolod
parents: 2120
diff changeset
103 void playlist_select_prev(void);
2120
1d67cf383e32 [svn] - dynamically allocate the playlist at startup and fix some lingering improper uses of playlist_get()
nenolod
parents: 2105
diff changeset
104
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
105 void playlist_clear(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
106 void playlist_delete(Playlist *playlist, gboolean crop);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
107
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
108 gboolean playlist_add(Playlist *playlist, const gchar * filename);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
109 gboolean playlist_ins(Playlist *playlist, const gchar * filename, gint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
110 guint playlist_add_dir(Playlist *playlist, const gchar * dir);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
111 guint playlist_ins_dir(Playlist *playlist, const gchar * dir, gint pos, gboolean background);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
112 guint playlist_add_url(Playlist *playlist, const gchar * url);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
113 guint playlist_ins_url(Playlist *playlist, const gchar * string, gint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
114
2083
0d37e05dbad3 [svn] - more updates
nenolod
parents: 2080
diff changeset
115 void playlist_set_info(Playlist *playlist, const gchar * title, gint length, gint rate,
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
116 gint freq, gint nch);
2098
425963ded156 [svn] - provide the old ABI for plugins (intermediate layer).
nenolod
parents: 2085
diff changeset
117 void playlist_set_info_old_abi(const gchar * title, gint length, gint rate,
425963ded156 [svn] - provide the old ABI for plugins (intermediate layer).
nenolod
parents: 2085
diff changeset
118 gint freq, gint nch);
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
119 void playlist_check_pos_current(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
120 void playlist_next(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
121 void playlist_prev(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
122 void playlist_queue(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
123 void playlist_queue_position(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
124 void playlist_queue_remove(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
125 gint playlist_queue_get_length(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
126 gboolean playlist_is_position_queued(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
127 void playlist_clear_queue(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
128 gint playlist_get_queue_position(Playlist *playlist, PlaylistEntry * entry);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
129 gint playlist_get_queue_position_number(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
130 gint playlist_get_queue_qposition_number(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
131 void playlist_eof_reached(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
132 void playlist_set_position(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
133 gint playlist_get_length(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
134 gint playlist_get_length_nolock(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
135 gint playlist_get_position(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
136 gint playlist_get_position_nolock(Playlist *playlist);
2084
4caeed450f2f [svn] - much closer now
nenolod
parents: 2083
diff changeset
137 gchar *playlist_get_info_text(Playlist *playlist);
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
138 gint playlist_get_current_length(Playlist *playlist);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
139
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
140 gboolean playlist_save(Playlist *playlist, const gchar * filename);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
141 gboolean playlist_load(Playlist *playlist, const gchar * filename);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
142
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
143 /* returns the current selected *linear* playlist */
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
144 GList *playlist_get(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
145
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
146 void playlist_start_get_info_thread(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
147 void playlist_stop_get_info_thread();
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
148 void playlist_start_get_info_scan(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
149
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
150 void playlist_sort(Playlist *playlist, PlaylistSortType type);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
151 void playlist_sort_selected(Playlist *playlist, PlaylistSortType type);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
152
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
153 void playlist_reverse(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
154 void playlist_random(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
155 void playlist_remove_duplicates(Playlist *playlist, PlaylistDupsType);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
156 void playlist_remove_dead_files(Playlist *playlist);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
157
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
158 void playlist_fileinfo_current(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
159 void playlist_fileinfo(Playlist *playlist, guint pos);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
160
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
161 void playlist_delete_index(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
162 void playlist_delete_filenames(Playlist *playlist, GList * filenames);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
163
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
164 PlaylistEntry *playlist_get_entry_to_play(Playlist *playlist);
356
99928e1275a1 [svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents: 355
diff changeset
165
99928e1275a1 [svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents: 355
diff changeset
166 /* XXX this is for reverse compatibility --nenolod */
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
167 const gchar *playlist_get_filename_to_play(Playlist *playlist);
356
99928e1275a1 [svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents: 355
diff changeset
168
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
169 gchar *playlist_get_filename(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
170 gchar *playlist_get_songtitle(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
171 TitleInput *playlist_get_tuple(Playlist *playlist, guint pos);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
172 gint playlist_get_songtime(Playlist *playlist, guint pos);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
173
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
174 GList *playlist_get_selected(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
175 GList *playlist_get_selected_list(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
176 int playlist_get_num_selected(Playlist *playlist);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
177
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
178 void playlist_get_total_time(Playlist *playlist, gulong * total_time, gulong * selection_time,
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
179 gboolean * total_more,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
180 gboolean * selection_more);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
181
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
182 void playlist_select_all(Playlist *playlist, gboolean set);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
183 void playlist_select_range(Playlist *playlist, gint min, gint max, gboolean sel);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
184 void playlist_select_invert_all(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
185 gboolean playlist_select_invert(Playlist *playlist, guint pos);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
186
2085
472be23d11a1 [svn] - finish conversion to new API.
nenolod
parents: 2084
diff changeset
187 gboolean playlist_read_info_selection(Playlist *playlist);
472be23d11a1 [svn] - finish conversion to new API.
nenolod
parents: 2084
diff changeset
188 void playlist_read_info(Playlist *playlist, guint pos);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
189
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
190 void playlist_set_shuffle(gboolean shuffle);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
191
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
192 void playlist_clear_selected(Playlist *playlist);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
193
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
194 GList *get_playlist_nth(Playlist *playlist, guint);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
195 gboolean playlist_set_current_name(Playlist *playlist, const gchar * filename);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
196 const gchar *playlist_get_current_name(Playlist *playlist);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
197 Playlist *playlist_new(void);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
198
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
199 PlaylistFormat playlist_format_get_from_name(const gchar * filename);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
200 gboolean is_playlist_name(const gchar * filename);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
201
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
202 #define PLAYLIST_LOCK() G_LOCK(playlists)
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
203 #define PLAYLIST_UNLOCK() G_UNLOCK(playlists)
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
204
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
205 G_LOCK_EXTERN(playlists);
356
99928e1275a1 [svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents: 355
diff changeset
206
2083
0d37e05dbad3 [svn] - more updates
nenolod
parents: 2080
diff changeset
207 extern void playlist_load_ins_file(Playlist *playlist, const gchar * filename,
1554
51c1bf500d3f [svn] - some experimental shit
nenolod
parents: 1553
diff changeset
208 const gchar * playlist_name, gint pos,
51c1bf500d3f [svn] - some experimental shit
nenolod
parents: 1553
diff changeset
209 const gchar * title, gint len);
51c1bf500d3f [svn] - some experimental shit
nenolod
parents: 1553
diff changeset
210
2083
0d37e05dbad3 [svn] - more updates
nenolod
parents: 2080
diff changeset
211 extern void playlist_load_ins_file_tuple(Playlist *playlist, const gchar * filename_p,
1584
2229b67f1b89 [svn] - xspf stores all meta data in tuples now.
yaz
parents: 1554
diff changeset
212 const gchar * playlist_name, gint pos,
2229b67f1b89 [svn] - xspf stores all meta data in tuples now.
yaz
parents: 1554
diff changeset
213 TitleInput *tuple);
2229b67f1b89 [svn] - xspf stores all meta data in tuples now.
yaz
parents: 1554
diff changeset
214
2080
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
215 Playlist *playlist_get_active(void);
df6cf9cb531e [svn] - this commit breaks the API. I'm not done here, but hopefully the new API is
nenolod
parents: 2078
diff changeset
216
1738
f157e22c70c4 [svn] - C++ friendliness
nenolod
parents: 1736
diff changeset
217 G_END_DECLS
1584
2229b67f1b89 [svn] - xspf stores all meta data in tuples now.
yaz
parents: 1554
diff changeset
218
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
219 #endif