#include <djv_document.h>

Public Member Functions | |
| virtual PageArray & | getPages ()=0 |
| virtual const PageArray & | getPages () const =0 |
| virtual Bookmark * | getBookmark ()=0 |
| virtual const Bookmark * | getBookmark () const =0 |
| virtual const SecurityProvider * | getSecurityProvider () const =0 |
| virtual void | save (const String &inFileName, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
| virtual void | save (Storage *inStorage, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
| virtual void | saveAsIndirect (const String &inOutputIndexFileName, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
| virtual void | saveAsIndirect (Storage *inStorage, StorageLocator *inStorageLocator=NULL, const SecurityProvider *inSecProv=NULL, IFF::SerializationCallback inCallback=NULL, void *inContext=NULL, bool inForceReflectChanges=true) const =0 |
| virtual const Chunk * | getChunk () const =0 |
| virtual Chunk * | getChunk ()=0 |
| virtual void | updateChunks ()=0 |
| virtual void | syncToChunks ()=0 |
Static Public Member Functions | |
| static AutoPtr< Document > | create () |
| static AutoPtr< Document > | create (Chunk *inChunk, IFF::Layout *inLayout=NULL) |
| static AutoPtr< Document > | create (Storage *inStorage, CredentialProvider *inCredProv=NULL, SecurityProviderBroker *inSecProvBroker=NULL, bool inRecoverErrors=false) |
| static AutoPtr< Document > | create (const String &inUrlOrFileName, CredentialProvider *inCredProv=NULL, SecurityProviderBroker *inSecProvBroker=NULL, bool inRecoverErrors=false) |
DJVM or DJVU chunk based document. Definition at line 33 of file djv_document.h.
Create an empty Document instance.
| static AutoPtr<Document> Celartem::DjVu::Document::create | ( | Chunk * | inChunk, | |
| IFF::Layout * | inLayout = NULL | |||
| ) | [static] |
Create a new Document instance from the specified chunk.
| inChunk | Pointer to a chunk which contains either DJVM or DJVU. | |
| inLayout | Pointer to a IFF::Layout instance, which is returned by IFF::deserialize method. If this is NULL, all the chunks are loaded synchronously and this method may take relatively long. |
| static AutoPtr<Document> Celartem::DjVu::Document::create | ( | Storage * | inStorage, | |
| CredentialProvider * | inCredProv = NULL, |
|||
| SecurityProviderBroker * | inSecProvBroker = NULL, |
|||
| bool | inRecoverErrors = false | |||
| ) | [static] |
Create a new Document instance from the specified Storage instance.
| inStorage | Pointer to a Storage instance to load DjVu from. | |
| inCredProv | A CredentialProvider instance which is used if the DjVu file being deserialized is protected by some security mechanism. | |
| inSecProvBroker | A SecurityProviderBroker instance which loads SecurityProvider instance from 4 character security system Id. If this is NULL, this function uses the default SecurityProviderBroker instance.This parameter is useful if you want to create your own SecurityProvider class and let deserialize function to use that class. | |
| inRecoverErrors | If this parameter is true, this method tries to recover the errors during loading chunks. It may be able to open broken DjVu files.If this is false, this method throws exceptions if it encounters broken structures. |
| static AutoPtr<Document> Celartem::DjVu::Document::create | ( | const String & | inUrlOrFileName, | |
| CredentialProvider * | inCredProv = NULL, |
|||
| SecurityProviderBroker * | inSecProvBroker = NULL, |
|||
| bool | inRecoverErrors = false | |||
| ) | [static] |
Create a new Document instance from the specified location.
| inUrlOrFileName | URL or a local file path. | |
| inCredProv | A CredentialProvider instance which is used if the DjVu file being deserialized is protected by some security mechanism. | |
| inSecProvBroker | A SecurityProviderBroker instance which loads SecurityProvider instance from 4 character security system Id. If this is NULL, this function uses the default SecurityProviderBroker instance.This parameter is useful if you want to create your own SecurityProvider class and let deserialize function to use that class. | |
| inRecoverErrors | If this parameter is true, this method tries to recover the errors during loading chunks. It may be able to open broken DjVu files.If this is false, this method throws exceptions if it encounters broken structures. |
| virtual PageArray& Celartem::DjVu::Document::getPages | ( | ) | [pure virtual] |
| virtual const PageArray& Celartem::DjVu::Document::getPages | ( | ) | const [pure virtual] |
| virtual Bookmark* Celartem::DjVu::Document::getBookmark | ( | ) | [pure virtual] |
Get the Bookmark instance.
Please note that the modifications to the returned instance does not reflect to the NAVM chunk unless you explicitly call one of updateChunks, save and saveAsIndirect.
You had better use const version if you don't plan to modify the bookmark.
| virtual const Bookmark* Celartem::DjVu::Document::getBookmark | ( | ) | const [pure virtual] |
| virtual const SecurityProvider* Celartem::DjVu::Document::getSecurityProvider | ( | ) | const [pure virtual] |
Get the SecurityProvider instance which is associated to the first Page instance of the this Document instance. If no page or the page does not have any SecurityProvider, this method returns NULL.
| virtual void Celartem::DjVu::Document::save | ( | const String & | inFileName, | |
| const SecurityProvider * | inSecProv = NULL, |
|||
| IFF::SerializationCallback | inCallback = NULL, |
|||
| void * | inContext = NULL, |
|||
| bool | inForceReflectChanges = true | |||
| ) | const [pure virtual] |
Write out the document to a file in bundled DjVu format.
| inFileName | Output DjVu file name. | |
| inSecProv | SecurityProvider instance if needed. It can be NULL. | |
| inCallback | Pointer to a function which is called during the serialization process. | |
| inContext | Pointer to a parameter which is passed to inCallback function. | |
| inForceReflectChanges | If ture, this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
| virtual void Celartem::DjVu::Document::save | ( | Storage * | inStorage, | |
| const SecurityProvider * | inSecProv = NULL, |
|||
| IFF::SerializationCallback | inCallback = NULL, |
|||
| void * | inContext = NULL, |
|||
| bool | inForceReflectChanges = true | |||
| ) | const [pure virtual] |
Write out the document to the storage in bundled DjVu format.
| inStorage | Storage instance to write on. | |
| inSecProv | SecurityProvider instance if needed. It can be NULL. | |
| inCallback | Pointer to a function which is called during the serialization process. | |
| inContext | Pointer to a parameter which is passed to inCallback function. | |
| inForceReflectChanges | If ture, this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
| virtual void Celartem::DjVu::Document::saveAsIndirect | ( | const String & | inOutputIndexFileName, | |
| const SecurityProvider * | inSecProv = NULL, |
|||
| IFF::SerializationCallback | inCallback = NULL, |
|||
| void * | inContext = NULL, |
|||
| bool | inForceReflectChanges = true | |||
| ) | const [pure virtual] |
Write out the document to the storage in indirect DjVu format.
| inOutputIndexFileName | Output DjVu index file name. All the satellite files are placed on the same directory to this file. | |
| inSecProv | SecurityProvider instance if needed. It can be NULL. | |
| inCallback | Pointer to a function which is called during the serialization process. | |
| inContext | Pointer to a parameter which is passed to inCallback function. | |
| inForceReflectChanges | If ture, this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
| virtual void Celartem::DjVu::Document::saveAsIndirect | ( | Storage * | inStorage, | |
| StorageLocator * | inStorageLocator = NULL, |
|||
| const SecurityProvider * | inSecProv = NULL, |
|||
| IFF::SerializationCallback | inCallback = NULL, |
|||
| void * | inContext = NULL, |
|||
| bool | inForceReflectChanges = true | |||
| ) | const [pure virtual] |
Write out the document to the storage in indirect DjVu format.
| inStorage | Storage instance on which this method writes the indirect djvu index file. | |
| inStorageLocator | StorageLocator instance which locates satellite files (this instance is used to determine the file path for the files other than index file). | |
| inSecProv | SecurityProvider instance if needed. It can be NULL. | |
| inCallback | Pointer to a function which is called during the serialization process. | |
| inContext | Pointer to a parameter which is passed to inCallback function. | |
| inForceReflectChanges | If ture, this method internally calls updateChunks before writing out the chunks to the storage; otherwise this method writes out the chunks as it is and the modifications you've done are not reflected to the output result. |
| virtual const Chunk* Celartem::DjVu::Document::getChunk | ( | ) | const [pure virtual] |
Get the actual Chunk instance.
Please note that modifications to the Page, Bookmark and the other attributes are not reflected to the real chunk until you explicitly call updateChunks method.
| virtual Chunk* Celartem::DjVu::Document::getChunk | ( | ) | [pure virtual] |
Get the actual Chunk instance.
Please note that modifications to the Page, Bookmark and the other attributes are not reflected to the real chunk until you explicitly call updateChunks method.
| virtual void Celartem::DjVu::Document::updateChunks | ( | ) | [pure virtual] |
Reflect the changes of this instance to the original chunks.
| virtual void Celartem::DjVu::Document::syncToChunks | ( | ) | [pure virtual] |