ACSMDownloader/include/rmsdk/package.h
2021-05-13 09:39:51 +02:00

477 lines
17 KiB
C++

/*
File automatically generated by SOAdvancedDissector.py
More information at http://indefero.soutade.fr/p/soadvanceddissector
*/
#ifndef _PACKAGE_H
#define _PACKAGE_H
#include <dpio.h>
#include <dpdoc.h>
#include <dpsec.h>
#include <uft.h>
#include <mdom.h>
#include <dp.h>
#include <zip.h>
#include <dpdev.h>
namespace package {
class AESZipDecryptor;
class DisplayElementProxy;
class DisplayHandlerProxy;
class EPUBProvider;
class EncryptionStreamReceiver;
class LazyHighlightData;
class NCXStreamReceiver;
class OCFStreamReceiver;
class OPFStreamReceiver;
class PackageContentIterator;
class PackageDocument;
class PackageErrorHandler;
class PackageLocation;
class PackageRangeInfo;
class PackageRenderer;
class PageMap;
class PageMapStreamReceiver;
class RightsStreamReceiver;
class Subdocument;
class Subrenderer;
class AESZipDecryptor: public zip::FilteredStream
{
public:
AESZipDecryptor(dpio::Stream*, unsigned char const*, unsigned int);
virtual ~AESZipDecryptor();
virtual void getCapabilities();
virtual void requestBytes(unsigned int, unsigned int);
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void totalLengthReady(unsigned int);
};
class DisplayElementProxy: public dpdoc::DisplayElement
{
public:
virtual ~DisplayElementProxy();
virtual void getType();
virtual void getBeginning();
virtual void getEnd();
virtual void getBox(dpdoc::Rectangle*);
virtual void getTransform(dpdoc::Matrix*);
virtual void getEmbedURL();
};
class DisplayHandlerProxy: public dpdoc::DisplayHandler
{
public:
virtual ~DisplayHandlerProxy();
virtual void startDisplayElement(dpdoc::DisplayElement*);
virtual void endDisplayElement(dpdoc::DisplayElement*);
};
class EPUBProvider: public dpdoc::DocumentProvider
{
public:
virtual ~EPUBProvider();
virtual void createDocument(dpdoc::DocumentClient*, dp::String const&);
};
class EncryptionStreamReceiver: public dpio::StreamClient
{
public:
EncryptionStreamReceiver(package::PackageDocument*, uft::URL const&, dpio::Stream*);
virtual ~EncryptionStreamReceiver();
virtual void propertyReady(dp::String const&, dp::String const&);
virtual void totalLengthReady(unsigned int);
virtual void propertiesReady();
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void reportError(dp::String const&);
};
class LazyHighlightData
{
public:
void checkValid(uft::String);
void compare(uft::sref<package::LazyHighlightData>, int&);
void staticInit();
void* s_descriptor;
};
class NCXStreamReceiver: public dpio::StreamClient
{
public:
NCXStreamReceiver(package::PackageDocument*, uft::URL const&, dpio::Stream*);
virtual ~NCXStreamReceiver();
virtual void propertyReady(dp::String const&, dp::String const&);
virtual void totalLengthReady(unsigned int);
virtual void propertiesReady();
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void reportError(dp::String const&);
};
class OCFStreamReceiver: public dpio::StreamClient
{
public:
OCFStreamReceiver(package::PackageDocument*, uft::URL const&, dpio::Stream*);
virtual ~OCFStreamReceiver();
virtual void propertyReady(dp::String const&, dp::String const&);
virtual void totalLengthReady(unsigned int);
virtual void propertiesReady();
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void reportError(dp::String const&);
};
class OPFStreamReceiver: public dpio::StreamClient
{
public:
OPFStreamReceiver(package::PackageDocument*, uft::URL const&, dpio::Stream*);
virtual ~OPFStreamReceiver();
virtual void propertyReady(dp::String const&, dp::String const&);
virtual void totalLengthReady(unsigned int);
virtual void propertiesReady();
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void reportError(dp::String const&);
};
class PackageContentIterator: public dpdoc::ContentIterator
{
public:
PackageContentIterator(package::PackageDocument*, dp::ref<package::PackageLocation> const&);
virtual ~PackageContentIterator();
virtual void release();
virtual void next(unsigned int);
virtual void previous(unsigned int);
virtual void getCurrentPosition();
};
class PackageDocument: public dpdoc::Document, public zip::ArchiveListener
{
public:
PackageDocument(dpdoc::DocumentClient*);
virtual ~PackageDocument();
virtual void getOptionalInterface(char const*);
virtual void release();
virtual void getInterfaceVersion();
virtual void getNaturalUnit();
virtual void setURL(dp::String const&);
virtual void getMetadata(dp::String const&, int);
virtual void getTocRoot();
virtual void getBeginning();
virtual void getEnd();
virtual void getLocationFromBookmark(dp::String const&);
virtual void findText(dp::ref<dpdoc::Location> const&, dp::ref<dpdoc::Location> const&, unsigned int, dp::String const&, dpdoc::Range*);
virtual void getText(dp::ref<dpdoc::Location> const&, dp::ref<dpdoc::Location> const&);
virtual void getPageCount();
virtual void getLocationFromPagePosition(double);
virtual void getPageName(double);
virtual void getPagePosition(dp::String const&);
virtual void setSyntheticPageInfo(int, int);
virtual void setPageMapURL(dp::String const&);
virtual void getContentIterator(int, dp::ref<dpdoc::Location> const&);
virtual void createRenderer(dpdoc::RendererClient*);
virtual void getErrorList();
virtual void setDocumentPassword(dp::String const&);
virtual void setLicense(dp::String const&, dp::String const&, dp::Data const&);
virtual void serializeDocumentAndLicense();
virtual void getRights();
virtual void setContextDevice(dpdev::Device*);
virtual void getPageProgressionDirection();
virtual void process();
virtual void getPagePositionFromLocation(dp::ref<dpdoc::Location> const&);
virtual void archiveDirectoryReady();
virtual void archiveError(uft::String);
virtual void processDRM();
void addErrorToList(uft::String const&);
void encryptionReady();
void finishOPFLoad();
void freeUnusedSubdocument(package::Subdocument*);
void getAdeptResource(int);
void getLocationFromBookmarkCFI(dp::String const&);
void getResourceStream(uft::String, unsigned int);
void getSubdocumentLocation(unsigned int, uft::String const&);
void getSubdocumentLocationCFI(unsigned int, uft::String const&);
void isSubdocumentStartBookmark(unsigned int, uft::String const&);
void ncxReady();
void ocfReady();
void opfReady();
void pagemapReady();
void processEncryptedData(mdom::Node const&, uft::Dict const&, uft::Dict const&, bool);
void processEncryptedKey(mdom::Node const&, uft::Dict const&);
void processOCFEncryption(bool);
void processOCFRoot(mdom::Node const&);
void processOPFManifest(uft::Dict const&, mdom::Node const&);
void processOPFMetadata(mdom::Node const&);
void processOPFSpine(uft::Dict const&, mdom::Node const&);
void processPageMap(mdom::Node const&);
void readContainer();
void readEncryption();
void readOCF();
void readPageMap(uft::sref<zip::Entry>&);
void reloadSubdocuments();
void reportDocumentProcessError(uft::String const&);
void reportLoadState();
void requestFullRepaint();
void rightsReady();
};
class PackageErrorHandler: public uft::ErrorHandler
{
public:
virtual ~PackageErrorHandler();
virtual void reportStateError(uft::String const&);
virtual void reportProcessError(uft::String const&);
virtual void getURLString();
virtual void changeURL(uft::String const&);
};
class PackageLocation: public dpdoc::Location
{
public:
PackageLocation(package::PackageDocument*, unsigned int, dp::ref<dpdoc::Location> const&);
PackageLocation(package::PackageDocument*, unsigned int, uft::String const&, dp::ref<dpdoc::Location> const&);
virtual ~PackageLocation();
virtual void addRef();
virtual void release();
virtual void getBookmark();
virtual void compare(dp::ref<dpdoc::Location> const&);
virtual void getPagePosition();
void getBookmarkCFI();
void getBookmarkInternal();
void getSubdocumentLocation();
};
class PackageRangeInfo: public dpdoc::RangeInfo
{
public:
PackageRangeInfo(package::PackageRenderer*, dp::ref<dpdoc::Location> const&, dp::ref<dpdoc::Location> const&);
virtual ~PackageRangeInfo();
virtual void release();
virtual void startsBeforeThisScreen();
virtual void endsBeforeThisScreen();
virtual void startsAfterThisScreen();
virtual void endsAfterThisScreen();
virtual void getBoxCount();
virtual void getBox(int, bool, dpdoc::Rectangle*);
virtual void getBoxTransform(int, dpdoc::Matrix*);
virtual void getBoxFlags(int, unsigned int*);
};
class PackageRenderer: public dpdoc::Renderer
{
public:
PackageRenderer(package::PackageDocument*, dpdoc::RendererClient*);
virtual ~PackageRenderer();
virtual void getOptionalInterface(char const*);
virtual void release();
virtual void getInterfaceVersion();
virtual void getCapabilities();
virtual void navigateToLocation(dp::ref<dpdoc::Location> const&);
virtual void getCurrentLocation();
virtual void supportsPixelLayout(int);
virtual void getScreenBeginning();
virtual void getScreenEnd();
virtual void getPageNumbersForScreen(dpdoc::PageNumbers*);
virtual void getNaturalSize(dpdoc::Rectangle*);
virtual void getMarkedArea(dpdoc::Rectangle*);
virtual void setViewport(double, double, bool);
virtual void setEnvironmentMatrix(dpdoc::Matrix const&);
virtual void setNavigationMatrix(dpdoc::Matrix const&);
virtual void getNavigationMatrix(dpdoc::Matrix*);
virtual void paint(int, int, int, int, dpdoc::Surface*);
virtual void walkScreen(dpdoc::DisplayHandler*, unsigned int);
virtual void handleEvent(dpdoc::Event*);
virtual void hitTest(double, double, unsigned int);
virtual void isFocusable();
virtual void getPagingMode();
virtual void setPagingMode(int);
virtual void setPageDecoration(dpdoc::PageDecoration const&);
virtual void nextScreen();
virtual void previousScreen();
virtual void isAtBeginning();
virtual void isAtEnd();
virtual void getDefaultFontSize();
virtual void setDefaultFontSize(double);
virtual void addHighlight(int, dp::ref<dpdoc::Location> const&, dp::ref<dpdoc::Location> const&);
virtual void setHighlightColor(int, int, unsigned int);
virtual void getHighlightColor(int, int);
virtual void navigateToHighlight(int, int);
virtual void getHighlightCount(int);
virtual void getHighlight(int, int, dpdoc::Range*);
virtual void removeHighlight(int, int);
virtual void removeAllHighlights(int);
virtual void getLinkCount();
virtual void getLinkInfo(int, dpdoc::LinkInfo*);
virtual void getExternalLinkCount();
virtual void getExternalLinkInfo(int, dpdoc::ExternalLinkInfo*);
virtual void getRangeInfo(dp::ref<dpdoc::Location> const&, dp::ref<dpdoc::Location> const&);
virtual void setMargins(double, double, double, double);
virtual void setCSSMediaType(dp::String const&);
virtual void getVideoCountForCurrentScreen();
virtual void getVideoInfoForVideoOnCurrentScreen(int, dpdoc::VideoInfo*);
virtual void getAudioCountForCurrentScreen();
virtual void getAudioInfoForAudioOnCurrentScreen(int, dpdoc::AudioInfo*);
virtual void setPlayMode(unsigned int);
virtual void getPlayMode();
virtual void showPageNumbers(bool);
virtual void allowExternalLinks(bool);
virtual void hibernate();
virtual void wakeUp();
virtual void performAction(dp::String const&);
virtual void getVideoInfoForCurrentScreenAsJSON();
virtual void getAudioInfoForCurrentScreenAsJSON();
virtual void getVideoStream(dp::String);
virtual void getAudioStream(dp::String);
void checkPartAccess();
void getChapterCount();
void getChapterMimeType(unsigned int);
void getChapterRenderer(unsigned int);
void getCurrentSubdocument();
void getCurrentSubrenderer();
void getSubDocIdxForHighlight(int, int);
void requestFullRepaint();
void restoreHighlights(package::Subrenderer*);
void saveHighlights(package::Subrenderer*);
void swapOutSubrenderers();
void wrapCurrentSubdocumentLocation(dp::ref<dpdoc::Location> const&);
};
class PageMap
{
public:
PageMap(package::PageMap const&);
PageMap(uft::String const&, int, uft::String const&);
~PageMap();
void staticInit();
void* s_descriptor;
};
class PageMapStreamReceiver: public dpio::StreamClient
{
public:
PageMapStreamReceiver(package::PackageDocument*, uft::URL const&, dpio::Stream*);
virtual ~PageMapStreamReceiver();
virtual void propertyReady(dp::String const&, dp::String const&);
virtual void totalLengthReady(unsigned int);
virtual void propertiesReady();
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void reportError(dp::String const&);
};
class RightsStreamReceiver: public dpio::StreamClient
{
public:
RightsStreamReceiver(package::PackageDocument*, uft::URL const&, dpio::Stream*);
virtual ~RightsStreamReceiver();
virtual void propertyReady(dp::String const&, dp::String const&);
virtual void totalLengthReady(unsigned int);
virtual void propertiesReady();
virtual void bytesReady(unsigned int, dp::Data const&, bool);
virtual void reportError(dp::String const&);
};
class Subdocument: public dpdoc::DocumentClient
{
public:
Subdocument();
virtual ~Subdocument();
virtual void getOptionalInterface(char const*);
virtual void getInterfaceVersion();
virtual void getResourceStream(dp::String const&, unsigned int);
virtual void canContinueProcessing(int);
virtual void reportLoadingState(int);
virtual void reportDocumentError(dp::String const&);
virtual void reportErrorListChange();
virtual void requestLicense(dp::String const&, dp::String const&, dp::Data const&);
virtual void requestDocumentPassword();
virtual void documentSerialized();
virtual void requestProcessing(int);
virtual void toString() const;
void freeDocument();
void getDocument(bool);
void getLocationFromPagePosition(double);
void getPageCount();
void getPagePositionFromLocation(dp::ref<dpdoc::Location> const&);
void initialize(package::PackageDocument*, uft::sref<zip::Entry> const&, int);
};
class Subrenderer: public dpdoc::RendererClient
{
public:
Subrenderer();
virtual ~Subrenderer();
virtual void getOptionalInterface(char const*);
virtual void getInterfaceVersion();
virtual void getUnitsPerInch();
virtual void getPageMarginFontSize();
virtual void requestRepaint(int, int, int, int);
virtual void navigateToURL(dp::String const&, dp::String const&);
virtual void reportMouseLocationInfo(dpdoc::MouseLocationInfo const&);
virtual void reportInternalNavigation();
virtual void reportDocumentSizeChange();
virtual void reportHighlightChange(int);
virtual void reportRendererError(dp::String const&);
virtual void finishedPlaying();
void clearPageCounts();
void freeRenderer();
void getDocument(bool);
void getNumHighlights(int);
void getRenderer(bool);
void initialize(package::PackageRenderer*, package::Subdocument*);
void setDefaultFontSize(double);
void setEnvironmentMatrix(dpdoc::Matrix const&);
void setNumHighlights(int, int);
void setPagingMode(int);
void setViewport(double, double, bool);
};
}
#endif // _PACKAGE_H