1 //C-  -*- C++ -*-
2 //C- -------------------------------------------------------------------
3 //C- DjVuLibre-3.5
4 //C- Copyright (c) 2002  Leon Bottou and Yann Le Cun.
5 //C- Copyright (c) 2001  AT&T
6 //C-
7 //C- This software is subject to, and may be distributed under, the
8 //C- GNU General Public License, either Version 2 of the license,
9 //C- or (at your option) any later version. The license should have
10 //C- accompanied the software or you may obtain a copy of the license
11 //C- from the Free Software Foundation at http://www.fsf.org .
12 //C-
13 //C- This program is distributed in the hope that it will be useful,
14 //C- but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 //C- GNU General Public License for more details.
17 //C-
18 //C- DjVuLibre-3.5 is derived from the DjVu(r) Reference Library from
19 //C- Lizardtech Software.  Lizardtech Software has authorized us to
20 //C- replace the original DjVu(r) Reference Library notice by the following
21 //C- text (see doc/lizard2002.djvu and doc/lizardtech2007.djvu):
22 //C-
23 //C-  ------------------------------------------------------------------
24 //C- | DjVu (r) Reference Library (v. 3.5)
25 //C- | Copyright (c) 1999-2001 LizardTech, Inc. All Rights Reserved.
26 //C- | The DjVu Reference Library is protected by U.S. Pat. No.
27 //C- | 6,058,214 and patents pending.
28 //C- |
29 //C- | This software is subject to, and may be distributed under, the
30 //C- | GNU General Public License, either Version 2 of the license,
31 //C- | or (at your option) any later version. The license should have
32 //C- | accompanied the software or you may obtain a copy of the license
33 //C- | from the Free Software Foundation at http://www.fsf.org .
34 //C- |
35 //C- | The computer code originally released by LizardTech under this
36 //C- | license and unmodified by other parties is deemed "the LIZARDTECH
37 //C- | ORIGINAL CODE."  Subject to any third party intellectual property
38 //C- | claims, LizardTech grants recipient a worldwide, royalty-free,
39 //C- | non-exclusive license to make, use, sell, or otherwise dispose of
40 //C- | the LIZARDTECH ORIGINAL CODE or of programs derived from the
41 //C- | LIZARDTECH ORIGINAL CODE in compliance with the terms of the GNU
42 //C- | General Public License.   This grant only confers the right to
43 //C- | infringe patent claims underlying the LIZARDTECH ORIGINAL CODE to
44 //C- | the extent such infringement is reasonably necessary to enable
45 //C- | recipient to make, have made, practice, sell, or otherwise dispose
46 //C- | of the LIZARDTECH ORIGINAL CODE (or portions thereof) and not to
47 //C- | any greater extent that may be necessary to utilize further
48 //C- | modifications or combinations.
49 //C- |
50 //C- | The LIZARDTECH ORIGINAL CODE is provided "AS IS" WITHOUT WARRANTY
51 //C- | OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
52 //C- | TO ANY WARRANTY OF NON-INFRINGEMENT, OR ANY IMPLIED WARRANTY OF
53 //C- | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
54 //C- +------------------------------------------------------------------
55 
56 #ifndef _DJVUDUMPHELPER_H
57 #define _DJVUDUMPHELPER_H
58 #ifdef HAVE_CONFIG_H
59 #include "config.h"
60 #endif
61 #if NEED_GNUG_PRAGMAS
62 # pragma interface
63 #endif
64 
65 
66 /** @name DjVuDupmHelper.h
67     This file contains code capable of generating information on
68     DjVu documents without actually decoding them. The code has
69     been extracted from a command line utility \Ref{djvudump.cpp}
70     for use in the DjVu plugin.
71     @memo
72     DjVu Dump Helper.
73     @author
74     L\'eon Bottou <leonb@research.att.com> -- as a separate program.\\
75     Andrei Erofeev <eaf@geocities.com> -- as a class.
76 */
77 //@{
78 
79 
80 
81 #include "GSmartPointer.h"
82 
83 #ifdef HAVE_NAMESPACES
84 namespace DJVU {
85 # ifdef NOT_DEFINED // Just to fool emacs c++ mode
86 }
87 #endif
88 #endif
89 
90 class DataPool;
91 class ByteStream;
92 
93 /** DjVuDumpHelper.
94     This class can dump information on any DjVu file without decoding it.
95     Based upon old \Ref{djvudump.cpp} code.
96  */
97 
98 class DJVUAPI DjVuDumpHelper
99 {
100 public:
101       /// Default constructor
DjVuDumpHelper(void)102    DjVuDumpHelper(void) {}
103       /// Destructor
~DjVuDumpHelper(void)104    ~DjVuDumpHelper(void) {}
105       /** Interprets the file passed in the \Ref{DataPool}, and returns
106 	  the results in \Ref{ByteStream}. */
107    GP<ByteStream>	dump(const GP<DataPool> & pool);
108       /** Interprets the file passed in the \Ref{ByteStream}, and returns
109 	  the results in \Ref{ByteStream}. */
110    GP<ByteStream>	dump(GP<ByteStream> str);
111 };
112 
113 
114 //@}
115 
116 // ----- THE END
117 
118 #ifdef HAVE_NAMESPACES
119 }
120 # ifndef NOT_USING_DJVU_NAMESPACE
121 using namespace DJVU;
122 # endif
123 #endif
124 #endif
125