Commit 492db82f6f698e5dcf7ff51dab5fccc79378906c
1 parent
b6af616d
more dll exports
git-svn-id: svn+q:///qpdf/trunk@697 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
20 changed files
with
130 additions
and
6 deletions
include/qpdf/Pl_Buffer.hh
| ... | ... | @@ -27,14 +27,19 @@ |
| 27 | 27 | class Pl_Buffer: public Pipeline |
| 28 | 28 | { |
| 29 | 29 | public: |
| 30 | + DLL_EXPORT | |
| 30 | 31 | Pl_Buffer(char const* identifier, Pipeline* next = 0); |
| 32 | + DLL_EXPORT | |
| 31 | 33 | virtual ~Pl_Buffer(); |
| 34 | + DLL_EXPORT | |
| 32 | 35 | virtual void write(unsigned char*, int); |
| 36 | + DLL_EXPORT | |
| 33 | 37 | virtual void finish(); |
| 34 | 38 | |
| 35 | 39 | // Each call to getBuffer() resets this object -- see notes above. |
| 36 | 40 | // The caller is responsible for deleting the returned Buffer |
| 37 | 41 | // object. |
| 42 | + DLL_EXPORT | |
| 38 | 43 | Buffer* getBuffer(); |
| 39 | 44 | |
| 40 | 45 | private: | ... | ... |
libqpdf/BitStream.cc
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | #define BITS_READ 1 |
| 7 | 7 | #include "bits.icc" |
| 8 | 8 | |
| 9 | +DLL_EXPORT | |
| 9 | 10 | BitStream::BitStream(unsigned char const* p, int nbytes) : |
| 10 | 11 | start(p), |
| 11 | 12 | nbytes(nbytes) |
| ... | ... | @@ -13,6 +14,7 @@ BitStream::BitStream(unsigned char const* p, int nbytes) : |
| 13 | 14 | reset(); |
| 14 | 15 | } |
| 15 | 16 | |
| 17 | +DLL_EXPORT | |
| 16 | 18 | void |
| 17 | 19 | BitStream::reset() |
| 18 | 20 | { |
| ... | ... | @@ -21,6 +23,7 @@ BitStream::reset() |
| 21 | 23 | bits_available = 8 * nbytes; |
| 22 | 24 | } |
| 23 | 25 | |
| 26 | +DLL_EXPORT | |
| 24 | 27 | unsigned long |
| 25 | 28 | BitStream::getBits(int nbits) |
| 26 | 29 | { |
| ... | ... | @@ -28,6 +31,7 @@ BitStream::getBits(int nbits) |
| 28 | 31 | this->bits_available, nbits); |
| 29 | 32 | } |
| 30 | 33 | |
| 34 | +DLL_EXPORT | |
| 31 | 35 | void |
| 32 | 36 | BitStream::skipToNextByte() |
| 33 | 37 | { | ... | ... |
libqpdf/BitWriter.cc
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | #define BITS_WRITE 1 |
| 7 | 7 | #include "bits.icc" |
| 8 | 8 | |
| 9 | +DLL_EXPORT | |
| 9 | 10 | BitWriter::BitWriter(Pipeline* pl) : |
| 10 | 11 | pl(pl), |
| 11 | 12 | ch(0), |
| ... | ... | @@ -13,12 +14,14 @@ BitWriter::BitWriter(Pipeline* pl) : |
| 13 | 14 | { |
| 14 | 15 | } |
| 15 | 16 | |
| 17 | +DLL_EXPORT | |
| 16 | 18 | void |
| 17 | 19 | BitWriter::writeBits(unsigned long val, int bits) |
| 18 | 20 | { |
| 19 | 21 | write_bits(this->ch, this->bit_offset, val, bits, this->pl); |
| 20 | 22 | } |
| 21 | 23 | |
| 24 | +DLL_EXPORT | |
| 22 | 25 | void |
| 23 | 26 | BitWriter::flush() |
| 24 | 27 | { | ... | ... |
libqpdf/MD5.cc
| ... | ... | @@ -295,16 +295,19 @@ void MD5::decode(UINT4 *output, unsigned char *input, unsigned int len) |
| 295 | 295 | |
| 296 | 296 | // Public functions |
| 297 | 297 | |
| 298 | +DLL_EXPORT | |
| 298 | 299 | MD5::MD5() |
| 299 | 300 | { |
| 300 | 301 | init(); |
| 301 | 302 | } |
| 302 | 303 | |
| 304 | +DLL_EXPORT | |
| 303 | 305 | void MD5::reset() |
| 304 | 306 | { |
| 305 | 307 | init(); |
| 306 | 308 | } |
| 307 | 309 | |
| 310 | +DLL_EXPORT | |
| 308 | 311 | void MD5::encodeString(char const* str) |
| 309 | 312 | { |
| 310 | 313 | unsigned int len = strlen(str); |
| ... | ... | @@ -313,16 +316,19 @@ void MD5::encodeString(char const* str) |
| 313 | 316 | final(); |
| 314 | 317 | } |
| 315 | 318 | |
| 319 | +DLL_EXPORT | |
| 316 | 320 | void MD5::appendString(char const* input_string) |
| 317 | 321 | { |
| 318 | 322 | update((unsigned char *)input_string, strlen(input_string)); |
| 319 | 323 | } |
| 320 | 324 | |
| 325 | +DLL_EXPORT | |
| 321 | 326 | void MD5::encodeDataIncrementally(char const* data, int len) |
| 322 | 327 | { |
| 323 | 328 | update((unsigned char *)data, len); |
| 324 | 329 | } |
| 325 | 330 | |
| 331 | +DLL_EXPORT | |
| 326 | 332 | void MD5::encodeFile(char const *filename, int up_to_size) |
| 327 | 333 | throw (QEXC::System) |
| 328 | 334 | { |
| ... | ... | @@ -366,12 +372,14 @@ void MD5::encodeFile(char const *filename, int up_to_size) |
| 366 | 372 | final(); |
| 367 | 373 | } |
| 368 | 374 | |
| 375 | +DLL_EXPORT | |
| 369 | 376 | void MD5::digest(Digest result) |
| 370 | 377 | { |
| 371 | 378 | final(); |
| 372 | 379 | memcpy(result, digest_val, sizeof(digest_val)); |
| 373 | 380 | } |
| 374 | 381 | |
| 382 | +DLL_EXPORT | |
| 375 | 383 | void MD5::print() |
| 376 | 384 | { |
| 377 | 385 | final(); |
| ... | ... | @@ -384,6 +392,7 @@ void MD5::print() |
| 384 | 392 | printf("\n"); |
| 385 | 393 | } |
| 386 | 394 | |
| 395 | +DLL_EXPORT | |
| 387 | 396 | std::string MD5::unparse() |
| 388 | 397 | { |
| 389 | 398 | final(); |
| ... | ... | @@ -399,6 +408,7 @@ std::string MD5::unparse() |
| 399 | 408 | return result; |
| 400 | 409 | } |
| 401 | 410 | |
| 411 | +DLL_EXPORT | |
| 402 | 412 | std::string |
| 403 | 413 | MD5::getDataChecksum(char const* buf, int len) |
| 404 | 414 | { |
| ... | ... | @@ -407,6 +417,7 @@ MD5::getDataChecksum(char const* buf, int len) |
| 407 | 417 | return m.unparse(); |
| 408 | 418 | } |
| 409 | 419 | |
| 420 | +DLL_EXPORT | |
| 410 | 421 | std::string |
| 411 | 422 | MD5::getFileChecksum(char const* filename, int up_to_size) |
| 412 | 423 | { |
| ... | ... | @@ -415,6 +426,7 @@ MD5::getFileChecksum(char const* filename, int up_to_size) |
| 415 | 426 | return m.unparse(); |
| 416 | 427 | } |
| 417 | 428 | |
| 429 | +DLL_EXPORT | |
| 418 | 430 | bool |
| 419 | 431 | MD5::checkDataChecksum(char const* const checksum, |
| 420 | 432 | char const* buf, int len) |
| ... | ... | @@ -423,6 +435,7 @@ MD5::checkDataChecksum(char const* const checksum, |
| 423 | 435 | return (checksum == actual_checksum); |
| 424 | 436 | } |
| 425 | 437 | |
| 438 | +DLL_EXPORT | |
| 426 | 439 | bool |
| 427 | 440 | MD5::checkFileChecksum(char const* const checksum, |
| 428 | 441 | char const* filename, int up_to_size) | ... | ... |
libqpdf/PCRE.cc
| ... | ... | @@ -5,31 +5,37 @@ |
| 5 | 5 | #include <iostream> |
| 6 | 6 | #include <string.h> |
| 7 | 7 | |
| 8 | +DLL_EXPORT | |
| 8 | 9 | PCRE::Exception::Exception(std::string const& message) |
| 9 | 10 | { |
| 10 | 11 | this->setMessage("PCRE error: " + message); |
| 11 | 12 | } |
| 12 | 13 | |
| 14 | +DLL_EXPORT | |
| 13 | 15 | PCRE::NoBackref::NoBackref() : |
| 14 | 16 | Exception("no match") |
| 15 | 17 | { |
| 16 | 18 | } |
| 17 | 19 | |
| 20 | +DLL_EXPORT | |
| 18 | 21 | PCRE::Match::Match(int nbackrefs, char const* subject) |
| 19 | 22 | { |
| 20 | 23 | this->init(-1, nbackrefs, subject); |
| 21 | 24 | } |
| 22 | 25 | |
| 26 | +DLL_EXPORT | |
| 23 | 27 | PCRE::Match::~Match() |
| 24 | 28 | { |
| 25 | 29 | this->destroy(); |
| 26 | 30 | } |
| 27 | 31 | |
| 32 | +DLL_EXPORT | |
| 28 | 33 | PCRE::Match::Match(Match const& rhs) |
| 29 | 34 | { |
| 30 | 35 | this->copy(rhs); |
| 31 | 36 | } |
| 32 | 37 | |
| 38 | +DLL_EXPORT | |
| 33 | 39 | PCRE::Match& |
| 34 | 40 | PCRE::Match::operator=(Match const& rhs) |
| 35 | 41 | { |
| ... | ... | @@ -72,12 +78,13 @@ PCRE::Match::destroy() |
| 72 | 78 | delete [] this->ovector; |
| 73 | 79 | } |
| 74 | 80 | |
| 81 | +DLL_EXPORT | |
| 75 | 82 | PCRE::Match::operator bool() |
| 76 | 83 | { |
| 77 | 84 | return (this->nmatches >= 0); |
| 78 | 85 | } |
| 79 | 86 | |
| 80 | - | |
| 87 | +DLL_EXPORT | |
| 81 | 88 | std::string |
| 82 | 89 | PCRE::Match::getMatch(int n, int flags) |
| 83 | 90 | throw(QEXC::General, Exception) |
| ... | ... | @@ -107,6 +114,7 @@ PCRE::Match::getMatch(int n, int flags) |
| 107 | 114 | return std::string(this->subject).substr(offset, length); |
| 108 | 115 | } |
| 109 | 116 | |
| 117 | +DLL_EXPORT | |
| 110 | 118 | void |
| 111 | 119 | PCRE::Match::getOffsetLength(int n, int& offset, int& length) throw(Exception) |
| 112 | 120 | { |
| ... | ... | @@ -120,7 +128,7 @@ PCRE::Match::getOffsetLength(int n, int& offset, int& length) throw(Exception) |
| 120 | 128 | length = this->ovector[n * 2 + 1] - offset; |
| 121 | 129 | } |
| 122 | 130 | |
| 123 | - | |
| 131 | +DLL_EXPORT | |
| 124 | 132 | int |
| 125 | 133 | PCRE::Match::getOffset(int n) throw(Exception) |
| 126 | 134 | { |
| ... | ... | @@ -130,7 +138,7 @@ PCRE::Match::getOffset(int n) throw(Exception) |
| 130 | 138 | return offset; |
| 131 | 139 | } |
| 132 | 140 | |
| 133 | - | |
| 141 | +DLL_EXPORT | |
| 134 | 142 | int |
| 135 | 143 | PCRE::Match::getLength(int n) throw(Exception) |
| 136 | 144 | { |
| ... | ... | @@ -140,13 +148,14 @@ PCRE::Match::getLength(int n) throw(Exception) |
| 140 | 148 | return length; |
| 141 | 149 | } |
| 142 | 150 | |
| 143 | - | |
| 151 | +DLL_EXPORT | |
| 144 | 152 | int |
| 145 | 153 | PCRE::Match::nMatches() const |
| 146 | 154 | { |
| 147 | 155 | return this->nmatches; |
| 148 | 156 | } |
| 149 | 157 | |
| 158 | +DLL_EXPORT | |
| 150 | 159 | PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception) |
| 151 | 160 | { |
| 152 | 161 | char const *errptr; |
| ... | ... | @@ -166,11 +175,13 @@ PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception) |
| 166 | 175 | } |
| 167 | 176 | } |
| 168 | 177 | |
| 178 | +DLL_EXPORT | |
| 169 | 179 | PCRE::~PCRE() |
| 170 | 180 | { |
| 171 | 181 | pcre_free(this->code); |
| 172 | 182 | } |
| 173 | 183 | |
| 184 | +DLL_EXPORT | |
| 174 | 185 | PCRE::Match |
| 175 | 186 | PCRE::match(char const* subject, int options, int startoffset, int size) |
| 176 | 187 | throw (QEXC::General, Exception) |
| ... | ... | @@ -219,6 +230,7 @@ PCRE::match(char const* subject, int options, int startoffset, int size) |
| 219 | 230 | return result; |
| 220 | 231 | } |
| 221 | 232 | |
| 233 | +DLL_EXPORT | |
| 222 | 234 | void |
| 223 | 235 | PCRE::test(int n) |
| 224 | 236 | { | ... | ... |
libqpdf/Pl_ASCIIHexDecoder.cc
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | #include <string.h> |
| 5 | 5 | #include <ctype.h> |
| 6 | 6 | |
| 7 | +DLL_EXPORT | |
| 7 | 8 | Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : |
| 8 | 9 | Pipeline(identifier, next), |
| 9 | 10 | pos(0), |
| ... | ... | @@ -12,10 +13,12 @@ Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : |
| 12 | 13 | strcpy(this->inbuf, "00"); |
| 13 | 14 | } |
| 14 | 15 | |
| 16 | +DLL_EXPORT | |
| 15 | 17 | Pl_ASCIIHexDecoder::~Pl_ASCIIHexDecoder() |
| 16 | 18 | { |
| 17 | 19 | } |
| 18 | 20 | |
| 21 | +DLL_EXPORT | |
| 19 | 22 | void |
| 20 | 23 | Pl_ASCIIHexDecoder::write(unsigned char* buf, int len) |
| 21 | 24 | { |
| ... | ... | @@ -100,6 +103,7 @@ Pl_ASCIIHexDecoder::flush() |
| 100 | 103 | strcpy(this->inbuf, "00"); |
| 101 | 104 | } |
| 102 | 105 | |
| 106 | +DLL_EXPORT | |
| 103 | 107 | void |
| 104 | 108 | Pl_ASCIIHexDecoder::finish() |
| 105 | 109 | { | ... | ... |
libqpdf/Pl_Buffer.cc
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | #include <assert.h> |
| 5 | 5 | #include <string.h> |
| 6 | 6 | |
| 7 | +DLL_EXPORT | |
| 7 | 8 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : |
| 8 | 9 | Pipeline(identifier, next), |
| 9 | 10 | ready(false), |
| ... | ... | @@ -11,10 +12,12 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : |
| 11 | 12 | { |
| 12 | 13 | } |
| 13 | 14 | |
| 15 | +DLL_EXPORT | |
| 14 | 16 | Pl_Buffer::~Pl_Buffer() |
| 15 | 17 | { |
| 16 | 18 | } |
| 17 | 19 | |
| 20 | +DLL_EXPORT | |
| 18 | 21 | void |
| 19 | 22 | Pl_Buffer::write(unsigned char* buf, int len) |
| 20 | 23 | { |
| ... | ... | @@ -30,6 +33,7 @@ Pl_Buffer::write(unsigned char* buf, int len) |
| 30 | 33 | } |
| 31 | 34 | } |
| 32 | 35 | |
| 36 | +DLL_EXPORT | |
| 33 | 37 | void |
| 34 | 38 | Pl_Buffer::finish() |
| 35 | 39 | { |
| ... | ... | @@ -40,6 +44,7 @@ Pl_Buffer::finish() |
| 40 | 44 | } |
| 41 | 45 | } |
| 42 | 46 | |
| 47 | +DLL_EXPORT | |
| 43 | 48 | Buffer* |
| 44 | 49 | Pl_Buffer::getBuffer() |
| 45 | 50 | { | ... | ... |
libqpdf/Pl_LZWDecoder.cc
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | #include <string.h> |
| 6 | 6 | #include <assert.h> |
| 7 | 7 | |
| 8 | +DLL_EXPORT | |
| 8 | 9 | Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, |
| 9 | 10 | bool early_code_change) : |
| 10 | 11 | Pipeline(identifier, next), |
| ... | ... | @@ -20,11 +21,12 @@ Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, |
| 20 | 21 | memset(buf, 0, 3); |
| 21 | 22 | } |
| 22 | 23 | |
| 23 | - | |
| 24 | +DLL_EXPORT | |
| 24 | 25 | Pl_LZWDecoder::~Pl_LZWDecoder() |
| 25 | 26 | { |
| 26 | 27 | } |
| 27 | 28 | |
| 29 | +DLL_EXPORT | |
| 28 | 30 | void |
| 29 | 31 | Pl_LZWDecoder::write(unsigned char* bytes, int len) |
| 30 | 32 | { |
| ... | ... | @@ -43,6 +45,7 @@ Pl_LZWDecoder::write(unsigned char* bytes, int len) |
| 43 | 45 | } |
| 44 | 46 | } |
| 45 | 47 | |
| 48 | +DLL_EXPORT | |
| 46 | 49 | void |
| 47 | 50 | Pl_LZWDecoder::finish() |
| 48 | 51 | { | ... | ... |
libqpdf/Pl_MD5.cc
| ... | ... | @@ -3,16 +3,19 @@ |
| 3 | 3 | |
| 4 | 4 | #include <qpdf/QEXC.hh> |
| 5 | 5 | |
| 6 | +DLL_EXPORT | |
| 6 | 7 | Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) : |
| 7 | 8 | Pipeline(identifier, next), |
| 8 | 9 | in_progress(false) |
| 9 | 10 | { |
| 10 | 11 | } |
| 11 | 12 | |
| 13 | +DLL_EXPORT | |
| 12 | 14 | Pl_MD5::~Pl_MD5() |
| 13 | 15 | { |
| 14 | 16 | } |
| 15 | 17 | |
| 18 | +DLL_EXPORT | |
| 16 | 19 | void |
| 17 | 20 | Pl_MD5::write(unsigned char* buf, int len) |
| 18 | 21 | { |
| ... | ... | @@ -25,6 +28,7 @@ Pl_MD5::write(unsigned char* buf, int len) |
| 25 | 28 | this->getNext()->write(buf, len); |
| 26 | 29 | } |
| 27 | 30 | |
| 31 | +DLL_EXPORT | |
| 28 | 32 | void |
| 29 | 33 | Pl_MD5::finish() |
| 30 | 34 | { |
| ... | ... | @@ -32,6 +36,7 @@ Pl_MD5::finish() |
| 32 | 36 | this->in_progress = false; |
| 33 | 37 | } |
| 34 | 38 | |
| 39 | +DLL_EXPORT | |
| 35 | 40 | std::string |
| 36 | 41 | Pl_MD5::getHexDigest() |
| 37 | 42 | { | ... | ... |
libqpdf/Pl_PNGFilter.cc
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | #include <qpdf/Pl_PNGFilter.hh> |
| 3 | 3 | #include <string.h> |
| 4 | 4 | |
| 5 | +DLL_EXPORT | |
| 5 | 6 | Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, |
| 6 | 7 | action_e action, unsigned int columns, |
| 7 | 8 | unsigned int bytes_per_pixel) : |
| ... | ... | @@ -22,12 +23,14 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, |
| 22 | 23 | this->incoming = (action == a_encode ? columns : columns + 1); |
| 23 | 24 | } |
| 24 | 25 | |
| 26 | +DLL_EXPORT | |
| 25 | 27 | Pl_PNGFilter::~Pl_PNGFilter() |
| 26 | 28 | { |
| 27 | 29 | delete [] buf1; |
| 28 | 30 | delete [] buf2; |
| 29 | 31 | } |
| 30 | 32 | |
| 33 | +DLL_EXPORT | |
| 31 | 34 | void |
| 32 | 35 | Pl_PNGFilter::write(unsigned char* data, int len) |
| 33 | 36 | { |
| ... | ... | @@ -129,6 +132,7 @@ Pl_PNGFilter::encodeRow() |
| 129 | 132 | } |
| 130 | 133 | } |
| 131 | 134 | |
| 135 | +DLL_EXPORT | |
| 132 | 136 | void |
| 133 | 137 | Pl_PNGFilter::finish() |
| 134 | 138 | { | ... | ... |
libqpdf/Pl_RC4.cc
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | |
| 4 | 4 | #include <qpdf/QUtil.hh> |
| 5 | 5 | |
| 6 | +DLL_EXPORT | |
| 6 | 7 | Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, |
| 7 | 8 | unsigned char const* key_data, int key_len, |
| 8 | 9 | int out_bufsize) : |
| ... | ... | @@ -13,6 +14,7 @@ Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, |
| 13 | 14 | this->outbuf = new unsigned char[out_bufsize]; |
| 14 | 15 | } |
| 15 | 16 | |
| 17 | +DLL_EXPORT | |
| 16 | 18 | Pl_RC4::~Pl_RC4() |
| 17 | 19 | { |
| 18 | 20 | if (this->outbuf) |
| ... | ... | @@ -22,6 +24,7 @@ Pl_RC4::~Pl_RC4() |
| 22 | 24 | } |
| 23 | 25 | } |
| 24 | 26 | |
| 27 | +DLL_EXPORT | |
| 25 | 28 | void |
| 26 | 29 | Pl_RC4::write(unsigned char* data, int len) |
| 27 | 30 | { |
| ... | ... | @@ -45,6 +48,7 @@ Pl_RC4::write(unsigned char* data, int len) |
| 45 | 48 | } |
| 46 | 49 | } |
| 47 | 50 | |
| 51 | +DLL_EXPORT | |
| 48 | 52 | void |
| 49 | 53 | Pl_RC4::finish() |
| 50 | 54 | { | ... | ... |
libqpdf/qpdf/BitStream.hh
libqpdf/qpdf/BitWriter.hh
| ... | ... | @@ -10,9 +10,12 @@ class BitWriter |
| 10 | 10 | public: |
| 11 | 11 | // Write bits to the pipeline. It is the caller's responsibility |
| 12 | 12 | // to eventually call finish on the pipeline. |
| 13 | + DLL_EXPORT | |
| 13 | 14 | BitWriter(Pipeline* pl); |
| 15 | + DLL_EXPORT | |
| 14 | 16 | void writeBits(unsigned long val, int bits); |
| 15 | 17 | // Force any partial byte to be written to the pipeline. |
| 18 | + DLL_EXPORT | |
| 16 | 19 | void flush(); |
| 17 | 20 | |
| 18 | 21 | private: | ... | ... |
libqpdf/qpdf/MD5.hh
| ... | ... | @@ -14,37 +14,50 @@ class MD5 |
| 14 | 14 | public: |
| 15 | 15 | typedef unsigned char Digest[16]; |
| 16 | 16 | |
| 17 | + DLL_EXPORT | |
| 17 | 18 | MD5(); |
| 19 | + DLL_EXPORT | |
| 18 | 20 | void reset(); |
| 19 | 21 | |
| 20 | 22 | // encodes string and finalizes |
| 23 | + DLL_EXPORT | |
| 21 | 24 | void encodeString(char const* input_string); |
| 22 | 25 | |
| 23 | 26 | // encodes file and finalizes |
| 27 | + DLL_EXPORT | |
| 24 | 28 | void encodeFile(char const* filename, int up_to_size = -1) |
| 25 | 29 | throw(QEXC::System); |
| 26 | 30 | |
| 27 | 31 | // appends string to current md5 object |
| 32 | + DLL_EXPORT | |
| 28 | 33 | void appendString(char const* input_string); |
| 29 | 34 | |
| 30 | 35 | // appends arbitrary data to current md5 object |
| 36 | + DLL_EXPORT | |
| 31 | 37 | void encodeDataIncrementally(char const* input_data, int len); |
| 32 | 38 | |
| 33 | 39 | // computes a raw digest |
| 40 | + DLL_EXPORT | |
| 34 | 41 | void digest(Digest); |
| 35 | 42 | |
| 36 | 43 | // prints the digest to stdout terminated with \r\n (primarily for |
| 37 | 44 | // testing) |
| 45 | + DLL_EXPORT | |
| 38 | 46 | void print(); |
| 39 | 47 | |
| 40 | 48 | // returns the digest as a hexadecimal string |
| 49 | + DLL_EXPORT | |
| 41 | 50 | std::string unparse(); |
| 42 | 51 | |
| 43 | 52 | // Convenience functions |
| 53 | + DLL_EXPORT | |
| 44 | 54 | static std::string getDataChecksum(char const* buf, int len); |
| 55 | + DLL_EXPORT | |
| 45 | 56 | static std::string getFileChecksum(char const* filename, int up_to_size = -1); |
| 57 | + DLL_EXPORT | |
| 46 | 58 | static bool checkDataChecksum(char const* const checksum, |
| 47 | 59 | char const* buf, int len); |
| 60 | + DLL_EXPORT | |
| 48 | 61 | static bool checkFileChecksum(char const* const checksum, |
| 49 | 62 | char const* filename, int up_to_size = -1); |
| 50 | 63 | ... | ... |
libqpdf/qpdf/PCRE.hh
| ... | ... | @@ -22,7 +22,9 @@ class PCRE |
| 22 | 22 | class Exception: public QEXC::General |
| 23 | 23 | { |
| 24 | 24 | public: |
| 25 | + DLL_EXPORT | |
| 25 | 26 | Exception(std::string const& message); |
| 27 | + DLL_EXPORT | |
| 26 | 28 | virtual ~Exception() throw() {} |
| 27 | 29 | }; |
| 28 | 30 | |
| ... | ... | @@ -31,7 +33,9 @@ class PCRE |
| 31 | 33 | class NoBackref: public Exception |
| 32 | 34 | { |
| 33 | 35 | public: |
| 36 | + DLL_EXPORT | |
| 34 | 37 | NoBackref(); |
| 38 | + DLL_EXPORT | |
| 35 | 39 | virtual ~NoBackref() throw() {} |
| 36 | 40 | }; |
| 37 | 41 | |
| ... | ... | @@ -39,10 +43,15 @@ class PCRE |
| 39 | 43 | { |
| 40 | 44 | friend class PCRE; |
| 41 | 45 | public: |
| 46 | + DLL_EXPORT | |
| 42 | 47 | Match(int nbackrefs, char const* subject); |
| 48 | + DLL_EXPORT | |
| 43 | 49 | Match(Match const&); |
| 50 | + DLL_EXPORT | |
| 44 | 51 | Match& operator=(Match const&); |
| 52 | + DLL_EXPORT | |
| 45 | 53 | ~Match(); |
| 54 | + DLL_EXPORT | |
| 46 | 55 | operator bool(); |
| 47 | 56 | |
| 48 | 57 | // All the back reference accessing routines may throw the |
| ... | ... | @@ -54,10 +63,14 @@ class PCRE |
| 54 | 63 | // and not matching at all. |
| 55 | 64 | |
| 56 | 65 | // see getMatch flags below |
| 66 | + DLL_EXPORT | |
| 57 | 67 | std::string getMatch(int n, int flags = 0) |
| 58 | 68 | throw(QEXC::General, Exception); |
| 69 | + DLL_EXPORT | |
| 59 | 70 | void getOffsetLength(int n, int& offset, int& length) throw(Exception); |
| 71 | + DLL_EXPORT | |
| 60 | 72 | int getOffset(int n) throw(Exception); |
| 73 | + DLL_EXPORT | |
| 61 | 74 | int getLength(int n) throw(Exception); |
| 62 | 75 | |
| 63 | 76 | // nMatches returns the number of available matches including |
| ... | ... | @@ -67,6 +80,7 @@ class PCRE |
| 67 | 80 | // will return the whole string, getMatch(1) will return the |
| 68 | 81 | // text that matched the backreference, and getMatch(2) will |
| 69 | 82 | // throw an exception because it is out of range. |
| 83 | + DLL_EXPORT | |
| 70 | 84 | int nMatches() const; |
| 71 | 85 | |
| 72 | 86 | // Flags for getMatch |
| ... | ... | @@ -89,13 +103,17 @@ class PCRE |
| 89 | 103 | |
| 90 | 104 | // The value passed in as options is passed to pcre_exec. See man |
| 91 | 105 | // pcreapi for details. |
| 106 | + DLL_EXPORT | |
| 92 | 107 | PCRE(char const* pattern, int options = 0) throw(Exception); |
| 108 | + DLL_EXPORT | |
| 93 | 109 | ~PCRE(); |
| 94 | 110 | |
| 111 | + DLL_EXPORT | |
| 95 | 112 | Match match(char const* subject, int options = 0, int startoffset = 0, |
| 96 | 113 | int size = -1) |
| 97 | 114 | throw(QEXC::General, Exception); |
| 98 | 115 | |
| 116 | + DLL_EXPORT | |
| 99 | 117 | static void test(int n = 0); |
| 100 | 118 | |
| 101 | 119 | private: | ... | ... |
libqpdf/qpdf/Pl_ASCIIHexDecoder.hh
| ... | ... | @@ -7,9 +7,13 @@ |
| 7 | 7 | class Pl_ASCIIHexDecoder: public Pipeline |
| 8 | 8 | { |
| 9 | 9 | public: |
| 10 | + DLL_EXPORT | |
| 10 | 11 | Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); |
| 12 | + DLL_EXPORT | |
| 11 | 13 | virtual ~Pl_ASCIIHexDecoder(); |
| 14 | + DLL_EXPORT | |
| 12 | 15 | virtual void write(unsigned char* buf, int len); |
| 16 | + DLL_EXPORT | |
| 13 | 17 | virtual void finish(); |
| 14 | 18 | |
| 15 | 19 | private: | ... | ... |
libqpdf/qpdf/Pl_LZWDecoder.hh
| ... | ... | @@ -10,10 +10,14 @@ |
| 10 | 10 | class Pl_LZWDecoder: public Pipeline |
| 11 | 11 | { |
| 12 | 12 | public: |
| 13 | + DLL_EXPORT | |
| 13 | 14 | Pl_LZWDecoder(char const* identifier, Pipeline* next, |
| 14 | 15 | bool early_code_change); |
| 16 | + DLL_EXPORT | |
| 15 | 17 | virtual ~Pl_LZWDecoder(); |
| 18 | + DLL_EXPORT | |
| 16 | 19 | virtual void write(unsigned char* buf, int len); |
| 20 | + DLL_EXPORT | |
| 17 | 21 | virtual void finish(); |
| 18 | 22 | |
| 19 | 23 | private: | ... | ... |
libqpdf/qpdf/Pl_MD5.hh
| ... | ... | @@ -16,10 +16,15 @@ |
| 16 | 16 | class Pl_MD5: public Pipeline |
| 17 | 17 | { |
| 18 | 18 | public: |
| 19 | + DLL_EXPORT | |
| 19 | 20 | Pl_MD5(char const* identifier, Pipeline* next); |
| 21 | + DLL_EXPORT | |
| 20 | 22 | virtual ~Pl_MD5(); |
| 23 | + DLL_EXPORT | |
| 21 | 24 | virtual void write(unsigned char*, int); |
| 25 | + DLL_EXPORT | |
| 22 | 26 | virtual void finish(); |
| 27 | + DLL_EXPORT | |
| 23 | 28 | std::string getHexDigest(); |
| 24 | 29 | |
| 25 | 30 | private: | ... | ... |
libqpdf/qpdf/Pl_PNGFilter.hh
| 1 | - | |
| 2 | 1 | #ifndef __PL_PNGFILTER_HH__ |
| 3 | 2 | #define __PL_PNGFILTER_HH__ |
| 4 | 3 | |
| ... | ... | @@ -23,11 +22,13 @@ class Pl_PNGFilter: public Pipeline |
| 23 | 22 | class Exception: public Pipeline::Exception |
| 24 | 23 | { |
| 25 | 24 | public: |
| 25 | + DLL_EXPORT | |
| 26 | 26 | Exception(std::string const& message) : |
| 27 | 27 | Pipeline::Exception(message) |
| 28 | 28 | { |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + DLL_EXPORT | |
| 31 | 32 | virtual ~Exception() throw () |
| 32 | 33 | { |
| 33 | 34 | } |
| ... | ... | @@ -36,12 +37,16 @@ class Pl_PNGFilter: public Pipeline |
| 36 | 37 | // Encoding is not presently supported |
| 37 | 38 | enum action_e { a_encode, a_decode }; |
| 38 | 39 | |
| 40 | + DLL_EXPORT | |
| 39 | 41 | Pl_PNGFilter(char const* identifier, Pipeline* next, |
| 40 | 42 | action_e action, unsigned int columns, |
| 41 | 43 | unsigned int bytes_per_pixel); |
| 44 | + DLL_EXPORT | |
| 42 | 45 | virtual ~Pl_PNGFilter(); |
| 43 | 46 | |
| 47 | + DLL_EXPORT | |
| 44 | 48 | virtual void write(unsigned char* data, int len); |
| 49 | + DLL_EXPORT | |
| 45 | 50 | virtual void finish(); |
| 46 | 51 | |
| 47 | 52 | private: | ... | ... |
libqpdf/qpdf/Pl_RC4.hh
| ... | ... | @@ -12,11 +12,13 @@ class Pl_RC4: public Pipeline |
| 12 | 12 | class Exception: public Pipeline::Exception |
| 13 | 13 | { |
| 14 | 14 | public: |
| 15 | + DLL_EXPORT | |
| 15 | 16 | Exception(std::string const& message) : |
| 16 | 17 | Pipeline::Exception(message) |
| 17 | 18 | { |
| 18 | 19 | } |
| 19 | 20 | |
| 21 | + DLL_EXPORT | |
| 20 | 22 | virtual ~Exception() throw() |
| 21 | 23 | { |
| 22 | 24 | } |
| ... | ... | @@ -25,12 +27,16 @@ class Pl_RC4: public Pipeline |
| 25 | 27 | static int const def_bufsize = 65536; |
| 26 | 28 | |
| 27 | 29 | // key_len of -1 means treat key_data as a null-terminated string |
| 30 | + DLL_EXPORT | |
| 28 | 31 | Pl_RC4(char const* identifier, Pipeline* next, |
| 29 | 32 | unsigned char const* key_data, int key_len = -1, |
| 30 | 33 | int out_bufsize = def_bufsize); |
| 34 | + DLL_EXPORT | |
| 31 | 35 | virtual ~Pl_RC4(); |
| 32 | 36 | |
| 37 | + DLL_EXPORT | |
| 33 | 38 | virtual void write(unsigned char* data, int len); |
| 39 | + DLL_EXPORT | |
| 34 | 40 | virtual void finish(); |
| 35 | 41 | |
| 36 | 42 | private: | ... | ... |