[smartpl/filescanner] Refactor smart playlist parsing

Moves the actual parsing with ANTLR3 out of filescanner.c to allow
future reuse in different context (JSON api)
This commit is contained in:
chme
2018-03-17 13:30:22 +01:00
committed by ejurgensen
parent 9708e26dd1
commit 5189fe2305
4 changed files with 273 additions and 134 deletions

23
src/smartpl_query.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef __SMARTPL_QUERY_H__
#define __SMARTPL_QUERY_H__
struct smartpl {
char *title;
char *query_where;
char *having;
char *order_by;
int limit;
};
int
smartpl_query_parse_file(struct smartpl *smartpl, const char *file);
int
smartpl_query_parse_string(struct smartpl *smartpl, const char *expression);
void
free_smartpl(struct smartpl *smartpl, int content_only);
#endif /* __SMARTPL_QUERY_H__ */