Adapt the remaining plugins to put the greyscale isr on cop. Now they can be used...
[Rockbox.git] / apps / plugins / searchengine / token.h
blob6deecd81a54e58cc939a9d197824f5826f4044be
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Michiel van der Kolk
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #define TOKEN_INVALID -1
20 #define TOKEN_EOF 0 // EOF
21 #define TOKEN_NOT 1 // "not"
22 #define TOKEN_AND 2 // "and"
23 #define TOKEN_OR 3 // "or"
24 #define TOKEN_GT 4 // '>'
25 #define TOKEN_GTE 5 // '>='
26 #define TOKEN_LT 6 // '<'
27 #define TOKEN_LTE 7 // '<='
28 #define TOKEN_EQ 8 // '=='
29 #define TOKEN_NE 9 // '!='
30 #define TOKEN_CONTAINS 10 // "contains"
31 #define TOKEN_EQUALS 11 // "equals"
32 #define TOKEN_STARTSWITH 12
33 #define TOKEN_ENDSWITH 13
34 #define TOKEN_LPAREN 14 // '('
35 #define TOKEN_RPAREN 15 // ')'
36 #define TOKEN_NUM 16 // (0..9)+
37 #define TOKEN_NUMIDENTIFIER 17 // year, trackid, bpm, etc.
38 #define TOKEN_STRING 18 // (?)+
39 #define TOKEN_STRINGIDENTIFIER 19 // album, artist, title, genre ...
40 #define TOKEN_SHUFFLE 20
41 #define TOKEN_PLAYTIMELIMIT 21
43 #define INTVALUE_YEAR 1
44 #define INTVALUE_RATING 2
45 #define INTVALUE_PLAYCOUNT 3
46 #define INTVALUE_AUTORATING 4
47 #define INTVALUE_PLAYTIME 5
48 #define INTVALUE_TRACKNUM 6
49 #define INTVALUE_SAMPLERATE 7
50 #define INTVALUE_BITRATE 8
51 #define INTVALUE_TITLE 14
52 #define INTVALUE_ARTIST 15
53 #define INTVALUE_ALBUM 16
54 #define INTVALUE_GENRE 17
55 #define INTVALUE_FILENAME 18
57 #define SPELLING_LENGTH 100
59 struct token {
60 char kind;
61 char spelling[SPELLING_LENGTH + 3];
62 long intvalue;
65 char *getstring(struct token *token);
66 int getvalue(struct token *token);