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_
|
|
|
|
|
2003-12-05 01:01:21 -05:00
|
|
|
#include "mp3-scanner.h"
|
|
|
|
|
2003-12-07 01:36:06 -05:00
|
|
|
#define T_INT 0
|
|
|
|
#define T_STR 1
|
2004-09-12 19:20:29 -04:00
|
|
|
#define T_DATE 2
|
2003-12-07 01:36:06 -05:00
|
|
|
|
2003-12-04 18:20:51 -05:00
|
|
|
typedef struct tag_pl_node {
|
|
|
|
int op;
|
2003-12-07 01:36:06 -05:00
|
|
|
int type;
|
2003-12-04 18:20:51 -05:00
|
|
|
union {
|
|
|
|
int ival;
|
|
|
|
struct tag_pl_node *plval;
|
|
|
|
} arg1;
|
|
|
|
union {
|
|
|
|
char *cval;
|
2003-12-07 01:36:06 -05:00
|
|
|
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;
|
2003-12-05 01:01:21 -05:00
|
|
|
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;
|
2003-12-05 01:01:21 -05:00
|
|
|
extern int pl_error;
|
|
|
|
|
2003-12-04 18:20:51 -05:00
|
|
|
extern void pl_dump(void);
|
2003-12-05 01:01:21 -05:00
|
|
|
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_ */
|
|
|
|
|
|
|
|
|