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-2012 John Lindgren
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright notice,
9
* this list of conditions, and the following disclaimer.
10
*
11
* 2. Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions, and the following disclaimer in the documentation
13
* provided with the distribution.
14
*
15
* This software is provided "as is" and without any warranty, express or
16
* implied. In no event shall the authors be liable for any damages arising from
17
* the use of this software.
18
*/
19
20
#ifndef AUDACIOUS_PLAYLIST_H
21
#define AUDACIOUS_PLAYLIST_H
22
23
#include <stdint.h>
24
25
#include <
audacious/api.h
>
26
#include <
audacious/types.h
>
27
#include <
libaudcore/index.h
>
28
#include <
libaudcore/tuple.h
>
29
30
/* The values which can be passed (packed into a pointer) to the "playlist
31
* update" hook. PLAYLIST_UPDATE_SELECTION means that entries have been
32
* selected or unselected, or that entries have been added to or removed from
33
* the queue. PLAYLIST_UPDATE_METADATA means that new metadata has been read
34
* for some entries, or that the title or filename of a playlist has changed,
35
* and implies PLAYLIST_UPDATE_SELECTION. PLAYLIST_UPDATE_STRUCTURE covers any
36
* change not listed under the other types, and implies both
37
* PLAYLIST_UPDATE_SELECTION and PLAYLIST_UPDATE_METADATA. */
38
enum
{
39
PLAYLIST_UPDATE_SELECTION
= 1,
40
PLAYLIST_UPDATE_METADATA
,
41
PLAYLIST_UPDATE_STRUCTURE
};
42
43
/* The values which can be passed to playlist_sort_by_scheme(),
44
* playlist_sort_selected_by_scheme(), and
45
* playlist_remove_duplicates_by_scheme(). PLAYLIST_SORT_PATH means the entire
46
* URI of a song file; PLAYLIST_SORT_FILENAME means the portion after the last
47
* "/" (forward slash). PLAYLIST_SORT_DATE means the song's release date (not
48
* the file's modification time). */
49
enum
{
50
PLAYLIST_SORT_PATH
,
51
PLAYLIST_SORT_FILENAME
,
52
PLAYLIST_SORT_TITLE
,
53
PLAYLIST_SORT_ALBUM
,
54
PLAYLIST_SORT_ARTIST
,
55
PLAYLIST_SORT_DATE
,
56
PLAYLIST_SORT_TRACK
,
57
PLAYLIST_SORT_FORMATTED_TITLE
,
58
PLAYLIST_SORT_LENGTH
,
59
PLAYLIST_SORT_SCHEMES
};
60
61
typedef
bool_t
(*
PlaylistFilterFunc
) (
const
char
*
filename
,
void
* user);
62
typedef
int
(*
PlaylistStringCompareFunc
) (
const
char
*
a
,
const
char
*
b
);
63
typedef
int
(*
PlaylistTupleCompareFunc
) (
const
Tuple *
a
,
const
Tuple *
b
);
64
65
#define AUD_API_NAME PlaylistAPI
66
#define AUD_API_SYMBOL playlist_api
67
68
#ifdef _AUDACIOUS_CORE
69
70
#include "
api-local-begin.h
"
71
#include "
playlist-api.h
"
72
#include "
api-local-end.h
"
73
74
/* playlist-files.c */
75
bool_t
playlist_load
(
const
char
*
filename
,
char
* * title,
76
Index * *
filenames
, Index * *
tuples
);
77
bool_t
playlist_insert_playlist_raw
(
int
list,
int
at
,
78
const
char
*
filename
);
79
80
/* playlist-new.c */
81
void
playlist_init
(
void
);
82
void
playlist_end
(
void
);
83
84
void
playlist_insert_with_id
(
int
at
,
int
id
);
85
void
playlist_set_modified
(
int
playlist
,
bool_t
modified
);
86
bool_t
playlist_get_modified
(
int
playlist
);
87
88
void
playlist_load_state
(
void
);
89
void
playlist_save_state
(
void
);
90
void
playlist_resume
(
void
);
91
92
void
playlist_reformat_titles
(
void
);
93
void
playlist_trigger_scan
(
void
);
94
95
void
playlist_entry_insert_batch_raw
(
int
playlist
,
int
at
,
96
Index *
filenames
, Index *
tuples
, Index * decoders);
97
98
bool_t
playlist_prev_song
(
int
playlist
);
99
bool_t
playlist_next_song
(
int
playlist
,
bool_t
repeat);
100
101
int
playback_entry_get_position
(
void
);
102
char
*
playback_entry_get_filename
(
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
/* playlist-utils.c */
111
void
load_playlists
(
void
);
112
void
save_playlists
(
bool_t
exiting);
113
114
#else
115
116
#include <
audacious/api-define-begin.h
>
117
#include <
audacious/playlist-api.h
>
118
#include <
audacious/api-define-end.h
>
119
120
#include <
audacious/api-alias-begin.h
>
121
#include <
audacious/playlist-api.h
>
122
#include <
audacious/api-alias-end.h
>
123
124
#endif
125
126
#undef AUD_API_NAME
127
#undef AUD_API_SYMBOL
128
129
#endif
130
131
#ifdef AUD_API_DECLARE
132
133
#define AUD_API_NAME PlaylistAPI
134
#define AUD_API_SYMBOL playlist_api
135
136
#include "
api-define-begin.h
"
137
#include "
playlist-api.h
"
138
#include "
api-define-end.h
"
139
140
#include "
api-declare-begin.h
"
141
#include "
playlist-api.h
"
142
#include "
api-declare-end.h
"
143
144
#undef AUD_API_NAME
145
#undef AUD_API_SYMBOL
146
147
#endif
Generated by
1.8.1.1