owntone-server/src/playlist.h

63 lines
1.4 KiB
C
Raw Normal View History

2003-12-04 18:20:51 -05:00
/*
* $Id$
2003-12-29 15:41:08 -05:00
* iTunes-style smart playlists
2003-12-04 18:20:51 -05:00
*
2003-12-29 15:41:08 -05:00
* Copyright (C) 2003 Ron Pedde (ron@pedde.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2003-12-04 18:20:51 -05:00
*/
#ifndef _PL_H_
#define _PL_H_
#include "mp3-scanner.h"
#define T_INT 0
#define T_STR 1
#define T_DATE 2
2003-12-04 18:20:51 -05:00
typedef struct tag_pl_node {
int op;
int type;
2003-12-04 18:20:51 -05:00
union {
int ival;
struct tag_pl_node *plval;
} arg1;
union {
char *cval;
int ival;
2003-12-04 18:20:51 -05:00
struct tag_pl_node *plval;
} arg2;
} PL_NODE;
typedef struct tag_smart_playlist {
char *name;
unsigned int id;
2003-12-04 18:20:51 -05:00
PL_NODE *root;
struct tag_smart_playlist *next;
} SMART_PLAYLIST;
extern SMART_PLAYLIST pl_smart;
extern int pl_error;
2003-12-04 18:20:51 -05:00
extern void pl_dump(void);
extern int pl_load(char *file);
extern void pl_eval(MP3FILE *pmp3);
2004-03-11 00:47:15 -05:00
extern void pl_register(void);
2003-12-04 18:20:51 -05:00
#endif /* _PL_H_ */