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
15namespace libebook
16{
17
18 namespace RocketEBookToken
19{
20
21enum
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
54static_assert(EBOOKToken<RocketEBookParser>::LAST_TOKEN >= LAST_TOKEN, "token number overflow");
55
56}
57
58int getRocketEBookTokenId(const char *name, const char *ns = nullptr);
59int getRocketEBookTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
60int 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: */
EBOOKToken.h
libebook::EBOOKHTMLToken::LAST_TOKEN
@ LAST_TOKEN
Definition EBOOKHTMLToken.h:325
libebook::EBOOKHTMLToken::name
@ name
Definition EBOOKHTMLToken.h:214
libebook::RocketEBookToken
Definition RocketEBookToken.h:19
libebook::RocketEBookToken::PUBSERVER_ID
@ PUBSERVER_ID
Definition RocketEBookToken.h:38
libebook::RocketEBookToken::URL
@ URL
Definition RocketEBookToken.h:45
libebook::RocketEBookToken::GENERATOR
@ GENERATOR
Definition RocketEBookToken.h:33
libebook::RocketEBookToken::PUB_NAME
@ PUB_NAME
Definition RocketEBookToken.h:39
libebook::RocketEBookToken::SuggestedRetailPrice
@ SuggestedRetailPrice
Definition RocketEBookToken.h:41
libebook::RocketEBookToken::COPYTITLE
@ COPYTITLE
Definition RocketEBookToken.h:31
libebook::RocketEBookToken::REVISION
@ REVISION
Definition RocketEBookToken.h:40
libebook::RocketEBookToken::COPYRIGHT
@ COPYRIGHT
Definition RocketEBookToken.h:30
libebook::RocketEBookToken::TITLE_LANGUAGE
@ TITLE_LANGUAGE
Definition RocketEBookToken.h:43
libebook::RocketEBookToken::FIRST_TOKEN
@ FIRST_TOKEN
Definition RocketEBookToken.h:24
libebook::RocketEBookToken::MENUMARK
@ MENUMARK
Definition RocketEBookToken.h:35
libebook::RocketEBookToken::USERNAME
@ USERNAME
Definition RocketEBookToken.h:46
libebook::RocketEBookToken::TITLE
@ TITLE
Definition RocketEBookToken.h:42
libebook::RocketEBookToken::TYPE
@ TYPE
Definition RocketEBookToken.h:44
libebook::RocketEBookToken::LAST_TOKEN
@ LAST_TOKEN
Definition RocketEBookToken.h:51
libebook::RocketEBookToken::COPY_ID
@ COPY_ID
Definition RocketEBookToken.h:32
libebook::RocketEBookToken::PARSE
@ PARSE
Definition RocketEBookToken.h:37
libebook::RocketEBookToken::unknown
@ unknown
Definition RocketEBookToken.h:49
libebook::RocketEBookToken::INVALID_TOKEN
@ INVALID_TOKEN
Definition RocketEBookToken.h:23
libebook::RocketEBookToken::BODY
@ BODY
Definition RocketEBookToken.h:28
libebook::RocketEBookToken::OUTPUT
@ OUTPUT
Definition RocketEBookToken.h:36
libebook::RocketEBookToken::ISBN
@ ISBN
Definition RocketEBookToken.h:34
libebook::RocketEBookToken::COMMENT
@ COMMENT
Definition RocketEBookToken.h:29
libebook::RocketEBookToken::AUTHOR
@ AUTHOR
Definition RocketEBookToken.h:27
libebook
Definition BBeBCollector.cpp:20
libebook::getRocketEBookTokenId
int getRocketEBookTokenId(const char *const name, const char *const ns)
Definition RocketEBookToken.cpp:27
libebook::EBOOKToken
Definition EBOOKToken.h:18