2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-03 07:12:28 +00:00

more dll exports

git-svn-id: svn+q:///qpdf/trunk@697 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-09-26 15:15:33 +00:00
parent b6af616dea
commit 492db82f6f
20 changed files with 130 additions and 6 deletions

View File

@ -27,14 +27,19 @@
class Pl_Buffer: public Pipeline class Pl_Buffer: public Pipeline
{ {
public: public:
DLL_EXPORT
Pl_Buffer(char const* identifier, Pipeline* next = 0); Pl_Buffer(char const* identifier, Pipeline* next = 0);
DLL_EXPORT
virtual ~Pl_Buffer(); virtual ~Pl_Buffer();
DLL_EXPORT
virtual void write(unsigned char*, int); virtual void write(unsigned char*, int);
DLL_EXPORT
virtual void finish(); virtual void finish();
// Each call to getBuffer() resets this object -- see notes above. // Each call to getBuffer() resets this object -- see notes above.
// The caller is responsible for deleting the returned Buffer // The caller is responsible for deleting the returned Buffer
// object. // object.
DLL_EXPORT
Buffer* getBuffer(); Buffer* getBuffer();
private: private:

View File

@ -6,6 +6,7 @@
#define BITS_READ 1 #define BITS_READ 1
#include "bits.icc" #include "bits.icc"
DLL_EXPORT
BitStream::BitStream(unsigned char const* p, int nbytes) : BitStream::BitStream(unsigned char const* p, int nbytes) :
start(p), start(p),
nbytes(nbytes) nbytes(nbytes)
@ -13,6 +14,7 @@ BitStream::BitStream(unsigned char const* p, int nbytes) :
reset(); reset();
} }
DLL_EXPORT
void void
BitStream::reset() BitStream::reset()
{ {
@ -21,6 +23,7 @@ BitStream::reset()
bits_available = 8 * nbytes; bits_available = 8 * nbytes;
} }
DLL_EXPORT
unsigned long unsigned long
BitStream::getBits(int nbits) BitStream::getBits(int nbits)
{ {
@ -28,6 +31,7 @@ BitStream::getBits(int nbits)
this->bits_available, nbits); this->bits_available, nbits);
} }
DLL_EXPORT
void void
BitStream::skipToNextByte() BitStream::skipToNextByte()
{ {

View File

@ -6,6 +6,7 @@
#define BITS_WRITE 1 #define BITS_WRITE 1
#include "bits.icc" #include "bits.icc"
DLL_EXPORT
BitWriter::BitWriter(Pipeline* pl) : BitWriter::BitWriter(Pipeline* pl) :
pl(pl), pl(pl),
ch(0), ch(0),
@ -13,12 +14,14 @@ BitWriter::BitWriter(Pipeline* pl) :
{ {
} }
DLL_EXPORT
void void
BitWriter::writeBits(unsigned long val, int bits) BitWriter::writeBits(unsigned long val, int bits)
{ {
write_bits(this->ch, this->bit_offset, val, bits, this->pl); write_bits(this->ch, this->bit_offset, val, bits, this->pl);
} }
DLL_EXPORT
void void
BitWriter::flush() BitWriter::flush()
{ {

View File

@ -295,16 +295,19 @@ void MD5::decode(UINT4 *output, unsigned char *input, unsigned int len)
// Public functions // Public functions
DLL_EXPORT
MD5::MD5() MD5::MD5()
{ {
init(); init();
} }
DLL_EXPORT
void MD5::reset() void MD5::reset()
{ {
init(); init();
} }
DLL_EXPORT
void MD5::encodeString(char const* str) void MD5::encodeString(char const* str)
{ {
unsigned int len = strlen(str); unsigned int len = strlen(str);
@ -313,16 +316,19 @@ void MD5::encodeString(char const* str)
final(); final();
} }
DLL_EXPORT
void MD5::appendString(char const* input_string) void MD5::appendString(char const* input_string)
{ {
update((unsigned char *)input_string, strlen(input_string)); update((unsigned char *)input_string, strlen(input_string));
} }
DLL_EXPORT
void MD5::encodeDataIncrementally(char const* data, int len) void MD5::encodeDataIncrementally(char const* data, int len)
{ {
update((unsigned char *)data, len); update((unsigned char *)data, len);
} }
DLL_EXPORT
void MD5::encodeFile(char const *filename, int up_to_size) void MD5::encodeFile(char const *filename, int up_to_size)
throw (QEXC::System) throw (QEXC::System)
{ {
@ -366,12 +372,14 @@ void MD5::encodeFile(char const *filename, int up_to_size)
final(); final();
} }
DLL_EXPORT
void MD5::digest(Digest result) void MD5::digest(Digest result)
{ {
final(); final();
memcpy(result, digest_val, sizeof(digest_val)); memcpy(result, digest_val, sizeof(digest_val));
} }
DLL_EXPORT
void MD5::print() void MD5::print()
{ {
final(); final();
@ -384,6 +392,7 @@ void MD5::print()
printf("\n"); printf("\n");
} }
DLL_EXPORT
std::string MD5::unparse() std::string MD5::unparse()
{ {
final(); final();
@ -399,6 +408,7 @@ std::string MD5::unparse()
return result; return result;
} }
DLL_EXPORT
std::string std::string
MD5::getDataChecksum(char const* buf, int len) MD5::getDataChecksum(char const* buf, int len)
{ {
@ -407,6 +417,7 @@ MD5::getDataChecksum(char const* buf, int len)
return m.unparse(); return m.unparse();
} }
DLL_EXPORT
std::string std::string
MD5::getFileChecksum(char const* filename, int up_to_size) MD5::getFileChecksum(char const* filename, int up_to_size)
{ {
@ -415,6 +426,7 @@ MD5::getFileChecksum(char const* filename, int up_to_size)
return m.unparse(); return m.unparse();
} }
DLL_EXPORT
bool bool
MD5::checkDataChecksum(char const* const checksum, MD5::checkDataChecksum(char const* const checksum,
char const* buf, int len) char const* buf, int len)
@ -423,6 +435,7 @@ MD5::checkDataChecksum(char const* const checksum,
return (checksum == actual_checksum); return (checksum == actual_checksum);
} }
DLL_EXPORT
bool bool
MD5::checkFileChecksum(char const* const checksum, MD5::checkFileChecksum(char const* const checksum,
char const* filename, int up_to_size) char const* filename, int up_to_size)

View File

@ -5,31 +5,37 @@
#include <iostream> #include <iostream>
#include <string.h> #include <string.h>
DLL_EXPORT
PCRE::Exception::Exception(std::string const& message) PCRE::Exception::Exception(std::string const& message)
{ {
this->setMessage("PCRE error: " + message); this->setMessage("PCRE error: " + message);
} }
DLL_EXPORT
PCRE::NoBackref::NoBackref() : PCRE::NoBackref::NoBackref() :
Exception("no match") Exception("no match")
{ {
} }
DLL_EXPORT
PCRE::Match::Match(int nbackrefs, char const* subject) PCRE::Match::Match(int nbackrefs, char const* subject)
{ {
this->init(-1, nbackrefs, subject); this->init(-1, nbackrefs, subject);
} }
DLL_EXPORT
PCRE::Match::~Match() PCRE::Match::~Match()
{ {
this->destroy(); this->destroy();
} }
DLL_EXPORT
PCRE::Match::Match(Match const& rhs) PCRE::Match::Match(Match const& rhs)
{ {
this->copy(rhs); this->copy(rhs);
} }
DLL_EXPORT
PCRE::Match& PCRE::Match&
PCRE::Match::operator=(Match const& rhs) PCRE::Match::operator=(Match const& rhs)
{ {
@ -72,12 +78,13 @@ PCRE::Match::destroy()
delete [] this->ovector; delete [] this->ovector;
} }
DLL_EXPORT
PCRE::Match::operator bool() PCRE::Match::operator bool()
{ {
return (this->nmatches >= 0); return (this->nmatches >= 0);
} }
DLL_EXPORT
std::string std::string
PCRE::Match::getMatch(int n, int flags) PCRE::Match::getMatch(int n, int flags)
throw(QEXC::General, Exception) throw(QEXC::General, Exception)
@ -107,6 +114,7 @@ PCRE::Match::getMatch(int n, int flags)
return std::string(this->subject).substr(offset, length); return std::string(this->subject).substr(offset, length);
} }
DLL_EXPORT
void void
PCRE::Match::getOffsetLength(int n, int& offset, int& length) throw(Exception) PCRE::Match::getOffsetLength(int n, int& offset, int& length) throw(Exception)
{ {
@ -120,7 +128,7 @@ PCRE::Match::getOffsetLength(int n, int& offset, int& length) throw(Exception)
length = this->ovector[n * 2 + 1] - offset; length = this->ovector[n * 2 + 1] - offset;
} }
DLL_EXPORT
int int
PCRE::Match::getOffset(int n) throw(Exception) PCRE::Match::getOffset(int n) throw(Exception)
{ {
@ -130,7 +138,7 @@ PCRE::Match::getOffset(int n) throw(Exception)
return offset; return offset;
} }
DLL_EXPORT
int int
PCRE::Match::getLength(int n) throw(Exception) PCRE::Match::getLength(int n) throw(Exception)
{ {
@ -140,13 +148,14 @@ PCRE::Match::getLength(int n) throw(Exception)
return length; return length;
} }
DLL_EXPORT
int int
PCRE::Match::nMatches() const PCRE::Match::nMatches() const
{ {
return this->nmatches; return this->nmatches;
} }
DLL_EXPORT
PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception) PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception)
{ {
char const *errptr; char const *errptr;
@ -166,11 +175,13 @@ PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception)
} }
} }
DLL_EXPORT
PCRE::~PCRE() PCRE::~PCRE()
{ {
pcre_free(this->code); pcre_free(this->code);
} }
DLL_EXPORT
PCRE::Match PCRE::Match
PCRE::match(char const* subject, int options, int startoffset, int size) PCRE::match(char const* subject, int options, int startoffset, int size)
throw (QEXC::General, Exception) throw (QEXC::General, Exception)
@ -219,6 +230,7 @@ PCRE::match(char const* subject, int options, int startoffset, int size)
return result; return result;
} }
DLL_EXPORT
void void
PCRE::test(int n) PCRE::test(int n)
{ {

View File

@ -4,6 +4,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
DLL_EXPORT
Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) :
Pipeline(identifier, next), Pipeline(identifier, next),
pos(0), pos(0),
@ -12,10 +13,12 @@ Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) :
strcpy(this->inbuf, "00"); strcpy(this->inbuf, "00");
} }
DLL_EXPORT
Pl_ASCIIHexDecoder::~Pl_ASCIIHexDecoder() Pl_ASCIIHexDecoder::~Pl_ASCIIHexDecoder()
{ {
} }
DLL_EXPORT
void void
Pl_ASCIIHexDecoder::write(unsigned char* buf, int len) Pl_ASCIIHexDecoder::write(unsigned char* buf, int len)
{ {
@ -100,6 +103,7 @@ Pl_ASCIIHexDecoder::flush()
strcpy(this->inbuf, "00"); strcpy(this->inbuf, "00");
} }
DLL_EXPORT
void void
Pl_ASCIIHexDecoder::finish() Pl_ASCIIHexDecoder::finish()
{ {

View File

@ -4,6 +4,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
DLL_EXPORT
Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) :
Pipeline(identifier, next), Pipeline(identifier, next),
ready(false), ready(false),
@ -11,10 +12,12 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) :
{ {
} }
DLL_EXPORT
Pl_Buffer::~Pl_Buffer() Pl_Buffer::~Pl_Buffer()
{ {
} }
DLL_EXPORT
void void
Pl_Buffer::write(unsigned char* buf, int len) Pl_Buffer::write(unsigned char* buf, int len)
{ {
@ -30,6 +33,7 @@ Pl_Buffer::write(unsigned char* buf, int len)
} }
} }
DLL_EXPORT
void void
Pl_Buffer::finish() Pl_Buffer::finish()
{ {
@ -40,6 +44,7 @@ Pl_Buffer::finish()
} }
} }
DLL_EXPORT
Buffer* Buffer*
Pl_Buffer::getBuffer() Pl_Buffer::getBuffer()
{ {

View File

@ -5,6 +5,7 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
DLL_EXPORT
Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next, Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next,
bool early_code_change) : bool early_code_change) :
Pipeline(identifier, next), Pipeline(identifier, next),
@ -20,11 +21,12 @@ Pl_LZWDecoder::Pl_LZWDecoder(char const* identifier, Pipeline* next,
memset(buf, 0, 3); memset(buf, 0, 3);
} }
DLL_EXPORT
Pl_LZWDecoder::~Pl_LZWDecoder() Pl_LZWDecoder::~Pl_LZWDecoder()
{ {
} }
DLL_EXPORT
void void
Pl_LZWDecoder::write(unsigned char* bytes, int len) Pl_LZWDecoder::write(unsigned char* bytes, int len)
{ {
@ -43,6 +45,7 @@ Pl_LZWDecoder::write(unsigned char* bytes, int len)
} }
} }
DLL_EXPORT
void void
Pl_LZWDecoder::finish() Pl_LZWDecoder::finish()
{ {

View File

@ -3,16 +3,19 @@
#include <qpdf/QEXC.hh> #include <qpdf/QEXC.hh>
DLL_EXPORT
Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) : Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) :
Pipeline(identifier, next), Pipeline(identifier, next),
in_progress(false) in_progress(false)
{ {
} }
DLL_EXPORT
Pl_MD5::~Pl_MD5() Pl_MD5::~Pl_MD5()
{ {
} }
DLL_EXPORT
void void
Pl_MD5::write(unsigned char* buf, int len) Pl_MD5::write(unsigned char* buf, int len)
{ {
@ -25,6 +28,7 @@ Pl_MD5::write(unsigned char* buf, int len)
this->getNext()->write(buf, len); this->getNext()->write(buf, len);
} }
DLL_EXPORT
void void
Pl_MD5::finish() Pl_MD5::finish()
{ {
@ -32,6 +36,7 @@ Pl_MD5::finish()
this->in_progress = false; this->in_progress = false;
} }
DLL_EXPORT
std::string std::string
Pl_MD5::getHexDigest() Pl_MD5::getHexDigest()
{ {

View File

@ -2,6 +2,7 @@
#include <qpdf/Pl_PNGFilter.hh> #include <qpdf/Pl_PNGFilter.hh>
#include <string.h> #include <string.h>
DLL_EXPORT
Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next, Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next,
action_e action, unsigned int columns, action_e action, unsigned int columns,
unsigned int bytes_per_pixel) : unsigned int bytes_per_pixel) :
@ -22,12 +23,14 @@ Pl_PNGFilter::Pl_PNGFilter(char const* identifier, Pipeline* next,
this->incoming = (action == a_encode ? columns : columns + 1); this->incoming = (action == a_encode ? columns : columns + 1);
} }
DLL_EXPORT
Pl_PNGFilter::~Pl_PNGFilter() Pl_PNGFilter::~Pl_PNGFilter()
{ {
delete [] buf1; delete [] buf1;
delete [] buf2; delete [] buf2;
} }
DLL_EXPORT
void void
Pl_PNGFilter::write(unsigned char* data, int len) Pl_PNGFilter::write(unsigned char* data, int len)
{ {
@ -129,6 +132,7 @@ Pl_PNGFilter::encodeRow()
} }
} }
DLL_EXPORT
void void
Pl_PNGFilter::finish() Pl_PNGFilter::finish()
{ {

View File

@ -3,6 +3,7 @@
#include <qpdf/QUtil.hh> #include <qpdf/QUtil.hh>
DLL_EXPORT
Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next,
unsigned char const* key_data, int key_len, unsigned char const* key_data, int key_len,
int out_bufsize) : int out_bufsize) :
@ -13,6 +14,7 @@ Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next,
this->outbuf = new unsigned char[out_bufsize]; this->outbuf = new unsigned char[out_bufsize];
} }
DLL_EXPORT
Pl_RC4::~Pl_RC4() Pl_RC4::~Pl_RC4()
{ {
if (this->outbuf) if (this->outbuf)
@ -22,6 +24,7 @@ Pl_RC4::~Pl_RC4()
} }
} }
DLL_EXPORT
void void
Pl_RC4::write(unsigned char* data, int len) Pl_RC4::write(unsigned char* data, int len)
{ {
@ -45,6 +48,7 @@ Pl_RC4::write(unsigned char* data, int len)
} }
} }
DLL_EXPORT
void void
Pl_RC4::finish() Pl_RC4::finish()
{ {

View File

@ -6,9 +6,13 @@
class BitStream class BitStream
{ {
public: public:
DLL_EXPORT
BitStream(unsigned char const* p, int nbytes); BitStream(unsigned char const* p, int nbytes);
DLL_EXPORT
void reset(); void reset();
DLL_EXPORT
unsigned long getBits(int nbits); unsigned long getBits(int nbits);
DLL_EXPORT
void skipToNextByte(); void skipToNextByte();
private: private:

View File

@ -10,9 +10,12 @@ class BitWriter
public: public:
// Write bits to the pipeline. It is the caller's responsibility // Write bits to the pipeline. It is the caller's responsibility
// to eventually call finish on the pipeline. // to eventually call finish on the pipeline.
DLL_EXPORT
BitWriter(Pipeline* pl); BitWriter(Pipeline* pl);
DLL_EXPORT
void writeBits(unsigned long val, int bits); void writeBits(unsigned long val, int bits);
// Force any partial byte to be written to the pipeline. // Force any partial byte to be written to the pipeline.
DLL_EXPORT
void flush(); void flush();
private: private:

View File

@ -14,37 +14,50 @@ class MD5
public: public:
typedef unsigned char Digest[16]; typedef unsigned char Digest[16];
DLL_EXPORT
MD5(); MD5();
DLL_EXPORT
void reset(); void reset();
// encodes string and finalizes // encodes string and finalizes
DLL_EXPORT
void encodeString(char const* input_string); void encodeString(char const* input_string);
// encodes file and finalizes // encodes file and finalizes
DLL_EXPORT
void encodeFile(char const* filename, int up_to_size = -1) void encodeFile(char const* filename, int up_to_size = -1)
throw(QEXC::System); throw(QEXC::System);
// appends string to current md5 object // appends string to current md5 object
DLL_EXPORT
void appendString(char const* input_string); void appendString(char const* input_string);
// appends arbitrary data to current md5 object // appends arbitrary data to current md5 object
DLL_EXPORT
void encodeDataIncrementally(char const* input_data, int len); void encodeDataIncrementally(char const* input_data, int len);
// computes a raw digest // computes a raw digest
DLL_EXPORT
void digest(Digest); void digest(Digest);
// prints the digest to stdout terminated with \r\n (primarily for // prints the digest to stdout terminated with \r\n (primarily for
// testing) // testing)
DLL_EXPORT
void print(); void print();
// returns the digest as a hexadecimal string // returns the digest as a hexadecimal string
DLL_EXPORT
std::string unparse(); std::string unparse();
// Convenience functions // Convenience functions
DLL_EXPORT
static std::string getDataChecksum(char const* buf, int len); static std::string getDataChecksum(char const* buf, int len);
DLL_EXPORT
static std::string getFileChecksum(char const* filename, int up_to_size = -1); static std::string getFileChecksum(char const* filename, int up_to_size = -1);
DLL_EXPORT
static bool checkDataChecksum(char const* const checksum, static bool checkDataChecksum(char const* const checksum,
char const* buf, int len); char const* buf, int len);
DLL_EXPORT
static bool checkFileChecksum(char const* const checksum, static bool checkFileChecksum(char const* const checksum,
char const* filename, int up_to_size = -1); char const* filename, int up_to_size = -1);

View File

@ -22,7 +22,9 @@ class PCRE
class Exception: public QEXC::General class Exception: public QEXC::General
{ {
public: public:
DLL_EXPORT
Exception(std::string const& message); Exception(std::string const& message);
DLL_EXPORT
virtual ~Exception() throw() {} virtual ~Exception() throw() {}
}; };
@ -31,7 +33,9 @@ class PCRE
class NoBackref: public Exception class NoBackref: public Exception
{ {
public: public:
DLL_EXPORT
NoBackref(); NoBackref();
DLL_EXPORT
virtual ~NoBackref() throw() {} virtual ~NoBackref() throw() {}
}; };
@ -39,10 +43,15 @@ class PCRE
{ {
friend class PCRE; friend class PCRE;
public: public:
DLL_EXPORT
Match(int nbackrefs, char const* subject); Match(int nbackrefs, char const* subject);
DLL_EXPORT
Match(Match const&); Match(Match const&);
DLL_EXPORT
Match& operator=(Match const&); Match& operator=(Match const&);
DLL_EXPORT
~Match(); ~Match();
DLL_EXPORT
operator bool(); operator bool();
// All the back reference accessing routines may throw the // All the back reference accessing routines may throw the
@ -54,10 +63,14 @@ class PCRE
// and not matching at all. // and not matching at all.
// see getMatch flags below // see getMatch flags below
DLL_EXPORT
std::string getMatch(int n, int flags = 0) std::string getMatch(int n, int flags = 0)
throw(QEXC::General, Exception); throw(QEXC::General, Exception);
DLL_EXPORT
void getOffsetLength(int n, int& offset, int& length) throw(Exception); void getOffsetLength(int n, int& offset, int& length) throw(Exception);
DLL_EXPORT
int getOffset(int n) throw(Exception); int getOffset(int n) throw(Exception);
DLL_EXPORT
int getLength(int n) throw(Exception); int getLength(int n) throw(Exception);
// nMatches returns the number of available matches including // nMatches returns the number of available matches including
@ -67,6 +80,7 @@ class PCRE
// will return the whole string, getMatch(1) will return the // will return the whole string, getMatch(1) will return the
// text that matched the backreference, and getMatch(2) will // text that matched the backreference, and getMatch(2) will
// throw an exception because it is out of range. // throw an exception because it is out of range.
DLL_EXPORT
int nMatches() const; int nMatches() const;
// Flags for getMatch // Flags for getMatch
@ -89,13 +103,17 @@ class PCRE
// The value passed in as options is passed to pcre_exec. See man // The value passed in as options is passed to pcre_exec. See man
// pcreapi for details. // pcreapi for details.
DLL_EXPORT
PCRE(char const* pattern, int options = 0) throw(Exception); PCRE(char const* pattern, int options = 0) throw(Exception);
DLL_EXPORT
~PCRE(); ~PCRE();
DLL_EXPORT
Match match(char const* subject, int options = 0, int startoffset = 0, Match match(char const* subject, int options = 0, int startoffset = 0,
int size = -1) int size = -1)
throw(QEXC::General, Exception); throw(QEXC::General, Exception);
DLL_EXPORT
static void test(int n = 0); static void test(int n = 0);
private: private:

View File

@ -7,9 +7,13 @@
class Pl_ASCIIHexDecoder: public Pipeline class Pl_ASCIIHexDecoder: public Pipeline
{ {
public: public:
DLL_EXPORT
Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next);
DLL_EXPORT
virtual ~Pl_ASCIIHexDecoder(); virtual ~Pl_ASCIIHexDecoder();
DLL_EXPORT
virtual void write(unsigned char* buf, int len); virtual void write(unsigned char* buf, int len);
DLL_EXPORT
virtual void finish(); virtual void finish();
private: private:

View File

@ -10,10 +10,14 @@
class Pl_LZWDecoder: public Pipeline class Pl_LZWDecoder: public Pipeline
{ {
public: public:
DLL_EXPORT
Pl_LZWDecoder(char const* identifier, Pipeline* next, Pl_LZWDecoder(char const* identifier, Pipeline* next,
bool early_code_change); bool early_code_change);
DLL_EXPORT
virtual ~Pl_LZWDecoder(); virtual ~Pl_LZWDecoder();
DLL_EXPORT
virtual void write(unsigned char* buf, int len); virtual void write(unsigned char* buf, int len);
DLL_EXPORT
virtual void finish(); virtual void finish();
private: private:

View File

@ -16,10 +16,15 @@
class Pl_MD5: public Pipeline class Pl_MD5: public Pipeline
{ {
public: public:
DLL_EXPORT
Pl_MD5(char const* identifier, Pipeline* next); Pl_MD5(char const* identifier, Pipeline* next);
DLL_EXPORT
virtual ~Pl_MD5(); virtual ~Pl_MD5();
DLL_EXPORT
virtual void write(unsigned char*, int); virtual void write(unsigned char*, int);
DLL_EXPORT
virtual void finish(); virtual void finish();
DLL_EXPORT
std::string getHexDigest(); std::string getHexDigest();
private: private:

View File

@ -1,4 +1,3 @@
#ifndef __PL_PNGFILTER_HH__ #ifndef __PL_PNGFILTER_HH__
#define __PL_PNGFILTER_HH__ #define __PL_PNGFILTER_HH__
@ -23,11 +22,13 @@ class Pl_PNGFilter: public Pipeline
class Exception: public Pipeline::Exception class Exception: public Pipeline::Exception
{ {
public: public:
DLL_EXPORT
Exception(std::string const& message) : Exception(std::string const& message) :
Pipeline::Exception(message) Pipeline::Exception(message)
{ {
} }
DLL_EXPORT
virtual ~Exception() throw () virtual ~Exception() throw ()
{ {
} }
@ -36,12 +37,16 @@ class Pl_PNGFilter: public Pipeline
// Encoding is not presently supported // Encoding is not presently supported
enum action_e { a_encode, a_decode }; enum action_e { a_encode, a_decode };
DLL_EXPORT
Pl_PNGFilter(char const* identifier, Pipeline* next, Pl_PNGFilter(char const* identifier, Pipeline* next,
action_e action, unsigned int columns, action_e action, unsigned int columns,
unsigned int bytes_per_pixel); unsigned int bytes_per_pixel);
DLL_EXPORT
virtual ~Pl_PNGFilter(); virtual ~Pl_PNGFilter();
DLL_EXPORT
virtual void write(unsigned char* data, int len); virtual void write(unsigned char* data, int len);
DLL_EXPORT
virtual void finish(); virtual void finish();
private: private:

View File

@ -12,11 +12,13 @@ class Pl_RC4: public Pipeline
class Exception: public Pipeline::Exception class Exception: public Pipeline::Exception
{ {
public: public:
DLL_EXPORT
Exception(std::string const& message) : Exception(std::string const& message) :
Pipeline::Exception(message) Pipeline::Exception(message)
{ {
} }
DLL_EXPORT
virtual ~Exception() throw() virtual ~Exception() throw()
{ {
} }
@ -25,12 +27,16 @@ class Pl_RC4: public Pipeline
static int const def_bufsize = 65536; static int const def_bufsize = 65536;
// key_len of -1 means treat key_data as a null-terminated string // key_len of -1 means treat key_data as a null-terminated string
DLL_EXPORT
Pl_RC4(char const* identifier, Pipeline* next, Pl_RC4(char const* identifier, Pipeline* next,
unsigned char const* key_data, int key_len = -1, unsigned char const* key_data, int key_len = -1,
int out_bufsize = def_bufsize); int out_bufsize = def_bufsize);
DLL_EXPORT
virtual ~Pl_RC4(); virtual ~Pl_RC4();
DLL_EXPORT
virtual void write(unsigned char* data, int len); virtual void write(unsigned char* data, int len);
DLL_EXPORT
virtual void finish(); virtual void finish();
private: private: