• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

DjVmDoc.h

Go to the documentation of this file.
00001 //C-  -*- C++ -*-
00002 //C- -------------------------------------------------------------------
00003 //C- DjVuLibre-3.5
00004 //C- Copyright (c) 2002  Leon Bottou and Yann Le Cun.
00005 //C- Copyright (c) 2001  AT&T
00006 //C-
00007 //C- This software is subject to, and may be distributed under, the
00008 //C- GNU General Public License, Version 2. The license should have
00009 //C- accompanied the software or you may obtain a copy of the license
00010 //C- from the Free Software Foundation at http://www.fsf.org .
00011 //C-
00012 //C- This program is distributed in the hope that it will be useful,
00013 //C- but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //C- GNU General Public License for more details.
00016 //C- 
00017 //C- DjVuLibre-3.5 is derived from the DjVu(r) Reference Library
00018 //C- distributed by Lizardtech Software.  On July 19th 2002, Lizardtech 
00019 //C- Software authorized us to replace the original DjVu(r) Reference 
00020 //C- Library notice by the following text (see doc/lizard2002.djvu):
00021 //C-
00022 //C-  ------------------------------------------------------------------
00023 //C- | DjVu (r) Reference Library (v. 3.5)
00024 //C- | Copyright (c) 1999-2001 LizardTech, Inc. All Rights Reserved.
00025 //C- | The DjVu Reference Library is protected by U.S. Pat. No.
00026 //C- | 6,058,214 and patents pending.
00027 //C- |
00028 //C- | This software is subject to, and may be distributed under, the
00029 //C- | GNU General Public License, Version 2. The license should have
00030 //C- | accompanied the software or you may obtain a copy of the license
00031 //C- | from the Free Software Foundation at http://www.fsf.org .
00032 //C- |
00033 //C- | The computer code originally released by LizardTech under this
00034 //C- | license and unmodified by other parties is deemed "the LIZARDTECH
00035 //C- | ORIGINAL CODE."  Subject to any third party intellectual property
00036 //C- | claims, LizardTech grants recipient a worldwide, royalty-free, 
00037 //C- | non-exclusive license to make, use, sell, or otherwise dispose of 
00038 //C- | the LIZARDTECH ORIGINAL CODE or of programs derived from the 
00039 //C- | LIZARDTECH ORIGINAL CODE in compliance with the terms of the GNU 
00040 //C- | General Public License.   This grant only confers the right to 
00041 //C- | infringe patent claims underlying the LIZARDTECH ORIGINAL CODE to 
00042 //C- | the extent such infringement is reasonably necessary to enable 
00043 //C- | recipient to make, have made, practice, sell, or otherwise dispose 
00044 //C- | of the LIZARDTECH ORIGINAL CODE (or portions thereof) and not to 
00045 //C- | any greater extent that may be necessary to utilize further 
00046 //C- | modifications or combinations.
00047 //C- |
00048 //C- | The LIZARDTECH ORIGINAL CODE is provided "AS IS" WITHOUT WARRANTY
00049 //C- | OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
00050 //C- | TO ANY WARRANTY OF NON-INFRINGEMENT, OR ANY IMPLIED WARRANTY OF
00051 //C- | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
00052 //C- +------------------------------------------------------------------
00053 // 
00054 // $Id: DjVmDoc.h,v 1.10 2005/05/25 20:24:52 leonb Exp $
00055 // $Name: release_3_5_15 $
00056 
00057 #ifndef _DJVMDOC_H
00058 #define _DJVMDOC_H
00059 #ifdef HAVE_CONFIG_H
00060 #include "config.h"
00061 #endif
00062 #if NEED_GNUG_PRAGMAS
00063 # pragma interface
00064 #endif
00065 
00066 
00067 #include "DjVmDir.h"
00068 
00069 #ifdef HAVE_NAMESPACES
00070 namespace DJVU {
00071 # ifdef NOT_DEFINED // Just to fool emacs c++ mode
00072 }
00073 #endif
00074 #endif
00075 
00076 class ByteStream;
00077 class DataPool;
00078 class GURL;
00079 class GUTF8String;
00080 class DjVmNav;
00081 
00092 
00117 class DjVmDoc : public GPEnabled
00118 {
00119       // Internal function.
00120 protected:   
00121   DjVmDoc(void);
00122   void init(void);
00123 public:
00125    static GP<DjVmDoc> create(void);
00135    void insert_file(
00136      ByteStream &data, DjVmDir::File::FILE_TYPE file_type,
00137      const GUTF8String &name, const GUTF8String &id,
00138      const GUTF8String &title=GUTF8String(), int pos=-1 );
00148    void insert_file(
00149      const GP<DataPool> &pool, DjVmDir::File::FILE_TYPE file_type,
00150      const GUTF8String &name, const GUTF8String &id,
00151      const GUTF8String &title=GUTF8String(), int pos=-1 );
00152 
00157    void insert_file(const GP<DjVmDir::File> & f,
00158                     GP<DataPool> data, int pos=-1);
00159 
00164    void delete_file(const GUTF8String &id);
00165 
00167    void set_djvm_nav(GP<DjVmNav> n);
00168 
00171    GP<DjVmDir>  get_djvm_dir(void);
00172    
00176    GP<DataPool> get_data(const GUTF8String &id) const;
00177 
00182    void read(ByteStream & str);
00185    void read(const GP<DataPool> & data_pool);
00199    void read(const GURL &url);
00201 
00206    void write(const GP<ByteStream> &str);
00209    void write(const GP<ByteStream> &str,
00210               const GMap<GUTF8String,void *>& reserved);
00213    void write_index(const GP<ByteStream> &str);
00225    void expand(const GURL &codebase, const GUTF8String &idx_name);
00226 
00229    void save_page(const GURL &codebase, const DjVmDir::File &file) const;
00230 
00234    void save_page(const GURL &codebase, const DjVmDir::File &file,
00235                   GMap<GUTF8String,GUTF8String> &incl) const;
00236 
00239    void save_file(const GURL &codebase, const DjVmDir::File &file) const;
00240 
00242    GUTF8String save_file(const GURL &codebase, const DjVmDir::File &file,
00243                          GMap<GUTF8String,GUTF8String> &incl, 
00244                          const GP<DataPool> &pool) const;
00246 private:
00247    void save_file(const GURL &codebase, const DjVmDir::File &file,
00248                   GMap<GUTF8String,GUTF8String> *incl) const;
00249    GP<DjVmDir> dir;
00250    GP<DjVmNav> nav;
00251    GPMap<GUTF8String, DataPool > data;
00252 private: // dummy stuff
00253    static void write(ByteStream *);
00254    static void write_index(ByteStream *);
00255 };
00256 
00257 inline GP<DjVmDir>
00258 DjVmDoc::get_djvm_dir(void)
00259 {
00260    return dir;
00261 }
00262 
00263 
00265 
00266 
00267 
00268 #ifdef HAVE_NAMESPACES
00269 }
00270 # ifndef NOT_USING_DJVU_NAMESPACE
00271 using namespace DJVU;
00272 # endif
00273 #endif
00274 #endif

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal