2
playlist: playlist logic
4
copyright 1995-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
5
see COPYING and AUTHORS files in distribution or http://mpg123.de
6
initially written by Michael Hipp, outsourced/reorganized by Thomas Orgis
8
#ifndef MPG123_PLAYLIST_H
9
#define MPG123_PLAYLIST_H
11
#include "stringbuf.h"
13
enum playlist_type { UNKNOWN = 0, M3U, PLS, NO_LIST };
15
typedef struct listitem
17
char* url; /* the filename */
18
char freeit; /* if it was allocated and should be free()d here */
21
typedef struct playlist_struct
23
FILE* file; /* the current playlist stream */
24
size_t entry; /* entry in the playlist file */
29
struct listitem* list;
30
struct stringbuf linebuf;
32
enum playlist_type type;
35
extern struct playlist_struct pl;
37
/* create playlist form argv including reading of playlist file */
38
void prepare_playlist(int argc, char** argv);
39
/* returns the next url to play or NULL when there is none left */
40
char *get_next_file();
41
/* frees memory that got allocated in prepare_playlist */