diff options
author | Michiel Van Der Kolk <not.valid@email.address> | 2005-05-08 14:41:41 +0000 |
---|---|---|
committer | Michiel Van Der Kolk <not.valid@email.address> | 2005-05-08 14:41:41 +0000 |
commit | b0e010fc5142acc09b10aa4f6453dd6fbdcb8265 (patch) | |
tree | 10e9186fcc373354ff387efbcb29ff941fee5fcb /apps/plugins/databox/edittoken.h | |
parent | a559cf2e3949fcc0482b656411ed68c1e79bb245 (diff) | |
download | rockbox-b0e010fc5142acc09b10aa4f6453dd6fbdcb8265.tar.gz rockbox-b0e010fc5142acc09b10aa4f6453dd6fbdcb8265.zip |
Databox!
The frontend plugin for the searchengine, creates searchengine files (rsp)
Its not pretty, but it works.
Only compiling for recorder and iriver for now....since i don't know about players...
Also, i'm hoping someone will beautify the interface someday.
PS. Editing modes aren't fully operational yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6432 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/databox/edittoken.h')
-rw-r--r-- | apps/plugins/databox/edittoken.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/apps/plugins/databox/edittoken.h b/apps/plugins/databox/edittoken.h new file mode 100644 index 0000000000..a5c8d472e1 --- /dev/null +++ b/apps/plugins/databox/edittoken.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 by Michiel van der Kolk | ||
11 | * | ||
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. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef EDITTOKEN_H | ||
20 | #define EDITTOKEN_H | ||
21 | |||
22 | #define TOKEN_INVALID -1 | ||
23 | #define TOKEN_EOF 0 // EOF | ||
24 | #define TOKEN_NOT 1 // "not" | ||
25 | #define TOKEN_AND 2 // "and" | ||
26 | #define TOKEN_OR 3 // "or" | ||
27 | #define TOKEN_GT 4 // '>' | ||
28 | #define TOKEN_GTE 5 // '>=' | ||
29 | #define TOKEN_LT 6 // '<' | ||
30 | #define TOKEN_LTE 7 // '<=' | ||
31 | #define TOKEN_EQ 8 // '==' | ||
32 | #define TOKEN_NE 9 // '!=' | ||
33 | #define TOKEN_CONTAINS 10 // "contains" | ||
34 | #define TOKEN_EQUALS 11 // "equals" | ||
35 | #define TOKEN_LPAREN 12 // '(' | ||
36 | #define TOKEN_RPAREN 13 // ')' | ||
37 | #define TOKEN_NUM 14 // (0..9)+ | ||
38 | #define TOKEN_NUMIDENTIFIER 15 // year, trackid, bpm, etc. | ||
39 | #define TOKEN_STRING 16 // (?)+ | ||
40 | #define TOKEN_STRINGIDENTIFIER 17 // album, artist, title, genre ... | ||
41 | #define TOKEN_YEAR 18 | ||
42 | #define TOKEN_RATING 19 | ||
43 | #define TOKEN_PLAYCOUNT 20 | ||
44 | #define TOKEN_TITLE 21 | ||
45 | #define TOKEN_ARTIST 22 | ||
46 | #define TOKEN_ALBUM 23 | ||
47 | #define TOKEN_GENRE 24 | ||
48 | #define TOKEN_FILENAME 25 | ||
49 | #define TOKEN_EDIT 26 | ||
50 | |||
51 | #define ACCEPT_EOF 0x1 | ||
52 | #define ACCEPT_BOOLOP 0x2 | ||
53 | #define ACCEPT_NUMOP 0x4 | ||
54 | #define ACCEPT_STROP 0x8 | ||
55 | #define ACCEPT_LPAREN 0x10 | ||
56 | #define ACCEPT_RPAREN 0x20 | ||
57 | #define ACCEPT_NUMARG 0x40 | ||
58 | #define ACCEPT_STRARG 0x80 | ||
59 | #define ACCEPT_NOT 0x100 | ||
60 | #define ACCEPT_DELETE 0x200 | ||
61 | |||
62 | #define INTVALUE_YEAR 1 | ||
63 | #define INTVALUE_RATING 2 | ||
64 | #define INTVALUE_PLAYCOUNT 3 | ||
65 | #define INTVALUE_TITLE 4 | ||
66 | #define INTVALUE_ARTIST 5 | ||
67 | #define INTVALUE_ALBUM 6 | ||
68 | #define INTVALUE_GENRE 7 | ||
69 | #define INTVALUE_FILENAME 8 | ||
70 | |||
71 | struct token { | ||
72 | char kind; | ||
73 | char spelling[255]; | ||
74 | long intvalue; | ||
75 | }; | ||
76 | char *tokentypetostring(int tokentype); | ||
77 | char *tokentostring(struct token *token); | ||
78 | void buildtoken(int tokentype,struct token *token); | ||
79 | #endif | ||