Commit 492db82f6f698e5dcf7ff51dab5fccc79378906c

Authored by Jay Berkenbilt
1 parent b6af616d

more dll exports

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