Mercurial > audlegacy
annotate audacious/playlist.h @ 1874:3a428cb2aec9 trunk
[svn] - make things friendly to Objective Make
author | nenolod |
---|---|
date | Sat, 14 Oct 2006 11:46:36 -0700 |
parents | f157e22c70c4 |
children | e074c9ba7072 |
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 |
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
2 * Copyright (C) 2005-2006 William Pitcock, Tony Vroon, George Averill, |
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 | 6 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, |
7 * Thomas Nilsson and 4Front Technologies | |
8 * Copyright (C) 1999-2003 Haavard Kvaalen | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
1459 | 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 23 */ |
24 #ifndef PLAYLIST_H | |
25 #define PLAYLIST_H | |
26 | |
27 #include <glib.h> | |
1736
fed902161f2a
[svn] - use audacious/titlestring.h instead of libaudacious/titlestring.h
nenolod
parents:
1584
diff
changeset
|
28 #include "audacious/titlestring.h" |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
29 #include "input.h" |
0 | 30 |
1738 | 31 G_BEGIN_DECLS |
32 | |
0 | 33 typedef enum { |
34 PLAYLIST_SORT_PATH, | |
35 PLAYLIST_SORT_FILENAME, | |
36 PLAYLIST_SORT_TITLE, | |
1251 | 37 PLAYLIST_SORT_ARTIST, |
1415 | 38 PLAYLIST_SORT_DATE, |
1430
740c08db08d9
[svn] via Christian Birchinger <joker -at- netswarm.net>:
nenolod
parents:
1415
diff
changeset
|
39 PLAYLIST_SORT_TRACK, |
740c08db08d9
[svn] via Christian Birchinger <joker -at- netswarm.net>:
nenolod
parents:
1415
diff
changeset
|
40 PLAYLIST_SORT_PLAYLIST |
0 | 41 } PlaylistSortType; |
42 | |
43 typedef enum { | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
44 PLAYLIST_DUPS_PATH, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
45 PLAYLIST_DUPS_FILENAME, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
46 PLAYLIST_DUPS_TITLE |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
47 } PlaylistDupsType; |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
48 |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
49 typedef enum { |
0 | 50 PLAYLIST_FORMAT_UNKNOWN = -1, |
51 PLAYLIST_FORMAT_M3U, | |
52 PLAYLIST_FORMAT_PLS, | |
53 PLAYLIST_FORMAT_COUNT | |
54 } PlaylistFormat; | |
55 | |
56 #define PLAYLIST_ENTRY(x) ((PlaylistEntry*)(x)) | |
57 struct _PlaylistEntry { | |
58 gchar *filename; | |
59 gchar *title; | |
60 gint length; | |
61 gboolean selected; | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
62 InputPlugin *decoder; |
1230
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
63 TitleInput *tuple; /* cached entry tuple, if available */ |
0 | 64 }; |
65 | |
66 typedef struct _PlaylistEntry PlaylistEntry; | |
67 | |
68 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
|
69 const gchar * title, const gint len, |
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
70 InputPlugin * dec); |
0 | 71 void playlist_entry_free(PlaylistEntry * entry); |
72 | |
73 void playlist_init(void); | |
74 void playlist_clear(void); | |
75 void playlist_delete(gboolean crop); | |
76 | |
77 gboolean playlist_add(const gchar * filename); | |
78 gboolean playlist_ins(const gchar * filename, gint pos); | |
79 guint playlist_add_dir(const gchar * dir); | |
80 guint playlist_ins_dir(const gchar * dir, gint pos, gboolean background); | |
81 guint playlist_add_url(const gchar * url); | |
82 guint playlist_ins_url(const gchar * string, gint pos); | |
83 | |
84 void playlist_play(void); | |
85 void playlist_set_info(const gchar * title, gint length, gint rate, | |
86 gint freq, gint nch); | |
87 void playlist_check_pos_current(void); | |
88 void playlist_next(void); | |
89 void playlist_prev(void); | |
90 void playlist_queue(void); | |
91 void playlist_queue_position(guint pos); | |
92 void playlist_queue_remove(guint pos); | |
93 gint playlist_queue_get_length(void); | |
94 gboolean playlist_is_position_queued(guint pos); | |
95 void playlist_clear_queue(void); | |
96 gint playlist_get_queue_position(PlaylistEntry * entry); | |
984 | 97 gint playlist_get_queue_position_number(guint pos); |
98 gint playlist_get_queue_qposition_number(guint pos); | |
0 | 99 void playlist_eof_reached(void); |
100 void playlist_set_position(guint pos); | |
101 gint playlist_get_length(void); | |
102 gint playlist_get_length_nolock(void); | |
103 gint playlist_get_position(void); | |
104 gint playlist_get_position_nolock(void); | |
105 gchar *playlist_get_info_text(void); | |
106 gint playlist_get_current_length(void); | |
107 | |
1553 | 108 gboolean playlist_save(const gchar * filename); |
0 | 109 gboolean playlist_load(const gchar * filename); |
110 | |
111 GList *playlist_get(void); | |
112 | |
113 void playlist_start_get_info_thread(void); | |
114 void playlist_stop_get_info_thread(); | |
115 void playlist_start_get_info_scan(void); | |
116 | |
117 void playlist_sort(PlaylistSortType type); | |
118 void playlist_sort_selected(PlaylistSortType type); | |
119 | |
120 void playlist_reverse(void); | |
121 void playlist_random(void); | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
122 void playlist_remove_duplicates(PlaylistDupsType); |
0 | 123 void playlist_remove_dead_files(void); |
124 | |
125 void playlist_fileinfo_current(void); | |
126 void playlist_fileinfo(guint pos); | |
127 | |
128 void playlist_delete_index(guint pos); | |
129 void playlist_delete_filenames(GList * filenames); | |
130 | |
398
f908bcd87c3d
[svn] Generate cache content on demand if it was not previously there.
nenolod
parents:
356
diff
changeset
|
131 PlaylistEntry *playlist_get_entry_to_play(); |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
132 |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
133 /* XXX this is for reverse compatibility --nenolod */ |
0 | 134 const gchar *playlist_get_filename_to_play(); |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
135 |
0 | 136 gchar *playlist_get_filename(guint pos); |
137 gchar *playlist_get_songtitle(guint pos); | |
1235 | 138 TitleInput *playlist_get_tuple(guint pos); |
0 | 139 gint playlist_get_songtime(guint pos); |
140 | |
141 GList *playlist_get_selected(void); | |
142 GList *playlist_get_selected_list(void); | |
143 int playlist_get_num_selected(void); | |
144 | |
145 void playlist_get_total_time(gulong * total_time, gulong * selection_time, | |
146 gboolean * total_more, | |
147 gboolean * selection_more); | |
148 | |
149 void playlist_select_all(gboolean set); | |
150 void playlist_select_range(gint min, gint max, gboolean sel); | |
151 void playlist_select_invert_all(void); | |
152 gboolean playlist_select_invert(guint pos); | |
153 | |
154 gboolean playlist_read_info_selection(void); | |
155 void playlist_read_info(guint pos); | |
156 | |
157 void playlist_set_shuffle(gboolean shuffle); | |
158 | |
159 void playlist_clear_selected(void); | |
160 | |
161 GList *get_playlist_nth(guint); | |
162 gboolean playlist_set_current_name(const gchar * filename); | |
163 const gchar *playlist_get_current_name(void); | |
164 void playlist_new(void); | |
165 | |
166 PlaylistFormat playlist_format_get_from_name(const gchar * filename); | |
167 gboolean is_playlist_name(const gchar * filename); | |
168 | |
169 #define PLAYLIST_LOCK() G_LOCK(playlist) | |
170 #define PLAYLIST_UNLOCK() G_UNLOCK(playlist) | |
171 | |
172 G_LOCK_EXTERN(playlist); | |
173 | |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
174 extern PlaylistEntry *playlist_position; |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
175 |
1554 | 176 extern void playlist_load_ins_file(const gchar * filename, |
177 const gchar * playlist_name, gint pos, | |
178 const gchar * title, gint len); | |
179 | |
1584 | 180 extern void playlist_load_ins_file_tuple(const gchar * filename_p, |
181 const gchar * playlist_name, gint pos, | |
182 TitleInput *tuple); | |
183 | |
1738 | 184 G_END_DECLS |
1584 | 185 |
0 | 186 #endif |