diff options
author | Jay Berkenbilt <ejb@ql.org> | 2009-09-26 17:15:33 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2009-09-26 17:15:33 +0200 |
commit | 492db82f6f698e5dcf7ff51dab5fccc79378906c (patch) | |
tree | 047aa914c8dbb05f321be09072f81a0334f29991 /libqpdf/qpdf | |
parent | b6af616deaa1739a4cd1fba9f91e43c98ecb0b8a (diff) | |
download | qpdf-492db82f6f698e5dcf7ff51dab5fccc79378906c.tar.zst |
more dll exports
git-svn-id: svn+q:///qpdf/trunk@697 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/qpdf')
-rw-r--r-- | libqpdf/qpdf/BitStream.hh | 4 | ||||
-rw-r--r-- | libqpdf/qpdf/BitWriter.hh | 3 | ||||
-rw-r--r-- | libqpdf/qpdf/MD5.hh | 13 | ||||
-rw-r--r-- | libqpdf/qpdf/PCRE.hh | 18 | ||||
-rw-r--r-- | libqpdf/qpdf/Pl_ASCIIHexDecoder.hh | 4 | ||||
-rw-r--r-- | libqpdf/qpdf/Pl_LZWDecoder.hh | 4 | ||||
-rw-r--r-- | libqpdf/qpdf/Pl_MD5.hh | 5 | ||||
-rw-r--r-- | libqpdf/qpdf/Pl_PNGFilter.hh | 7 | ||||
-rw-r--r-- | libqpdf/qpdf/Pl_RC4.hh | 6 |
9 files changed, 63 insertions, 1 deletions
diff --git a/libqpdf/qpdf/BitStream.hh b/libqpdf/qpdf/BitStream.hh index d02eea42..1a42b5e7 100644 --- a/libqpdf/qpdf/BitStream.hh +++ b/libqpdf/qpdf/BitStream.hh @@ -6,9 +6,13 @@ class BitStream { public: + DLL_EXPORT BitStream(unsigned char const* p, int nbytes); + DLL_EXPORT void reset(); + DLL_EXPORT unsigned long getBits(int nbits); + DLL_EXPORT void skipToNextByte(); private: diff --git a/libqpdf/qpdf/BitWriter.hh b/libqpdf/qpdf/BitWriter.hh index 799e1c1a..d4a42182 100644 --- a/libqpdf/qpdf/BitWriter.hh +++ b/libqpdf/qpdf/BitWriter.hh @@ -10,9 +10,12 @@ class BitWriter public: // Write bits to the pipeline. It is the caller's responsibility // to eventually call finish on the pipeline. + DLL_EXPORT BitWriter(Pipeline* pl); + DLL_EXPORT void writeBits(unsigned long val, int bits); // Force any partial byte to be written to the pipeline. + DLL_EXPORT void flush(); private: diff --git a/libqpdf/qpdf/MD5.hh b/libqpdf/qpdf/MD5.hh index eb0b9680..b0b93e3d 100644 --- a/libqpdf/qpdf/MD5.hh +++ b/libqpdf/qpdf/MD5.hh @@ -14,37 +14,50 @@ class MD5 public: typedef unsigned char Digest[16]; + DLL_EXPORT MD5(); + DLL_EXPORT void reset(); // encodes string and finalizes + DLL_EXPORT void encodeString(char const* input_string); // encodes file and finalizes + DLL_EXPORT void encodeFile(char const* filename, int up_to_size = -1) throw(QEXC::System); // appends string to current md5 object + DLL_EXPORT void appendString(char const* input_string); // appends arbitrary data to current md5 object + DLL_EXPORT void encodeDataIncrementally(char const* input_data, int len); // computes a raw digest + DLL_EXPORT void digest(Digest); // prints the digest to stdout terminated with \r\n (primarily for // testing) + DLL_EXPORT void print(); // returns the digest as a hexadecimal string + DLL_EXPORT std::string unparse(); // Convenience functions + DLL_EXPORT static std::string getDataChecksum(char const* buf, int len); + DLL_EXPORT static std::string getFileChecksum(char const* filename, int up_to_size = -1); + DLL_EXPORT static bool checkDataChecksum(char const* const checksum, char const* buf, int len); + DLL_EXPORT static bool checkFileChecksum(char const* const checksum, char const* filename, int up_to_size = -1); diff --git a/libqpdf/qpdf/PCRE.hh b/libqpdf/qpdf/PCRE.hh index deba8733..93071d07 100644 --- a/libqpdf/qpdf/PCRE.hh +++ b/libqpdf/qpdf/PCRE.hh @@ -22,7 +22,9 @@ class PCRE class Exception: public QEXC::General { public: + DLL_EXPORT Exception(std::string const& message); + DLL_EXPORT virtual ~Exception() throw() {} }; @@ -31,7 +33,9 @@ class PCRE class NoBackref: public Exception { public: + DLL_EXPORT NoBackref(); + DLL_EXPORT virtual ~NoBackref() throw() {} }; @@ -39,10 +43,15 @@ class PCRE { friend class PCRE; public: + DLL_EXPORT Match(int nbackrefs, char const* subject); + DLL_EXPORT Match(Match const&); + DLL_EXPORT Match& operator=(Match const&); + DLL_EXPORT ~Match(); + DLL_EXPORT operator bool(); // All the back reference accessing routines may throw the @@ -54,10 +63,14 @@ class PCRE // and not matching at all. // see getMatch flags below + DLL_EXPORT std::string getMatch(int n, int flags = 0) throw(QEXC::General, Exception); + DLL_EXPORT void getOffsetLength(int n, int& offset, int& length) throw(Exception); + DLL_EXPORT int getOffset(int n) throw(Exception); + DLL_EXPORT int getLength(int n) throw(Exception); // nMatches returns the number of available matches including @@ -67,6 +80,7 @@ class PCRE // will return the whole string, getMatch(1) will return the // text that matched the backreference, and getMatch(2) will // throw an exception because it is out of range. + DLL_EXPORT int nMatches() const; // Flags for getMatch @@ -89,13 +103,17 @@ class PCRE // The value passed in as options is passed to pcre_exec. See man // pcreapi for details. + DLL_EXPORT PCRE(char const* pattern, int options = 0) throw(Exception); + DLL_EXPORT ~PCRE(); + DLL_EXPORT Match match(char const* subject, int options = 0, int startoffset = 0, int size = -1) throw(QEXC::General, Exception); + DLL_EXPORT static void test(int n = 0); private: diff --git a/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh b/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh index 36272328..068294d7 100644 --- a/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh +++ b/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh @@ -7,9 +7,13 @@ class Pl_ASCIIHexDecoder: public Pipeline { public: + DLL_EXPORT Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); + DLL_EXPORT virtual ~Pl_ASCIIHexDecoder(); + DLL_EXPORT virtual void write(unsigned char* buf, int len); + DLL_EXPORT virtual void finish(); private: diff --git a/libqpdf/qpdf/Pl_LZWDecoder.hh b/libqpdf/qpdf/Pl_LZWDecoder.hh index 95ec55b3..4d348406 100644 --- a/libqpdf/qpdf/Pl_LZWDecoder.hh +++ b/libqpdf/qpdf/Pl_LZWDecoder.hh @@ -10,10 +10,14 @@ class Pl_LZWDecoder: public Pipeline { public: + DLL_EXPORT Pl_LZWDecoder(char const* identifier, Pipeline* next, bool early_code_change); + DLL_EXPORT virtual ~Pl_LZWDecoder(); + DLL_EXPORT virtual void write(unsigned char* buf, int len); + DLL_EXPORT virtual void finish(); private: diff --git a/libqpdf/qpdf/Pl_MD5.hh b/libqpdf/qpdf/Pl_MD5.hh index 2d9d11fd..9da018d1 100644 --- a/libqpdf/qpdf/Pl_MD5.hh +++ b/libqpdf/qpdf/Pl_MD5.hh @@ -16,10 +16,15 @@ class Pl_MD5: public Pipeline { public: + DLL_EXPORT Pl_MD5(char const* identifier, Pipeline* next); + DLL_EXPORT virtual ~Pl_MD5(); + DLL_EXPORT virtual void write(unsigned char*, int); + DLL_EXPORT virtual void finish(); + DLL_EXPORT std::string getHexDigest(); private: diff --git a/libqpdf/qpdf/Pl_PNGFilter.hh b/libqpdf/qpdf/Pl_PNGFilter.hh index 1ecc7060..1d9afabd 100644 --- a/libqpdf/qpdf/Pl_PNGFilter.hh +++ b/libqpdf/qpdf/Pl_PNGFilter.hh @@ -1,4 +1,3 @@ - #ifndef __PL_PNGFILTER_HH__ #define __PL_PNGFILTER_HH__ @@ -23,11 +22,13 @@ class Pl_PNGFilter: public Pipeline class Exception: public Pipeline::Exception { public: + DLL_EXPORT Exception(std::string const& message) : Pipeline::Exception(message) { } + DLL_EXPORT virtual ~Exception() throw () { } @@ -36,12 +37,16 @@ class Pl_PNGFilter: public Pipeline // Encoding is not presently supported enum action_e { a_encode, a_decode }; + DLL_EXPORT Pl_PNGFilter(char const* identifier, Pipeline* next, action_e action, unsigned int columns, unsigned int bytes_per_pixel); + DLL_EXPORT virtual ~Pl_PNGFilter(); + DLL_EXPORT virtual void write(unsigned char* data, int len); + DLL_EXPORT virtual void finish(); private: diff --git a/libqpdf/qpdf/Pl_RC4.hh b/libqpdf/qpdf/Pl_RC4.hh index 6bebe5aa..01b651a5 100644 --- a/libqpdf/qpdf/Pl_RC4.hh +++ b/libqpdf/qpdf/Pl_RC4.hh @@ -12,11 +12,13 @@ class Pl_RC4: public Pipeline class Exception: public Pipeline::Exception { public: + DLL_EXPORT Exception(std::string const& message) : Pipeline::Exception(message) { } + DLL_EXPORT virtual ~Exception() throw() { } @@ -25,12 +27,16 @@ class Pl_RC4: public Pipeline static int const def_bufsize = 65536; // key_len of -1 means treat key_data as a null-terminated string + DLL_EXPORT Pl_RC4(char const* identifier, Pipeline* next, unsigned char const* key_data, int key_len = -1, int out_bufsize = def_bufsize); + DLL_EXPORT virtual ~Pl_RC4(); + DLL_EXPORT virtual void write(unsigned char* data, int len); + DLL_EXPORT virtual void finish(); private: |