Rearange menu of mpegplayer. Add new menu with "settings" and "quit", and remove...
[kugel-rb.git] / apps / plugins / searchengine / token.h
blobffbed90c0ac5e5c165b806eaa7d57125817480b1
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Michiel van der Kolk
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #define TOKEN_INVALID -1
22 #define TOKEN_EOF 0 // EOF
23 #define TOKEN_NOT 1 // "not"
24 #define TOKEN_AND 2 // "and"
25 #define TOKEN_OR 3 // "or"
26 #define TOKEN_GT 4 // '>'
27 #define TOKEN_GTE 5 // '>='
28 #define TOKEN_LT 6 // '<'
29 #define TOKEN_LTE 7 // '<='
30 #define TOKEN_EQ 8 // '=='
31 #define TOKEN_NE 9 // '!='
32 #define TOKEN_CONTAINS 10 // "contains"
33 #define TOKEN_EQUALS 11 // "equals"
34 #define TOKEN_STARTSWITH 12
35 #define TOKEN_ENDSWITH 13
36 #define TOKEN_LPAREN 14 // '('
37 #define TOKEN_RPAREN 15 // ')'
38 #define TOKEN_NUM 16 // (0..9)+
39 #define TOKEN_NUMIDENTIFIER 17 // year, trackid, bpm, etc.
40 #define TOKEN_STRING 18 // (?)+
41 #define TOKEN_STRINGIDENTIFIER 19 // album, artist, title, genre ...
42 #define TOKEN_SHUFFLE 20
43 #define TOKEN_PLAYTIMELIMIT 21
45 #define INTVALUE_YEAR 1
46 #define INTVALUE_RATING 2
47 #define INTVALUE_PLAYCOUNT 3
48 #define INTVALUE_AUTORATING 4
49 #define INTVALUE_PLAYTIME 5
50 #define INTVALUE_TRACKNUM 6
51 #define INTVALUE_SAMPLERATE 7
52 #define INTVALUE_BITRATE 8
53 #define INTVALUE_TITLE 14
54 #define INTVALUE_ARTIST 15
55 #define INTVALUE_ALBUM 16
56 #define INTVALUE_GENRE 17
57 #define INTVALUE_FILENAME 18
59 #define SPELLING_LENGTH 100
61 struct token {
62 char kind;
63 char spelling[SPELLING_LENGTH + 3];
64 long intvalue;
67 char *getstring(struct token *token);
68 int getvalue(struct token *token);