aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-08-06 21:00:25 +0200
committerJay Berkenbilt <ejb@ql.org>2009-08-06 21:00:25 +0200
commit1e74c03acd39c000103b843d5acd3c0313da443a (patch)
treec603b2c2bb95b46bc129a0c28e6f87c0bd84428a /libqpdf
parented13d9074ef79847a10cfcfca32963c0883a2eb5 (diff)
downloadqpdf-1e74c03acd39c000103b843d5acd3c0313da443a.tar.zst
stick DLL_EXPORT in front of every public method of every public class
git-svn-id: svn+q:///qpdf/trunk@688 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/Buffer.cc8
-rw-r--r--libqpdf/Pipeline.cc2
-rw-r--r--libqpdf/Pl_Count.cc6
-rw-r--r--libqpdf/Pl_Discard.cc4
-rw-r--r--libqpdf/Pl_Flate.cc4
-rw-r--r--libqpdf/Pl_StdioFile.cc4
-rw-r--r--libqpdf/QEXC.cc10
-rw-r--r--libqpdf/QPDF.cc19
-rw-r--r--libqpdf/QPDFExc.cc3
-rw-r--r--libqpdf/QPDFObjectHandle.cc46
-rw-r--r--libqpdf/QPDFTokenizer.cc6
-rw-r--r--libqpdf/QPDFXRefEntry.cc6
-rw-r--r--libqpdf/QPDF_encryption.cc5
-rw-r--r--libqpdf/QPDF_linearization.cc5
-rw-r--r--libqpdf/QPDF_optimization.cc2
-rw-r--r--libqpdf/QTC.cc1
-rw-r--r--libqpdf/QUtil.cc11
17 files changed, 142 insertions, 0 deletions
diff --git a/libqpdf/Buffer.cc b/libqpdf/Buffer.cc
index 3dde1f90..dfed6010 100644
--- a/libqpdf/Buffer.cc
+++ b/libqpdf/Buffer.cc
@@ -3,22 +3,26 @@
#include <string.h>
+DLL_EXPORT
Buffer::Buffer()
{
init(0);
}
+DLL_EXPORT
Buffer::Buffer(unsigned long size)
{
init(size);
}
+DLL_EXPORT
Buffer::Buffer(Buffer const& rhs)
{
init(0);
copy(rhs);
}
+DLL_EXPORT
Buffer&
Buffer::operator=(Buffer const& rhs)
{
@@ -26,6 +30,7 @@ Buffer::operator=(Buffer const& rhs)
return *this;
}
+DLL_EXPORT
Buffer::~Buffer()
{
destroy();
@@ -60,18 +65,21 @@ Buffer::destroy()
this->buf = 0;
}
+DLL_EXPORT
unsigned long
Buffer::getSize() const
{
return this->size;
}
+DLL_EXPORT
unsigned char const*
Buffer::getBuffer() const
{
return this->buf;
}
+DLL_EXPORT
unsigned char*
Buffer::getBuffer()
{
diff --git a/libqpdf/Pipeline.cc b/libqpdf/Pipeline.cc
index 17c0c8b2..d9f70b67 100644
--- a/libqpdf/Pipeline.cc
+++ b/libqpdf/Pipeline.cc
@@ -2,12 +2,14 @@
#include <qpdf/Pipeline.hh>
+DLL_EXPORT
Pipeline::Pipeline(char const* identifier, Pipeline* next) :
identifier(identifier),
next(next)
{
}
+DLL_EXPORT
Pipeline::~Pipeline()
{
}
diff --git a/libqpdf/Pl_Count.cc b/libqpdf/Pl_Count.cc
index 8a361ad5..81ef7033 100644
--- a/libqpdf/Pl_Count.cc
+++ b/libqpdf/Pl_Count.cc
@@ -1,6 +1,7 @@
#include <qpdf/Pl_Count.hh>
+DLL_EXPORT
Pl_Count::Pl_Count(char const* identifier, Pipeline* next) :
Pipeline(identifier, next),
count(0),
@@ -8,10 +9,12 @@ Pl_Count::Pl_Count(char const* identifier, Pipeline* next) :
{
}
+DLL_EXPORT
Pl_Count::~Pl_Count()
{
}
+DLL_EXPORT
void
Pl_Count::write(unsigned char* buf, int len)
{
@@ -23,18 +26,21 @@ Pl_Count::write(unsigned char* buf, int len)
}
}
+DLL_EXPORT
void
Pl_Count::finish()
{
getNext()->finish();
}
+DLL_EXPORT
int
Pl_Count::getCount() const
{
return this->count;
}
+DLL_EXPORT
unsigned char
Pl_Count::getLastChar() const
{
diff --git a/libqpdf/Pl_Discard.cc b/libqpdf/Pl_Discard.cc
index 1632ea23..22c1a14e 100644
--- a/libqpdf/Pl_Discard.cc
+++ b/libqpdf/Pl_Discard.cc
@@ -3,20 +3,24 @@
// Exercised in md5 test suite
+DLL_EXPORT
Pl_Discard::Pl_Discard() :
Pipeline("discard", 0)
{
}
+DLL_EXPORT
Pl_Discard::~Pl_Discard()
{
}
+DLL_EXPORT
void
Pl_Discard::write(unsigned char* buf, int len)
{
}
+DLL_EXPORT
void
Pl_Discard::finish()
{
diff --git a/libqpdf/Pl_Flate.cc b/libqpdf/Pl_Flate.cc
index ba60c472..ff3331fc 100644
--- a/libqpdf/Pl_Flate.cc
+++ b/libqpdf/Pl_Flate.cc
@@ -3,6 +3,7 @@
#include <qpdf/QUtil.hh>
+DLL_EXPORT
Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next,
action_e action, int out_bufsize) :
Pipeline(identifier, next),
@@ -21,6 +22,7 @@ Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next,
zstream.avail_out = out_bufsize;
}
+DLL_EXPORT
Pl_Flate::~Pl_Flate()
{
if (this->outbuf)
@@ -30,6 +32,7 @@ Pl_Flate::~Pl_Flate()
}
}
+DLL_EXPORT
void
Pl_Flate::write(unsigned char* data, int len)
{
@@ -117,6 +120,7 @@ Pl_Flate::handleData(unsigned char* data, int len, int flush)
}
}
+DLL_EXPORT
void
Pl_Flate::finish()
{
diff --git a/libqpdf/Pl_StdioFile.cc b/libqpdf/Pl_StdioFile.cc
index c0f42afd..37ae5333 100644
--- a/libqpdf/Pl_StdioFile.cc
+++ b/libqpdf/Pl_StdioFile.cc
@@ -3,16 +3,19 @@
#include <errno.h>
+DLL_EXPORT
Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) :
Pipeline(identifier, 0),
file(f)
{
}
+DLL_EXPORT
Pl_StdioFile::~Pl_StdioFile()
{
}
+DLL_EXPORT
void
Pl_StdioFile::write(unsigned char* buf, int len)
{
@@ -33,6 +36,7 @@ Pl_StdioFile::write(unsigned char* buf, int len)
}
}
+DLL_EXPORT
void
Pl_StdioFile::finish()
{
diff --git a/libqpdf/QEXC.cc b/libqpdf/QEXC.cc
index c65afbb6..d8154f33 100644
--- a/libqpdf/QEXC.cc
+++ b/libqpdf/QEXC.cc
@@ -3,29 +3,34 @@
#include <string.h>
#include <errno.h>
+DLL_EXPORT
QEXC::Base::Base()
{
// nothing needed
}
+DLL_EXPORT
QEXC::Base::Base(std::string const& message) :
message(message)
{
// nothing needed
}
+DLL_EXPORT
std::string const&
QEXC::Base::unparse() const
{
return this->message;
}
+DLL_EXPORT
void
QEXC::Base::setMessage(std::string const& message)
{
this->message = message;
}
+DLL_EXPORT
const char*
QEXC::Base::what() const throw()
{
@@ -36,17 +41,20 @@ QEXC::Base::what() const throw()
return this->unparse().c_str();
}
+DLL_EXPORT
QEXC::General::General()
{
// nothing needed
}
+DLL_EXPORT
QEXC::General::General(std::string const& message) :
Base(message)
{
// nothing needed
}
+DLL_EXPORT
QEXC::System::System(std::string const& prefix, int sys_errno)
{
// Note: using sys_errno in case errno is a macro.
@@ -54,12 +62,14 @@ QEXC::System::System(std::string const& prefix, int sys_errno)
this->setMessage(prefix + ": " + strerror(sys_errno));
}
+DLL_EXPORT
int
QEXC::System::getErrno() const
{
return this->sys_errno;
}
+DLL_EXPORT
QEXC::Internal::Internal(std::string const& message) :
Base("INTERNAL ERROR: " + message)
{
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 399d68e1..ba71e629 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -247,6 +247,7 @@ QPDF::ObjGen::operator<(ObjGen const& rhs) const
((this->obj == rhs.obj) && (this->gen < rhs.gen)));
}
+DLL_EXPORT
QPDF::QPDF() :
encrypted(false),
encryption_initialized(false),
@@ -260,10 +261,12 @@ QPDF::QPDF() :
{
}
+DLL_EXPORT
QPDF::~QPDF()
{
}
+DLL_EXPORT
void
QPDF::processFile(char const* filename, char const* password)
{
@@ -272,24 +275,28 @@ QPDF::processFile(char const* filename, char const* password)
parse();
}
+DLL_EXPORT
void
QPDF::setIgnoreXRefStreams(bool val)
{
this->ignore_xref_streams = val;
}
+DLL_EXPORT
void
QPDF::setSuppressWarnings(bool val)
{
this->suppress_warnings = val;
}
+DLL_EXPORT
void
QPDF::setAttemptRecovery(bool val)
{
this->attempt_recovery = val;
}
+DLL_EXPORT
std::vector<std::string>
QPDF::getWarnings()
{
@@ -926,6 +933,7 @@ QPDF::insertXrefEntry(int obj, int f0, int f1, int f2, bool overwrite)
}
}
+DLL_EXPORT
void
QPDF::showXRefTable()
{
@@ -1610,6 +1618,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number)
}
}
+DLL_EXPORT
QPDFObjectHandle
QPDF::makeIndirectObject(QPDFObjectHandle oh)
{
@@ -1624,12 +1633,14 @@ QPDF::makeIndirectObject(QPDFObjectHandle oh)
return QPDFObjectHandle::Factory::newIndirect(this, next.obj, next.gen);
}
+DLL_EXPORT
QPDFObjectHandle
QPDF::getObjectByID(int objid, int generation)
{
return QPDFObjectHandle::Factory::newIndirect(this, objid, generation);
}
+DLL_EXPORT
void
QPDF::trimTrailerForWrite()
{
@@ -1652,30 +1663,35 @@ QPDF::trimTrailerForWrite()
this->trailer.removeKey("/XRefStm");
}
+DLL_EXPORT
std::string
QPDF::getFilename() const
{
return this->file.getName();
}
+DLL_EXPORT
std::string
QPDF::getPDFVersion() const
{
return this->pdf_version;
}
+DLL_EXPORT
QPDFObjectHandle
QPDF::getTrailer()
{
return this->trailer;
}
+DLL_EXPORT
QPDFObjectHandle
QPDF::getRoot()
{
return this->trailer.getKey("/Root");
}
+DLL_EXPORT
void
QPDF::getObjectStreamData(std::map<int, int>& omap)
{
@@ -1692,6 +1708,7 @@ QPDF::getObjectStreamData(std::map<int, int>& omap)
}
}
+DLL_EXPORT
std::vector<int>
QPDF::getCompressibleObjects()
{
@@ -1840,6 +1857,7 @@ QPDF::pipeStreamData(int objid, int generation,
pipeline->finish();
}
+DLL_EXPORT
void
QPDF::decodeStreams()
{
@@ -1857,6 +1875,7 @@ QPDF::decodeStreams()
}
}
+DLL_EXPORT
std::vector<QPDFObjectHandle> const&
QPDF::getAllPages()
{
diff --git a/libqpdf/QPDFExc.cc b/libqpdf/QPDFExc.cc
index c7270677..bac52e03 100644
--- a/libqpdf/QPDFExc.cc
+++ b/libqpdf/QPDFExc.cc
@@ -3,11 +3,13 @@
#include <qpdf/QUtil.hh>
+DLL_EXPORT
QPDFExc::QPDFExc(std::string const& message) :
QEXC::General(message)
{
}
+DLL_EXPORT
QPDFExc::QPDFExc(std::string const& filename, int offset,
std::string const& message) :
QEXC::General(filename + ": offset " + QUtil::int_to_string(offset) +
@@ -15,6 +17,7 @@ QPDFExc::QPDFExc(std::string const& filename, int offset,
{
}
+DLL_EXPORT
QPDFExc::~QPDFExc() throw ()
{
}
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 03ef2fe4..f1c9db23 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -18,6 +18,7 @@
#include <stdlib.h>
+DLL_EXPORT
QPDFObjectHandle::QPDFObjectHandle() :
initialized(false),
objid(0),
@@ -42,6 +43,7 @@ QPDFObjectHandle::QPDFObjectHandle(QPDFObject* data) :
{
}
+DLL_EXPORT
bool
QPDFObjectHandle::isInitialized() const
{
@@ -58,6 +60,7 @@ class QPDFObjectTypeAccessor
}
};
+DLL_EXPORT
bool
QPDFObjectHandle::isBool()
{
@@ -65,6 +68,7 @@ QPDFObjectHandle::isBool()
return QPDFObjectTypeAccessor<QPDF_Bool>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isNull()
{
@@ -72,6 +76,7 @@ QPDFObjectHandle::isNull()
return QPDFObjectTypeAccessor<QPDF_Null>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isInteger()
{
@@ -79,6 +84,7 @@ QPDFObjectHandle::isInteger()
return QPDFObjectTypeAccessor<QPDF_Integer>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isReal()
{
@@ -86,12 +92,14 @@ QPDFObjectHandle::isReal()
return QPDFObjectTypeAccessor<QPDF_Real>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isNumber()
{
return (isInteger() || isReal());
}
+DLL_EXPORT
double
QPDFObjectHandle::getNumericValue()
{
@@ -111,6 +119,7 @@ QPDFObjectHandle::getNumericValue()
return result;
}
+DLL_EXPORT
bool
QPDFObjectHandle::isName()
{
@@ -118,6 +127,7 @@ QPDFObjectHandle::isName()
return QPDFObjectTypeAccessor<QPDF_Name>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isString()
{
@@ -125,6 +135,7 @@ QPDFObjectHandle::isString()
return QPDFObjectTypeAccessor<QPDF_String>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isArray()
{
@@ -132,6 +143,7 @@ QPDFObjectHandle::isArray()
return QPDFObjectTypeAccessor<QPDF_Array>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isDictionary()
{
@@ -139,6 +151,7 @@ QPDFObjectHandle::isDictionary()
return QPDFObjectTypeAccessor<QPDF_Dictionary>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isStream()
{
@@ -146,6 +159,7 @@ QPDFObjectHandle::isStream()
return QPDFObjectTypeAccessor<QPDF_Stream>::check(obj.getPointer());
}
+DLL_EXPORT
bool
QPDFObjectHandle::isIndirect()
{
@@ -153,6 +167,7 @@ QPDFObjectHandle::isIndirect()
return (this->objid != 0);
}
+DLL_EXPORT
bool
QPDFObjectHandle::isScalar()
{
@@ -161,6 +176,7 @@ QPDFObjectHandle::isScalar()
// Bool accessors
+DLL_EXPORT
bool
QPDFObjectHandle::getBoolValue()
{
@@ -170,6 +186,7 @@ QPDFObjectHandle::getBoolValue()
// Integer accessors
+DLL_EXPORT
int
QPDFObjectHandle::getIntValue()
{
@@ -179,6 +196,7 @@ QPDFObjectHandle::getIntValue()
// Real accessors
+DLL_EXPORT
std::string
QPDFObjectHandle::getRealValue()
{
@@ -188,6 +206,7 @@ QPDFObjectHandle::getRealValue()
// Name accessors
+DLL_EXPORT
std::string
QPDFObjectHandle::getName()
{
@@ -197,6 +216,7 @@ QPDFObjectHandle::getName()
// String accessors
+DLL_EXPORT
std::string
QPDFObjectHandle::getStringValue()
{
@@ -204,6 +224,7 @@ QPDFObjectHandle::getStringValue()
return dynamic_cast<QPDF_String*>(obj.getPointer())->getVal();
}
+DLL_EXPORT
std::string
QPDFObjectHandle::getUTF8Value()
{
@@ -213,6 +234,7 @@ QPDFObjectHandle::getUTF8Value()
// Array accessors
+DLL_EXPORT
int
QPDFObjectHandle::getArrayNItems()
{
@@ -220,6 +242,7 @@ QPDFObjectHandle::getArrayNItems()
return dynamic_cast<QPDF_Array*>(obj.getPointer())->getNItems();
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::getArrayItem(int n)
{
@@ -229,6 +252,7 @@ QPDFObjectHandle::getArrayItem(int n)
// Array mutators
+DLL_EXPORT
void
QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item)
{
@@ -238,6 +262,7 @@ QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item)
// Dictionary accessors
+DLL_EXPORT
bool
QPDFObjectHandle::hasKey(std::string const& key)
{
@@ -245,6 +270,7 @@ QPDFObjectHandle::hasKey(std::string const& key)
return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->hasKey(key);
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::getKey(std::string const& key)
{
@@ -252,6 +278,7 @@ QPDFObjectHandle::getKey(std::string const& key)
return dynamic_cast<QPDF_Dictionary*>(obj.getPointer())->getKey(key);
}
+DLL_EXPORT
std::set<std::string>
QPDFObjectHandle::getKeys()
{
@@ -261,6 +288,7 @@ QPDFObjectHandle::getKeys()
// Dictionary mutators
+DLL_EXPORT
void
QPDFObjectHandle::replaceKey(std::string const& key,
QPDFObjectHandle const& value)
@@ -270,6 +298,7 @@ QPDFObjectHandle::replaceKey(std::string const& key,
obj.getPointer())->replaceKey(key, value);
}
+DLL_EXPORT
void
QPDFObjectHandle::removeKey(std::string const& key)
{
@@ -278,6 +307,7 @@ QPDFObjectHandle::removeKey(std::string const& key)
}
// Stream accessors
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::getDict()
{
@@ -285,6 +315,7 @@ QPDFObjectHandle::getDict()
return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getDict();
}
+DLL_EXPORT
PointerHolder<Buffer>
QPDFObjectHandle::getStreamData()
{
@@ -292,6 +323,7 @@ QPDFObjectHandle::getStreamData()
return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getStreamData();
}
+DLL_EXPORT
bool
QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter,
bool normalize, bool compress)
@@ -301,18 +333,21 @@ QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter,
p, filter, normalize, compress);
}
+DLL_EXPORT
int
QPDFObjectHandle::getObjectID() const
{
return this->objid;
}
+DLL_EXPORT
int
QPDFObjectHandle::getGeneration() const
{
return this->generation;
}
+DLL_EXPORT
std::map<std::string, QPDFObjectHandle>
QPDFObjectHandle::getPageImages()
{
@@ -361,6 +396,7 @@ QPDFObjectHandle::getPageImages()
return result;
}
+DLL_EXPORT
std::vector<QPDFObjectHandle>
QPDFObjectHandle::getPageContents()
{
@@ -399,6 +435,7 @@ QPDFObjectHandle::getPageContents()
return result;
}
+DLL_EXPORT
std::string
QPDFObjectHandle::unparse()
{
@@ -415,6 +452,7 @@ QPDFObjectHandle::unparse()
return result;
}
+DLL_EXPORT
std::string
QPDFObjectHandle::unparseResolved()
{
@@ -428,48 +466,56 @@ QPDFObjectHandle::newIndirect(QPDF* qpdf, int objid, int generation)
return QPDFObjectHandle(qpdf, objid, generation);
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newBool(bool value)
{
return QPDFObjectHandle(new QPDF_Bool(value));
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newNull()
{
return QPDFObjectHandle(new QPDF_Null());
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newInteger(int value)
{
return QPDFObjectHandle(new QPDF_Integer(value));
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newReal(std::string const& value)
{
return QPDFObjectHandle(new QPDF_Real(value));
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newName(std::string const& name)
{
return QPDFObjectHandle(new QPDF_Name(name));
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newString(std::string const& str)
{
return QPDFObjectHandle(new QPDF_String(str));
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newArray(std::vector<QPDFObjectHandle> const& items)
{
return QPDFObjectHandle(new QPDF_Array(items));
}
+DLL_EXPORT
QPDFObjectHandle
QPDFObjectHandle::newDictionary(
std::map<std::string, QPDFObjectHandle> const& items)
diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc
index 1d3d153f..4b6e7848 100644
--- a/libqpdf/QPDFTokenizer.cc
+++ b/libqpdf/QPDFTokenizer.cc
@@ -17,12 +17,14 @@ static bool is_hex_digit(char ch)
return (strchr("0123456789abcdefABCDEF", ch) != 0);
}
+DLL_EXPORT
QPDFTokenizer::QPDFTokenizer() :
pound_special_in_name(true)
{
reset();
}
+DLL_EXPORT
void
QPDFTokenizer::allowPoundAnywhereInName()
{
@@ -45,6 +47,7 @@ QPDFTokenizer::reset()
last_char_was_bs = false;
}
+DLL_EXPORT
void
QPDFTokenizer::presentCharacter(char ch)
{
@@ -418,6 +421,7 @@ QPDFTokenizer::presentCharacter(char ch)
}
}
+DLL_EXPORT
void
QPDFTokenizer::presentEOF()
{
@@ -439,6 +443,7 @@ QPDFTokenizer::presentEOF()
}
}
+DLL_EXPORT
bool
QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch)
{
@@ -453,6 +458,7 @@ QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch)
return ready;
}
+DLL_EXPORT
bool
QPDFTokenizer::betweenTokens()
{
diff --git a/libqpdf/QPDFXRefEntry.cc b/libqpdf/QPDFXRefEntry.cc
index 669a2f13..68c58689 100644
--- a/libqpdf/QPDFXRefEntry.cc
+++ b/libqpdf/QPDFXRefEntry.cc
@@ -3,6 +3,7 @@
#include <qpdf/QPDFExc.hh>
#include <qpdf/QUtil.hh>
+DLL_EXPORT
QPDFXRefEntry::QPDFXRefEntry() :
type(0),
field1(0),
@@ -10,6 +11,7 @@ QPDFXRefEntry::QPDFXRefEntry() :
{
}
+DLL_EXPORT
QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) :
type(type),
field1(field1),
@@ -21,12 +23,14 @@ QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) :
}
}
+DLL_EXPORT
int
QPDFXRefEntry::getType() const
{
return this->type;
}
+DLL_EXPORT
int
QPDFXRefEntry::getOffset() const
{
@@ -38,6 +42,7 @@ QPDFXRefEntry::getOffset() const
return this->field1;
}
+DLL_EXPORT
int
QPDFXRefEntry::getObjStreamNumber() const
{
@@ -49,6 +54,7 @@ QPDFXRefEntry::getObjStreamNumber() const
return this->field1;
}
+DLL_EXPORT
int
QPDFXRefEntry::getObjStreamIndex() const
{
diff --git a/libqpdf/QPDF_encryption.cc b/libqpdf/QPDF_encryption.cc
index bd7ef7a6..02517aed 100644
--- a/libqpdf/QPDF_encryption.cc
+++ b/libqpdf/QPDF_encryption.cc
@@ -32,6 +32,7 @@ pad_or_truncate_password(std::string const& password, char k1[key_bytes])
memcpy(k1 + password_bytes, padding_string, pad_bytes);
}
+DLL_EXPORT
void
QPDF::trim_user_password(std::string& user_password)
{
@@ -97,6 +98,7 @@ iterate_rc4(unsigned char* data, int data_len,
delete [] key;
}
+DLL_EXPORT
std::string
QPDF::compute_data_key(std::string const& encryption_key,
int objid, int generation)
@@ -120,6 +122,7 @@ QPDF::compute_data_key(std::string const& encryption_key,
std::min(result.length(), (size_t) 16));
}
+DLL_EXPORT
std::string
QPDF::compute_encryption_key(
std::string const& password, EncryptionData const& data)
@@ -424,6 +427,7 @@ QPDF::decryptStream(Pipeline*& pipeline, int objid, int generation,
heap.push_back(pipeline);
}
+DLL_EXPORT
void
QPDF::compute_encryption_O_U(
char const* user_password, char const* owner_password,
@@ -436,6 +440,7 @@ QPDF::compute_encryption_O_U(
U = compute_U_value(user_password, data);
}
+DLL_EXPORT
std::string const&
QPDF::getUserPassword() const
{
diff --git a/libqpdf/QPDF_linearization.cc b/libqpdf/QPDF_linearization.cc
index 5739b3a9..2a81856e 100644
--- a/libqpdf/QPDF_linearization.cc
+++ b/libqpdf/QPDF_linearization.cc
@@ -53,6 +53,7 @@ load_vector_vector(BitStream& bit_stream,
bit_stream.skipToNextByte();
}
+DLL_EXPORT
bool
QPDF::checkLinearization()
{
@@ -69,6 +70,7 @@ QPDF::checkLinearization()
return result;
}
+DLL_EXPORT
bool
QPDF::isLinearized()
{
@@ -982,6 +984,7 @@ QPDF::checkHOutlines(std::list<std::string>& warnings)
}
}
+DLL_EXPORT
void
QPDF::showLinearizationData()
{
@@ -1739,6 +1742,7 @@ QPDF::pushOutlinesToPart(
}
}
+DLL_EXPORT
void
QPDF::getLinearizedParts(
std::map<int, int> const& object_stream_data,
@@ -2070,6 +2074,7 @@ QPDF::writeHGeneric(BitWriter& w, HGeneric& t)
w.writeBits(t.group_length, 32); // 4
}
+DLL_EXPORT
void
QPDF::generateHintStream(std::map<int, QPDFXRefEntry> const& xref,
std::map<int, size_t> const& lengths,
diff --git a/libqpdf/QPDF_optimization.cc b/libqpdf/QPDF_optimization.cc
index 8797445c..edd9bba9 100644
--- a/libqpdf/QPDF_optimization.cc
+++ b/libqpdf/QPDF_optimization.cc
@@ -58,6 +58,7 @@ QPDF::ObjUser::operator<(ObjUser const& rhs) const
return false;
}
+DLL_EXPORT
void
QPDF::flattenScalarReferences()
{
@@ -140,6 +141,7 @@ QPDF::flattenScalarReferences()
}
}
+DLL_EXPORT
void
QPDF::optimize(std::map<int, int> const& object_stream_data,
bool allow_changes)
diff --git a/libqpdf/QTC.cc b/libqpdf/QTC.cc
index b8328b2e..eea7c514 100644
--- a/libqpdf/QTC.cc
+++ b/libqpdf/QTC.cc
@@ -11,6 +11,7 @@ static bool tc_active(char const* const scope)
return (QUtil::get_env("TC_SCOPE", &value) && (value == scope));
}
+DLL_EXPORT
void QTC::TC(char const* const scope, char const* const ccase, int n)
{
static std::set<std::pair<std::string, int> > cache;
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index a000d82e..0d0b4667 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -14,6 +14,7 @@
#include <unistd.h>
#endif
+DLL_EXPORT
std::string
QUtil::int_to_string(int num, int fullpad)
{
@@ -41,6 +42,7 @@ QUtil::int_to_string(int num, int fullpad)
return std::string(t);
}
+DLL_EXPORT
std::string
QUtil::double_to_string(double num, int decimal_places)
{
@@ -76,6 +78,7 @@ QUtil::double_to_string(double num, int decimal_places)
return std::string(t);
}
+DLL_EXPORT
int
QUtil::os_wrapper(std::string const& description, int status) throw (QEXC::System)
{
@@ -86,6 +89,7 @@ QUtil::os_wrapper(std::string const& description, int status) throw (QEXC::Syste
return status;
}
+DLL_EXPORT
FILE*
QUtil::fopen_wrapper(std::string const& description, FILE* f) throw (QEXC::System)
{
@@ -96,6 +100,7 @@ QUtil::fopen_wrapper(std::string const& description, FILE* f) throw (QEXC::Syste
return f;
}
+DLL_EXPORT
char*
QUtil::copy_string(std::string const& str)
{
@@ -106,6 +111,7 @@ QUtil::copy_string(std::string const& str)
return result;
}
+DLL_EXPORT
void
QUtil::binary_stdout()
{
@@ -114,6 +120,7 @@ QUtil::binary_stdout()
#endif
}
+DLL_EXPORT
void
QUtil::binary_stdin()
{
@@ -122,6 +129,7 @@ QUtil::binary_stdin()
#endif
}
+DLL_EXPORT
char*
QUtil::getWhoami(char* argv0)
{
@@ -149,6 +157,7 @@ QUtil::getWhoami(char* argv0)
return whoami;
}
+DLL_EXPORT
bool
QUtil::get_env(std::string const& var, std::string* value)
{
@@ -186,6 +195,7 @@ QUtil::get_env(std::string const& var, std::string* value)
#endif
}
+DLL_EXPORT
time_t
QUtil::get_current_time()
{
@@ -212,6 +222,7 @@ QUtil::get_current_time()
#endif
}
+DLL_EXPORT
std::string
QUtil::toUTF8(unsigned long uval)
{