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_SCHEMES
};
59
60
typedef
bool_t
(*
PlaylistFilterFunc
) (
const
char
*
filename
,
void
* user);
61
typedef
int
(*
PlaylistStringCompareFunc
) (
const
char
*
a
,
const
char
*
b
);
62
typedef
int
(*
PlaylistTupleCompareFunc
) (
const
Tuple *
a
,
const
Tuple *
b
);
63
64
#define AUD_API_NAME PlaylistAPI
65
#define AUD_API_SYMBOL playlist_api
66
67
#ifdef _AUDACIOUS_CORE
68
69
#include "
api-local-begin.h
"
70
#include "
playlist-api.h
"
71
#include "
api-local-end.h
"
72
73
/* playlist-files.c */
74
bool_t
playlist_load
(
const
char
*
filename
,
char
* * title,
75
Index * *
filenames
, Index * *
tuples
);
76
bool_t
playlist_insert_playlist_raw
(
int
list,
int
at
,
77
const
char
*
filename
);
78
79
/* playlist-new.c */
80
void
playlist_init
(
void
);
81
void
playlist_end
(
void
);
82
83
void
playlist_insert_with_id
(
int
at
,
int
id
);
84
void
playlist_set_modified
(
int
playlist
,
bool_t
modified
);
85
bool_t
playlist_get_modified
(
int
playlist
);
86
87
void
playlist_load_state
(
void
);
88
void
playlist_save_state
(
void
);
89
void
playlist_resume
(
void
);
90
91
void
playlist_reformat_titles
(
void
);
92
void
playlist_trigger_scan
(
void
);
93
94
void
playlist_entry_insert_batch_raw
(
int
playlist
,
int
at
,
95
Index *
filenames
, Index *
tuples
, Index * decoders);
96
97
bool_t
playlist_prev_song
(
int
playlist
);
98
bool_t
playlist_next_song
(
int
playlist
,
bool_t
repeat);
99
100
int
playback_entry_get_position
(
void
);
101
PluginHandle
*
playback_entry_get_decoder
(
void
);
102
Tuple *
playback_entry_get_tuple
(
void
);
103
char
*
playback_entry_get_title
(
void
);
104
int
playback_entry_get_length
(
void
);
105
106
void
playback_entry_set_tuple
(Tuple * tuple);
107
108
int
playback_entry_get_start_time
(
void
);
109
int
playback_entry_get_end_time
(
void
);
110
111
/* playlist-utils.c */
112
void
load_playlists
(
void
);
113
void
save_playlists
(
bool_t
exiting);
114
115
#else
116
117
#include <
audacious/api-define-begin.h
>
118
#include <
audacious/playlist-api.h
>
119
#include <
audacious/api-define-end.h
>
120
121
#include <
audacious/api-alias-begin.h
>
122
#include <
audacious/playlist-api.h
>
123
#include <
audacious/api-alias-end.h
>
124
125
#endif
126
127
#undef AUD_API_NAME
128
#undef AUD_API_SYMBOL
129
130
#endif
131
132
#ifdef AUD_API_DECLARE
133
134
#define AUD_API_NAME PlaylistAPI
135
#define AUD_API_SYMBOL playlist_api
136
137
#include "
api-define-begin.h
"
138
#include "
playlist-api.h
"
139
#include "
api-define-end.h
"
140
141
#include "
api-declare-begin.h
"
142
#include "
playlist-api.h
"
143
#include "
api-declare-end.h
"
144
145
#undef AUD_API_NAME
146
#undef AUD_API_SYMBOL
147
148
#endif
Generated by
1.8.1.1