~ubuntu-branches/ubuntu/vivid/libe-book/vivid-proposed

« back to all changes in this revision

Viewing changes to src/lib/EPUBToken.h

  • Committer: Package Import Robot
  • Author(s): Rene Engelhard
  • Date: 2014-08-07 23:08:06 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20140807230806-o06a0n2dspjavqfm
Tags: 0.1.1-2
* upload to unstable

* fix debian/copyright; this is MPL-2.0 only 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 EPUBTOKEN_H_INCLUDED
 
11
#define EPUBTOKEN_H_INCLUDED
 
12
 
 
13
#include <boost/static_assert.hpp>
 
14
 
 
15
#include "EBOOKToken.h"
 
16
 
 
17
namespace libebook
 
18
{
 
19
 
 
20
namespace EPUBToken
 
21
{
 
22
 
 
23
enum
 
24
{
 
25
  INVALID_TOKEN = 0,
 
26
  FIRST_TOKEN = EBOOKToken<EPUBParser>::FIRST_TOKEN,
 
27
 
 
28
  // namespace prefixes
 
29
  container,
 
30
  xml,
 
31
  xmlns,
 
32
 
 
33
  // elements
 
34
  rootfiles,
 
35
  rootfile,
 
36
  signatures,
 
37
  encryption,
 
38
 
 
39
  // attributes
 
40
  version,
 
41
  full_path,
 
42
  media_type,
 
43
 
 
44
  // attribute values
 
45
  _1_0,
 
46
  MIME_epub,
 
47
  MIME_opf,
 
48
 
 
49
  LAST_TOKEN
 
50
};
 
51
 
 
52
BOOST_STATIC_ASSERT(EBOOKToken<EPUBParser>::LAST_TOKEN >= LAST_TOKEN);
 
53
 
 
54
enum Namespace
 
55
{
 
56
  NS_container = container << 16,
 
57
  NS_xml = xml << 16,
 
58
  NS_xmlns = xmlns << 16
 
59
};
 
60
 
 
61
}
 
62
 
 
63
int getEPUBTokenId(const char *name, const char *ns = 0);
 
64
int getEPUBTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
 
65
int getEPUBTokenId(const char *name, std::size_t nameLen);
 
66
 
 
67
}
 
68
 
 
69
#endif // EPUBTOKEN_H_INCLUDED
 
70
 
 
71
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */