Mercurial > audlegacy
annotate audacious/playlist.h @ 1408:8accd819fa5e trunk
[svn] - bump to version 1.1.1
author | nenolod |
---|---|
date | Sat, 15 Jul 2006 16:47:58 -0700 |
parents | 5f09d64c61e2 |
children | 01dcb223833a |
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 | |
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
23 */ | |
24 #ifndef PLAYLIST_H | |
25 #define PLAYLIST_H | |
26 | |
27 #include <glib.h> | |
1230
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
28 #include "libaudacious/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 |
31 typedef enum { | |
32 PLAYLIST_SORT_PATH, | |
33 PLAYLIST_SORT_FILENAME, | |
34 PLAYLIST_SORT_TITLE, | |
1251 | 35 PLAYLIST_SORT_ARTIST, |
0 | 36 PLAYLIST_SORT_DATE |
37 } PlaylistSortType; | |
38 | |
39 typedef enum { | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
40 PLAYLIST_DUPS_PATH, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
41 PLAYLIST_DUPS_FILENAME, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
42 PLAYLIST_DUPS_TITLE |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
43 } PlaylistDupsType; |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
44 |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
45 typedef enum { |
0 | 46 PLAYLIST_FORMAT_UNKNOWN = -1, |
47 PLAYLIST_FORMAT_M3U, | |
48 PLAYLIST_FORMAT_PLS, | |
49 PLAYLIST_FORMAT_COUNT | |
50 } PlaylistFormat; | |
51 | |
52 #define PLAYLIST_ENTRY(x) ((PlaylistEntry*)(x)) | |
53 struct _PlaylistEntry { | |
54 gchar *filename; | |
55 gchar *title; | |
56 gint length; | |
57 gboolean selected; | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
58 InputPlugin *decoder; |
1230
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
59 TitleInput *tuple; /* cached entry tuple, if available */ |
0 | 60 }; |
61 | |
62 typedef struct _PlaylistEntry PlaylistEntry; | |
63 | |
64 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
|
65 const gchar * title, const gint len, |
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
66 InputPlugin * dec); |
0 | 67 void playlist_entry_free(PlaylistEntry * entry); |
68 | |
69 void playlist_init(void); | |
70 void playlist_clear(void); | |
71 void playlist_delete(gboolean crop); | |
72 | |
73 gboolean playlist_add(const gchar * filename); | |
74 gboolean playlist_ins(const gchar * filename, gint pos); | |
75 guint playlist_add_dir(const gchar * dir); | |
76 guint playlist_ins_dir(const gchar * dir, gint pos, gboolean background); | |
77 guint playlist_add_url(const gchar * url); | |
78 guint playlist_ins_url(const gchar * string, gint pos); | |
79 | |
80 void playlist_play(void); | |
81 void playlist_set_info(const gchar * title, gint length, gint rate, | |
82 gint freq, gint nch); | |
83 void playlist_check_pos_current(void); | |
84 void playlist_next(void); | |
85 void playlist_prev(void); | |
86 void playlist_queue(void); | |
87 void playlist_queue_position(guint pos); | |
88 void playlist_queue_remove(guint pos); | |
89 gint playlist_queue_get_length(void); | |
90 gboolean playlist_is_position_queued(guint pos); | |
91 void playlist_clear_queue(void); | |
92 gint playlist_get_queue_position(PlaylistEntry * entry); | |
984 | 93 gint playlist_get_queue_position_number(guint pos); |
94 gint playlist_get_queue_qposition_number(guint pos); | |
0 | 95 void playlist_eof_reached(void); |
96 void playlist_set_position(guint pos); | |
97 gint playlist_get_length(void); | |
98 gint playlist_get_length_nolock(void); | |
99 gint playlist_get_position(void); | |
100 gint playlist_get_position_nolock(void); | |
101 gchar *playlist_get_info_text(void); | |
102 gint playlist_get_current_length(void); | |
103 | |
104 gboolean playlist_save(const gchar * filename, PlaylistFormat format); | |
105 gboolean playlist_load(const gchar * filename); | |
106 | |
107 GList *playlist_get(void); | |
108 | |
109 void playlist_start_get_info_thread(void); | |
110 void playlist_stop_get_info_thread(); | |
111 void playlist_start_get_info_scan(void); | |
112 | |
113 void playlist_sort(PlaylistSortType type); | |
114 void playlist_sort_selected(PlaylistSortType type); | |
115 | |
116 void playlist_reverse(void); | |
117 void playlist_random(void); | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
118 void playlist_remove_duplicates(PlaylistDupsType); |
0 | 119 void playlist_remove_dead_files(void); |
120 | |
121 void playlist_fileinfo_current(void); | |
122 void playlist_fileinfo(guint pos); | |
123 | |
124 void playlist_delete_index(guint pos); | |
125 void playlist_delete_filenames(GList * filenames); | |
126 | |
398
f908bcd87c3d
[svn] Generate cache content on demand if it was not previously there.
nenolod
parents:
356
diff
changeset
|
127 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
|
128 |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
129 /* XXX this is for reverse compatibility --nenolod */ |
0 | 130 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
|
131 |
0 | 132 gchar *playlist_get_filename(guint pos); |
133 gchar *playlist_get_songtitle(guint pos); | |
1235 | 134 TitleInput *playlist_get_tuple(guint pos); |
0 | 135 gint playlist_get_songtime(guint pos); |
136 | |
137 GList *playlist_get_selected(void); | |
138 GList *playlist_get_selected_list(void); | |
139 int playlist_get_num_selected(void); | |
140 | |
141 void playlist_get_total_time(gulong * total_time, gulong * selection_time, | |
142 gboolean * total_more, | |
143 gboolean * selection_more); | |
144 | |
145 void playlist_select_all(gboolean set); | |
146 void playlist_select_range(gint min, gint max, gboolean sel); | |
147 void playlist_select_invert_all(void); | |
148 gboolean playlist_select_invert(guint pos); | |
149 | |
150 gboolean playlist_read_info_selection(void); | |
151 void playlist_read_info(guint pos); | |
152 | |
153 void playlist_set_shuffle(gboolean shuffle); | |
154 | |
155 void playlist_clear_selected(void); | |
156 | |
157 GList *get_playlist_nth(guint); | |
158 gboolean playlist_set_current_name(const gchar * filename); | |
159 const gchar *playlist_get_current_name(void); | |
160 void playlist_new(void); | |
161 | |
162 PlaylistFormat playlist_format_get_from_name(const gchar * filename); | |
163 gboolean is_playlist_name(const gchar * filename); | |
164 | |
165 #define PLAYLIST_LOCK() G_LOCK(playlist) | |
166 #define PLAYLIST_UNLOCK() G_UNLOCK(playlist) | |
167 | |
168 G_LOCK_EXTERN(playlist); | |
169 | |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
170 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
|
171 |
0 | 172 #endif |