Audacious
$Id:Doxyfile42802007-03-2104:39:00Znenolod$
Main Page
Related Pages
Classes
Files
File List
File Members
src
audacious
playlist.h
Go to the documentation of this file.
1
/*
2
* playlist.h
3
* Copyright 2010 John Lindgren
4
*
5
* This file is part of Audacious.
6
*
7
* Audacious is free software: you can redistribute it and/or modify it under
8
* the terms of the GNU General Public License as published by the Free Software
9
* Foundation, version 2 or version 3 of the License.
10
*
11
* Audacious is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along with
16
* Audacious. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* The Audacious team does not consider modular code linking to Audacious or
19
* using our public API to be a derived work.
20
*/
21
22
#ifndef AUDACIOUS_PLAYLIST_H
23
#define AUDACIOUS_PLAYLIST_H
24
25
#include <stdint.h>
26
27
#include <
audacious/api.h
>
28
#include <
audacious/types.h
>
29
#include <
libaudcore/index.h
>
30
#include <
libaudcore/tuple.h
>
31
32
/* The values which can be passed (packed into a pointer) to the "playlist
33
* update" hook. PLAYLIST_UPDATE_SELECTION means that entries have been
34
* selected or unselected, or that entries have been added to or removed from
35
* the queue. PLAYLIST_UPDATE_METADATA means that new metadata has been read
36
* for some entries, or that the title or filename of a playlist has changed,
37
* and implies PLAYLIST_UPDATE_SELECTION. PLAYLIST_UPDATE_STRUCTURE covers any
38
* change not listed under the other types, and implies both
39
* PLAYLIST_UPDATE_SELECTION and PLAYLIST_UPDATE_METADATA. */
40
enum
{
41
PLAYLIST_UPDATE_SELECTION
= 1,
42
PLAYLIST_UPDATE_METADATA
,
43
PLAYLIST_UPDATE_STRUCTURE
};
44
45
/* The values which can be passed to playlist_sort_by_scheme(),
46
* playlist_sort_selected_by_scheme(), and
47
* playlist_remove_duplicates_by_scheme(). PLAYLIST_SORT_PATH means the entire
48
* URI of a song file; PLAYLIST_SORT_FILENAME means the portion after the last
49
* "/" (forward slash). PLAYLIST_SORT_DATE means the song's release date (not
50
* the file's modification time). */
51
enum
{
52
PLAYLIST_SORT_PATH
,
53
PLAYLIST_SORT_FILENAME
,
54
PLAYLIST_SORT_TITLE
,
55
PLAYLIST_SORT_ALBUM
,
56
PLAYLIST_SORT_ARTIST
,
57
PLAYLIST_SORT_DATE
,
58
PLAYLIST_SORT_TRACK
,
59
PLAYLIST_SORT_FORMATTED_TITLE
,
60
PLAYLIST_SORT_SCHEMES
};
61
62
typedef
bool_t
(*
PlaylistFilterFunc
) (
const
char
*
filename
,
void
* user);
63
typedef
int
(*
PlaylistStringCompareFunc
) (
const
char
*
a
,
const
char
*
b
);
64
typedef
int
(*
PlaylistTupleCompareFunc
) (
const
Tuple *
a
,
const
Tuple *
b
);
65
66
#define AUD_API_NAME PlaylistAPI
67
#define AUD_API_SYMBOL playlist_api
68
69
#ifdef _AUDACIOUS_CORE
70
71
#include "
api-local-begin.h
"
72
#include "
playlist-api.h
"
73
#include "
api-local-end.h
"
74
75
/* playlist-files.c */
76
bool_t
playlist_load
(
const
char
*
filename
,
char
* * title,
77
Index * *
filenames
, Index * *
tuples
);
78
bool_t
playlist_insert_playlist_raw
(
int
list,
int
at
,
79
const
char
*
filename
);
80
81
/* playlist-new.c */
82
void
playlist_init
(
void
);
83
void
playlist_end
(
void
);
84
85
void
playlist_insert_with_id
(
int
at
,
int
id
);
86
void
playlist_set_modified
(
int
playlist
,
bool_t
modified
);
87
bool_t
playlist_get_modified
(
int
playlist
);
88
89
void
playlist_load_state
(
void
);
90
void
playlist_save_state
(
void
);
91
void
playlist_resume
(
void
);
92
93
void
playlist_reformat_titles
(
void
);
94
void
playlist_trigger_scan
(
void
);
95
96
void
playlist_entry_insert_batch_raw
(
int
playlist
,
int
at
,
97
Index *
filenames
, Index *
tuples
, Index * decoders);
98
99
bool_t
playlist_prev_song
(
int
playlist
);
100
bool_t
playlist_next_song
(
int
playlist
,
bool_t
repeat);
101
102
int
playback_entry_get_position
(
void
);
103
PluginHandle
*
playback_entry_get_decoder
(
void
);
104
Tuple *
playback_entry_get_tuple
(
void
);
105
char
*
playback_entry_get_title
(
void
);
106
int
playback_entry_get_length
(
void
);
107
108
void
playback_entry_set_tuple
(Tuple * tuple);
109
110
int
playback_entry_get_start_time
(
void
);
111
int
playback_entry_get_end_time
(
void
);
112
113
/* playlist-utils.c */
114
void
load_playlists
(
void
);
115
void
save_playlists
(
bool_t
exiting);
116
117
#else
118
119
#include <
audacious/api-define-begin.h
>
120
#include <
audacious/playlist-api.h
>
121
#include <
audacious/api-define-end.h
>
122
123
#include <
audacious/api-alias-begin.h
>
124
#include <
audacious/playlist-api.h
>
125
#include <
audacious/api-alias-end.h
>
126
127
#endif
128
129
#undef AUD_API_NAME
130
#undef AUD_API_SYMBOL
131
132
#endif
133
134
#ifdef AUD_API_DECLARE
135
136
#define AUD_API_NAME PlaylistAPI
137
#define AUD_API_SYMBOL playlist_api
138
139
#include "
api-define-begin.h
"
140
#include "
playlist-api.h
"
141
#include "
api-define-end.h
"
142
143
#include "
api-declare-begin.h
"
144
#include "
playlist-api.h
"
145
#include "
api-declare-end.h
"
146
147
#undef AUD_API_NAME
148
#undef AUD_API_SYMBOL
149
150
#endif
Generated by
1.8.1.1