RocketEBookToken.h Source File documentation

RocketEBookToken.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libe-book project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef ROCKETEBOOKTOKEN_H_INCLUDED
11 #define ROCKETEBOOKTOKEN_H_INCLUDED
12
13 #include "EBOOKToken.h"
14
15 namespace libebook
16 {
17
18 namespace RocketEBookToken
19 {
20
21 enum
22 {
23 INVALID_TOKEN = 0,
24 FIRST_TOKEN = EBOOKToken<RocketEBookParser>::FIRST_TOKEN,
25
26 // keys
27 AUTHOR,
28 BODY,
29 COMMENT,
30 COPYRIGHT,
31 COPYTITLE,
32 COPY_ID,
33 GENERATOR,
34 ISBN,
35 MENUMARK,
36 OUTPUT,
37 PARSE,
38 PUBSERVER_ID,
39 PUB_NAME,
40 REVISION,
41 SuggestedRetailPrice,
42 TITLE,
43 TITLE_LANGUAGE,
44 TYPE,
45 URL,
46 USERNAME,
47
48 // values
49 unknown,
50
51 LAST_TOKEN
52 };
53
54 static_assert(EBOOKToken<RocketEBookParser>::LAST_TOKEN >= LAST_TOKEN, "token number overflow");
55
56 }
57
58 int getRocketEBookTokenId(const char *name, const char *ns = nullptr);
59 int getRocketEBookTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
60 int getRocketEBookTokenId(const char *name, std::size_t nameLen);
61
62 }
63
64 #endif // ROCKETEBOOKTOKEN_H_INCLUDED
65
66 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::RocketEBookToken::TITLE
Definition: RocketEBookToken.h:42
libebook::RocketEBookToken::GENERATOR
Definition: RocketEBookToken.h:33
libebook::RocketEBookToken::unknown
Definition: RocketEBookToken.h:49
libebook::RocketEBookToken::ISBN
Definition: RocketEBookToken.h:34
libebook::RocketEBookToken::TYPE
Definition: RocketEBookToken.h:44
libebook::RocketEBookToken::USERNAME
Definition: RocketEBookToken.h:46
libebook::RocketEBookToken::COPYTITLE
Definition: RocketEBookToken.h:31
libebook::RocketEBookToken::PUBSERVER_ID
Definition: RocketEBookToken.h:38
libebook::RocketEBookToken::REVISION
Definition: RocketEBookToken.h:40
libebook::RocketEBookToken::COMMENT
Definition: RocketEBookToken.h:29
libebook::RocketEBookToken::SuggestedRetailPrice
Definition: RocketEBookToken.h:41
libebook::RocketEBookToken::MENUMARK
Definition: RocketEBookToken.h:35
libebook::RocketEBookToken::URL
Definition: RocketEBookToken.h:45
libebook::EBOOKToken
Definition: EBOOKToken.h:17
libebook::RocketEBookToken::AUTHOR
Definition: RocketEBookToken.h:27
libebook::RocketEBookToken::PARSE
Definition: RocketEBookToken.h:37
name
const char * name
Definition: EBOOKHTMLToken.cpp:44
libebook::RocketEBookToken::COPYRIGHT
Definition: RocketEBookToken.h:30
libebook::RocketEBookToken::FIRST_TOKEN
Definition: RocketEBookToken.h:24
EBOOKToken.h
libebook::RocketEBookToken::TITLE_LANGUAGE
Definition: RocketEBookToken.h:43
libebook::RocketEBookToken::OUTPUT
Definition: RocketEBookToken.h:36
libebook::RocketEBookToken::INVALID_TOKEN
Definition: RocketEBookToken.h:23
libebook::RocketEBookToken::COPY_ID
Definition: RocketEBookToken.h:32
libebook::RocketEBookToken::BODY
Definition: RocketEBookToken.h:28
libebook
Definition: BBeBCollector.cpp:18
libebook::RocketEBookToken::PUB_NAME
Definition: RocketEBookToken.h:39
libebook::getRocketEBookTokenId
int getRocketEBookTokenId(const char *const name, const char *const ns)
Definition: RocketEBookToken.cpp:27
libebook::RocketEBookToken::LAST_TOKEN
Definition: RocketEBookToken.h:51