summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-08-13 19:15:19 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2020-02-26 20:34:54 +0100
commitdb678df196ccd8f9f6fb336706cf5701d1e53aa6 (patch)
treea7937ab9aba3556760f0040727066a84a41f0006 /apt-pkg
parentc38e0047d95305e5984e822f670055cde6aa5f6a (diff)
apt-pkg: default visibility to hidden
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/CMakeLists.txt1
-rw-r--r--apt-pkg/acquire-item.h8
-rw-r--r--apt-pkg/acquire-method.h2
-rw-r--r--apt-pkg/acquire-worker.h2
-rw-r--r--apt-pkg/acquire.h12
-rw-r--r--apt-pkg/algorithms.h14
-rw-r--r--apt-pkg/aptconfiguration.h21
-rw-r--r--apt-pkg/cachefile.h2
-rw-r--r--apt-pkg/cachefilter-patterns.h2
-rw-r--r--apt-pkg/cachefilter.h24
-rw-r--r--apt-pkg/cacheiterators.h22
-rw-r--r--apt-pkg/cacheset.h10
-rw-r--r--apt-pkg/cdrom.h8
-rw-r--r--apt-pkg/clean.h2
-rw-r--r--apt-pkg/contrib/arfile.h6
-rw-r--r--apt-pkg/contrib/cdromutl.h12
-rw-r--r--apt-pkg/contrib/cmndline.h2
-rw-r--r--apt-pkg/contrib/configuration.h8
-rw-r--r--apt-pkg/contrib/error.h4
-rw-r--r--apt-pkg/contrib/extracttar.h2
-rw-r--r--apt-pkg/contrib/fileutl.h80
-rw-r--r--apt-pkg/contrib/gpgv.h6
-rw-r--r--apt-pkg/contrib/hashes.h6
-rw-r--r--apt-pkg/contrib/hashsum_template.h100
-rw-r--r--apt-pkg/contrib/netrc.h2
-rw-r--r--apt-pkg/contrib/progress.h4
-rw-r--r--apt-pkg/contrib/proxy.h2
-rw-r--r--apt-pkg/contrib/srvrec.h10
-rw-r--r--apt-pkg/contrib/strutl.h101
-rw-r--r--apt-pkg/deb/debfile.h6
-rw-r--r--apt-pkg/deb/debindexfile.h4
-rw-r--r--apt-pkg/deb/debversion.h4
-rw-r--r--apt-pkg/depcache.h12
-rw-r--r--apt-pkg/dirstream.h2
-rw-r--r--apt-pkg/edsp.h26
-rw-r--r--apt-pkg/indexcopy.h10
-rw-r--r--apt-pkg/indexfile.h12
-rw-r--r--apt-pkg/init.h9
-rw-r--r--apt-pkg/install-progress.h12
-rw-r--r--apt-pkg/metaindex.h2
-rw-r--r--apt-pkg/orderlist.h2
-rw-r--r--apt-pkg/packagemanager.h2
-rw-r--r--apt-pkg/pkgcache.h2
-rw-r--r--apt-pkg/pkgcachegen.cc1
-rw-r--r--apt-pkg/pkgrecords.h4
-rw-r--r--apt-pkg/pkgsystem.h4
-rw-r--r--apt-pkg/policy.h6
-rw-r--r--apt-pkg/prettyprinters.h4
-rw-r--r--apt-pkg/sourcelist.h2
-rw-r--r--apt-pkg/srcrecords.h2
-rw-r--r--apt-pkg/tagfile.h8
-rw-r--r--apt-pkg/update.h4
-rw-r--r--apt-pkg/upgrade.h4
-rw-r--r--apt-pkg/version.h2
-rw-r--r--apt-pkg/versionmatch.h2
55 files changed, 264 insertions, 359 deletions
diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt
index e9a629ccf..7e51b1775 100644
--- a/apt-pkg/CMakeLists.txt
+++ b/apt-pkg/CMakeLists.txt
@@ -66,6 +66,7 @@ target_link_libraries(apt-pkg
)
set_target_properties(apt-pkg PROPERTIES VERSION ${MAJOR}.${MINOR})
set_target_properties(apt-pkg PROPERTIES SOVERSION ${MAJOR})
+set_target_properties(apt-pkg PROPERTIES CXX_VISIBILITY_PRESET hidden)
add_version_script(apt-pkg)
# Install the library and the header files
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index d3f1bddf8..3be8a9c62 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -43,7 +43,7 @@ class pkgAcqMetaClearSig;
class pkgAcqIndexMergeDiffs;
class metaIndex;
-class pkgAcquire::Item : public WeakPointable /*{{{*/
+class APT_PUBLIC pkgAcquire::Item : public WeakPointable /*{{{*/
/** \brief Represents the process by which a pkgAcquire object should
* retrieve a file or a collection of files.
*
@@ -940,7 +940,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
* If the package file already exists in the cache, nothing will be
* done.
*/
-class pkgAcqArchive : public pkgAcquire::Item
+class APT_PUBLIC pkgAcqArchive : public pkgAcquire::Item
{
void * const d;
@@ -1018,7 +1018,7 @@ class pkgAcqArchive : public pkgAcquire::Item
* Downloads the changelog to a temporary file it will also remove again
* while it is deconstructed or downloads it to a named location.
*/
-class pkgAcqChangelog : public pkgAcquire::Item
+class APT_PUBLIC pkgAcqChangelog : public pkgAcquire::Item
{
class Private;
Private * const d;
@@ -1134,7 +1134,7 @@ private:
* normally is a NOP, such as "file". If the download fails, the
* partial file is renamed to get a ".FAILED" extension.
*/
-class pkgAcqFile : public pkgAcquire::Item
+class APT_PUBLIC pkgAcqFile : public pkgAcquire::Item
{
void * const d;
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h
index 48c2e130e..dde28a6ff 100644
--- a/apt-pkg/acquire-method.h
+++ b/apt-pkg/acquire-method.h
@@ -30,7 +30,7 @@
#include <vector>
-class pkgAcqMethod
+class APT_PUBLIC pkgAcqMethod
{
protected:
diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h
index b6d1628f9..f59d659d5 100644
--- a/apt-pkg/acquire-worker.h
+++ b/apt-pkg/acquire-worker.h
@@ -44,7 +44,7 @@
*
* \sa pkgAcqMethod, pkgAcquire::Item, pkgAcquire
*/
-class pkgAcquire::Worker : public WeakPointable
+class APT_PUBLIC pkgAcquire::Worker : public WeakPointable
{
/** \brief dpointer placeholder (for later in case we need it) */
void * const d;
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index c71c01e2f..8cb4d2532 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -89,7 +89,7 @@ class metaIndex;
*
* \todo Why all the protected data items and methods?
*/
-class pkgAcquire
+class APT_PUBLIC pkgAcquire
{
private:
/** \brief FD of the Lock file we acquire in Setup (if any) */
@@ -372,7 +372,7 @@ class pkgAcquire
*
* An item may have several associated ItemDescs over its lifetime.
*/
-struct pkgAcquire::ItemDesc : public WeakPointable
+struct APT_PUBLIC pkgAcquire::ItemDesc : public WeakPointable
{
/** \brief URI from which to download this item. */
std::string URI;
@@ -388,7 +388,7 @@ struct pkgAcquire::ItemDesc : public WeakPointable
*
* \todo Why so many protected values?
*/
-class pkgAcquire::Queue
+class APT_PUBLIC pkgAcquire::Queue
{
friend class pkgAcquire;
friend class pkgAcquire::UriIterator;
@@ -586,7 +586,7 @@ class pkgAcquire::Queue
};
/*}}}*/
/** \brief Iterates over all the URIs being fetched by a pkgAcquire object. {{{*/
-class pkgAcquire::UriIterator
+class APT_PUBLIC pkgAcquire::UriIterator
{
/** \brief dpointer placeholder (for later in case we need it) */
void * const d;
@@ -623,7 +623,7 @@ class pkgAcquire::UriIterator
};
/*}}}*/
/** \brief Information about the properties of a single acquire method. {{{*/
-struct pkgAcquire::MethodConfig
+struct APT_PUBLIC pkgAcquire::MethodConfig
{
class Private;
/** \brief dpointer placeholder (for later in case we need it) */
@@ -688,7 +688,7 @@ struct pkgAcquire::MethodConfig
*
* \todo Why protected members?
*/
-class pkgAcquireStatus
+class APT_PUBLIC pkgAcquireStatus
{
/** \brief dpointer placeholder (for later in case we need it) */
void * const d;
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 1672231ff..fc578a4ca 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -42,12 +42,12 @@
class pkgSimulatePrivate;
-class pkgSimulate : public pkgPackageManager /*{{{*/
+class APT_PUBLIC pkgSimulate : public pkgPackageManager /*{{{*/
{
pkgSimulatePrivate * const d;
protected:
- class Policy : public pkgDepCache::Policy
+ class APT_PUBLIC Policy : public pkgDepCache::Policy
{
pkgDepCache *Cache;
public:
@@ -87,7 +87,7 @@ private:
virtual ~pkgSimulate();
};
/*}}}*/
-class pkgProblemResolver /*{{{*/
+class APT_PUBLIC pkgProblemResolver /*{{{*/
{
private:
/** \brief dpointer placeholder (for later in case we need it) */
@@ -111,7 +111,7 @@ class pkgProblemResolver /*{{{*/
// Sort stuff
APT_HIDDEN int ScoreSort(Package const *A, Package const *B) APT_PURE;
- struct PackageKill
+ struct APT_PUBLIC PackageKill
{
PkgIterator Pkg;
DepIterator Dep;
@@ -141,10 +141,10 @@ class pkgProblemResolver /*{{{*/
virtual ~pkgProblemResolver();
};
/*}}}*/
-bool pkgApplyStatus(pkgDepCache &Cache);
-bool pkgFixBroken(pkgDepCache &Cache);
+APT_PUBLIC bool pkgApplyStatus(pkgDepCache &Cache);
+APT_PUBLIC bool pkgFixBroken(pkgDepCache &Cache);
-void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List);
+APT_PUBLIC void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List);
#endif
diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h
index 34621a2b8..2cb2d823a 100644
--- a/apt-pkg/aptconfiguration.h
+++ b/apt-pkg/aptconfiguration.h
@@ -11,6 +11,7 @@
#ifndef APT_CONFIGURATION_H
#define APT_CONFIGURATION_H
// Include Files /*{{{*/
+#include <apt-pkg/macros.h>
#include <limits>
#include <string>
#include <vector>
@@ -38,7 +39,7 @@ namespace Configuration { /*{{{*/
*
* \return a vector of the compression types in the preferred usage order
*/
- std::vector<std::string> const getCompressionTypes(bool const &Cached = true);
+ APT_PUBLIC std::vector<std::string> const getCompressionTypes(bool const &Cached = true);
/** \brief Returns a vector of Language Codes
*
@@ -63,7 +64,7 @@ namespace Configuration { /*{{{*/
*
* \return a vector of (all) Language Codes in the preferred usage order
*/
- std::vector<std::string> const getLanguages(bool const &All = false,
+ APT_PUBLIC std::vector<std::string> const getLanguages(bool const &All = false,
bool const &Cached = true, char const ** const Locale = 0);
/** \brief Are we interested in the given Language?
@@ -72,7 +73,7 @@ namespace Configuration { /*{{{*/
* \param All defines if we check against all codes or only against used codes
* \return true if we are interested, false otherwise
*/
- bool checkLanguage(std::string Lang, bool const All = false);
+ APT_PUBLIC bool checkLanguage(std::string Lang, bool const All = false);
/** \brief Returns a vector of Architectures we support
*
@@ -81,17 +82,17 @@ namespace Configuration { /*{{{*/
*
* \return a vector of Architectures in preferred order
*/
- std::vector<std::string> const getArchitectures(bool const &Cached = true);
+ APT_PUBLIC std::vector<std::string> const getArchitectures(bool const &Cached = true);
/** \brief Are we interested in the given Architecture?
*
* \param Arch we want to check
* \return true if we are interested, false otherwise
*/
- bool checkArchitecture(std::string const &Arch);
+ APT_PUBLIC bool checkArchitecture(std::string const &Arch);
/** \brief Representation of supported compressors */
- struct Compressor {
+ struct APT_PUBLIC Compressor {
std::string Name;
std::string Extension;
std::string Binary;
@@ -112,15 +113,15 @@ namespace Configuration { /*{{{*/
*
* \return a vector of Compressors
*/
- std::vector<Compressor> const getCompressors(bool const Cached = true);
+ APT_PUBLIC std::vector<Compressor> const getCompressors(bool const Cached = true);
/** \brief Return a vector of extensions supported for data.tar's */
- std::vector<std::string> const getCompressorExtensions();
+ APT_PUBLIC std::vector<std::string> const getCompressorExtensions();
/** \return Return a vector of enabled build profile specifications */
- std::vector<std::string> const getBuildProfiles();
+ APT_PUBLIC std::vector<std::string> const getBuildProfiles();
/** \return Return a comma-separated list of enabled build profile specifications */
- std::string const getBuildProfilesString();
+ APT_PUBLIC std::string const getBuildProfilesString();
/*}}}*/
}
/*}}}*/
diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h
index 98b72ebd1..b24908216 100644
--- a/apt-pkg/cachefile.h
+++ b/apt-pkg/cachefile.h
@@ -29,7 +29,7 @@ class pkgSourceList;
class pkgIndexFile;
class OpProgress;
-class pkgCacheFile
+class APT_PUBLIC pkgCacheFile
{
struct Private;
/** \brief dpointer placeholder (for later in case we need it) */
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h
index 0c0dafa15..093364ff1 100644
--- a/apt-pkg/cachefilter-patterns.h
+++ b/apt-pkg/cachefilter-patterns.h
@@ -36,7 +36,7 @@ namespace Internal
* - Word nodes which contains words or quoted words
* - Patterns, which represent ?foo and ?foo(...) patterns
*/
-struct PatternTreeParser
+struct APT_PUBLIC PatternTreeParser
{
struct Node
diff --git a/apt-pkg/cachefilter.h b/apt-pkg/cachefilter.h
index 3c6e1559d..ccff6f9a3 100644
--- a/apt-pkg/cachefilter.h
+++ b/apt-pkg/cachefilter.h
@@ -20,7 +20,7 @@ class pkgCacheFile;
namespace APT {
namespace CacheFilter {
-class Matcher {
+class APT_PUBLIC Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &/*Pkg*/) = 0;
virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) = 0;
@@ -28,7 +28,7 @@ public:
virtual ~Matcher();
};
-class PackageMatcher : public Matcher {
+class APT_PUBLIC PackageMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE = 0;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE { return (*this)(Ver.ParentPkg()); }
@@ -37,21 +37,21 @@ public:
};
// Generica like True, False, NOT, AND, OR /*{{{*/
-class TrueMatcher : public Matcher {
+class APT_PUBLIC TrueMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};
-class FalseMatcher : public Matcher {
+class APT_PUBLIC FalseMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};
-class NOTMatcher : public Matcher {
+class APT_PUBLIC NOTMatcher : public Matcher {
Matcher * const matcher;
public:
explicit NOTMatcher(Matcher * const matcher);
@@ -61,7 +61,7 @@ public:
virtual ~NOTMatcher();
};
-class ANDMatcher : public Matcher {
+class APT_PUBLIC ANDMatcher : public Matcher {
std::vector<Matcher *> matchers;
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
@@ -77,7 +77,7 @@ public:
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ANDMatcher();
};
-class ORMatcher : public Matcher {
+class APT_PUBLIC ORMatcher : public Matcher {
std::vector<Matcher *> matchers;
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
@@ -94,7 +94,7 @@ public:
virtual ~ORMatcher();
};
/*}}}*/
-class PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
+class APT_PUBLIC PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
regex_t* pattern;
public:
explicit PackageNameMatchesRegEx(std::string const &Pattern);
@@ -103,7 +103,7 @@ public:
virtual ~PackageNameMatchesRegEx();
};
/*}}}*/
-class PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
+class APT_PUBLIC PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
const std::string Pattern;
public:
explicit PackageNameMatchesFnmatch(std::string const &Pattern);
@@ -112,7 +112,7 @@ public:
virtual ~PackageNameMatchesFnmatch() {};
};
/*}}}*/
-class PackageArchitectureMatchesSpecification : public PackageMatcher { /*{{{*/
+class APT_PUBLIC PackageArchitectureMatchesSpecification : public PackageMatcher { /*{{{*/
/** \class PackageArchitectureMatchesSpecification
\brief matching against architecture specification strings
@@ -138,7 +138,7 @@ public:
virtual ~PackageArchitectureMatchesSpecification();
};
/*}}}*/
-class PackageIsNewInstall : public PackageMatcher { /*{{{*/
+class APT_PUBLIC PackageIsNewInstall : public PackageMatcher { /*{{{*/
pkgCacheFile * const Cache;
public:
explicit PackageIsNewInstall(pkgCacheFile * const Cache);
@@ -148,7 +148,7 @@ public:
/*}}}*/
/// \brief Parse a pattern, return nullptr or pattern
-std::unique_ptr<APT::CacheFilter::Matcher> ParsePattern(APT::StringView pattern, pkgCacheFile *file);
+APT_PUBLIC std::unique_ptr<APT::CacheFilter::Matcher> ParsePattern(APT::StringView pattern, pkgCacheFile *file);
}
}
#endif
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index d2e4f7f90..1b049b6e5 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -44,7 +44,7 @@
// abstract Iterator template /*{{{*/
/* This template provides the very basic iterator methods we
need to have for doing some walk-over-the-cache magic */
-template<typename Str, typename Itr> class pkgCache::Iterator :
+template<typename Str, typename Itr> class APT_PUBLIC pkgCache::Iterator :
public std::iterator<std::forward_iterator_tag, Str> {
/** \brief Returns the Pointer for this struct in the owner
* The implementation of this method should be pretty short
@@ -98,7 +98,7 @@ template<typename Str, typename Itr> class pkgCache::Iterator :
interest in package names can iterate easily over the names, so the
different architectures can be treated as of the "same" package
(apt internally treat them as totally different packages) */
-class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
+class APT_PUBLIC pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
long HashIndex;
public:
@@ -139,7 +139,7 @@ class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
};
/*}}}*/
// Package Iterator /*{{{*/
-class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
+class APT_PUBLIC pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
long HashIndex;
public:
@@ -185,7 +185,7 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
};
/*}}}*/
// Version Iterator /*{{{*/
-class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
+class APT_PUBLIC pkgCache::VerIterator : public Iterator<Version, VerIterator> {
public:
inline Version* OwnerPointer() const {
return (Owner != 0) ? Owner->VerP : 0;
@@ -250,7 +250,7 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
};
/*}}}*/
// Description Iterator /*{{{*/
-class pkgCache::DescIterator : public Iterator<Description, DescIterator> {
+class APT_PUBLIC pkgCache::DescIterator : public Iterator<Description, DescIterator> {
public:
inline Description* OwnerPointer() const {
return (Owner != 0) ? Owner->DescP : 0;
@@ -276,7 +276,7 @@ class pkgCache::DescIterator : public Iterator<Description, DescIterator> {
};
/*}}}*/
// Dependency iterator /*{{{*/
-class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
+class APT_PUBLIC pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
enum {DepVer, DepRev} Type;
DependencyData * S2;
@@ -361,7 +361,7 @@ class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
};
/*}}}*/
// Provides iterator /*{{{*/
-class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
+class APT_PUBLIC pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
enum {PrvVer, PrvPkg} Type;
public:
@@ -402,7 +402,7 @@ class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
};
/*}}}*/
// Release file /*{{{*/
-class pkgCache::RlsFileIterator : public Iterator<ReleaseFile, RlsFileIterator> {
+class APT_PUBLIC pkgCache::RlsFileIterator : public Iterator<ReleaseFile, RlsFileIterator> {
public:
inline ReleaseFile* OwnerPointer() const {
return (Owner != 0) ? Owner->RlsFileP : 0;
@@ -431,7 +431,7 @@ class pkgCache::RlsFileIterator : public Iterator<ReleaseFile, RlsFileIterator>
};
/*}}}*/
// Package file /*{{{*/
-class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator> {
+class APT_PUBLIC pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator> {
public:
inline PackageFile* OwnerPointer() const {
return (Owner != 0) ? Owner->PkgFileP : 0;
@@ -465,7 +465,7 @@ class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator>
};
/*}}}*/
// Version File /*{{{*/
-class pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFileIterator> {
+class APT_PUBLIC pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFileIterator> {
public:
inline VerFile* OwnerPointer() const {
return (Owner != 0) ? Owner->VerFileP : 0;
@@ -483,7 +483,7 @@ class pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFileIter
};
/*}}}*/
// Description File /*{{{*/
-class pkgCache::DescFileIterator : public Iterator<DescFile, DescFileIterator> {
+class APT_PUBLIC pkgCache::DescFileIterator : public Iterator<DescFile, DescFileIterator> {
public:
inline DescFile* OwnerPointer() const {
return (Owner != 0) ? Owner->DescFileP : 0;
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index bfb9e0abf..eb9e3e523 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -38,7 +38,7 @@ namespace APT {
class PackageContainerInterface;
class VersionContainerInterface;
-class CacheSetHelper { /*{{{*/
+class APT_PUBLIC CacheSetHelper { /*{{{*/
/** \class APT::CacheSetHelper
Simple base class with a lot of virtual methods which can be overridden
to alter the behavior or the output of the CacheSets.
@@ -277,7 +277,7 @@ public:
inline typename Container::value_type getType(void) const { return *this->_iter; }
};
/*}}}*/
-class PackageContainerInterface { /*{{{*/
+class APT_PUBLIC PackageContainerInterface { /*{{{*/
/** \class PackageContainerInterface
* Interface ensuring that all operations can be executed on the yet to
@@ -332,7 +332,7 @@ private:
void * const d;
};
/*}}}*/
-template<class Container> class PackageContainer : public PackageContainerInterface {/*{{{*/
+template<class Container> class APT_PUBLIC PackageContainer : public PackageContainerInterface {/*{{{*/
/** \class APT::PackageContainer
Simple wrapper around a container class like std::set to provide a similar
@@ -682,7 +682,7 @@ typedef PackageContainer<std::list<pkgCache::PkgIterator> > PackageList;
typedef PackageContainer<std::deque<pkgCache::PkgIterator> > PackageDeque;
typedef PackageContainer<std::vector<pkgCache::PkgIterator> > PackageVector;
-class VersionContainerInterface { /*{{{*/
+class APT_PUBLIC VersionContainerInterface { /*{{{*/
/** \class APT::VersionContainerInterface
Same as APT::PackageContainerInterface, just for Versions */
@@ -787,7 +787,7 @@ protected: /*{{{*/
/*}}}*/
};
/*}}}*/
-template<class Container> class VersionContainer : public VersionContainerInterface {/*{{{*/
+template<class Container> class APT_PUBLIC VersionContainer : public VersionContainerInterface {/*{{{*/
/** \class APT::VersionContainer
Simple wrapper around a container class like std::set to provide a similar
diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index 74ec9af09..d3fc7710b 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -12,7 +12,7 @@
class Configuration;
class OpProgress;
-class pkgCdromStatus /*{{{*/
+class APT_PUBLIC pkgCdromStatus /*{{{*/
{
void * const d;
protected:
@@ -35,7 +35,7 @@ class pkgCdromStatus /*{{{*/
virtual OpProgress* GetOpProgress() {return NULL; };
};
/*}}}*/
-class pkgCdrom /*{{{*/
+class APT_PUBLIC pkgCdrom /*{{{*/
{
protected:
enum {
@@ -85,14 +85,14 @@ class pkgCdrom /*{{{*/
// class that uses libudev to find cdrom/removable devices dynamically
-struct CdromDevice /*{{{*/
+struct APT_PUBLIC CdromDevice /*{{{*/
{
std::string DeviceName;
bool Mounted;
std::string MountPath;
};
/*}}}*/
-class pkgUdevCdromDevices /*{{{*/
+class APT_PUBLIC pkgUdevCdromDevices /*{{{*/
{
void * const d;
public:
diff --git a/apt-pkg/clean.h b/apt-pkg/clean.h
index ad1ddcce7..21b90e530 100644
--- a/apt-pkg/clean.h
+++ b/apt-pkg/clean.h
@@ -16,7 +16,7 @@
class pkgCache;
-class pkgArchiveCleaner
+class APT_PUBLIC pkgArchiveCleaner
{
/** \brief dpointer placeholder (for later in case we need it) */
void * const d;
diff --git a/apt-pkg/contrib/arfile.h b/apt-pkg/contrib/arfile.h
index acbe2c3f8..9b13ed921 100644
--- a/apt-pkg/contrib/arfile.h
+++ b/apt-pkg/contrib/arfile.h
@@ -19,7 +19,7 @@
class FileFd;
-class ARArchive
+class APT_PUBLIC ARArchive
{
struct MemberHeader;
public:
@@ -41,8 +41,8 @@ class ARArchive
const Member *FindMember(const char *Name) const;
inline Member *Members() { return List; }
- explicit ARArchive(FileFd &File);
- ~ARArchive();
+ APT_PUBLIC explicit ARArchive(FileFd &File);
+ APT_PUBLIC ~ARArchive();
};
// A member of the archive
diff --git a/apt-pkg/contrib/cdromutl.h b/apt-pkg/contrib/cdromutl.h
index d355a297e..1384cea9a 100644
--- a/apt-pkg/contrib/cdromutl.h
+++ b/apt-pkg/contrib/cdromutl.h
@@ -9,14 +9,16 @@
#ifndef PKGLIB_CDROMUTL_H
#define PKGLIB_CDROMUTL_H
+#include <apt-pkg/macros.h>
+
#include <string>
// mount cdrom, DeviceName (e.g. /dev/sr0) is optional
-bool MountCdrom(std::string Path, std::string DeviceName="");
-bool UnmountCdrom(std::string Path);
-bool IdentCdrom(std::string CD,std::string &Res,unsigned int Version = 2);
-bool IsMounted(std::string &Path);
-std::string FindMountPointForDevice(const char *device);
+APT_PUBLIC bool MountCdrom(std::string Path, std::string DeviceName="");
+APT_PUBLIC bool UnmountCdrom(std::string Path);
+APT_PUBLIC bool IdentCdrom(std::string CD,std::string &Res,unsigned int Version = 2);
+APT_PUBLIC bool IsMounted(std::string &Path);
+APT_PUBLIC std::string FindMountPointForDevice(const char *device);
#endif
diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h
index 28ea9119e..40d384f02 100644
--- a/apt-pkg/contrib/cmndline.h
+++ b/apt-pkg/contrib/cmndline.h
@@ -48,7 +48,7 @@
class Configuration;
-class CommandLine
+class APT_PUBLIC CommandLine
{
public:
struct Args;
diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h
index 33cdfbfe9..6ebf28d03 100644
--- a/apt-pkg/contrib/configuration.h
+++ b/apt-pkg/contrib/configuration.h
@@ -36,7 +36,7 @@
#include <apt-pkg/macros.h>
-class Configuration
+class APT_PUBLIC Configuration
{
public:
@@ -139,13 +139,13 @@ class Configuration
};
};
-extern Configuration *_config;
+APT_PUBLIC extern Configuration *_config;
-bool ReadConfigFile(Configuration &Conf,const std::string &FName,
+APT_PUBLIC bool ReadConfigFile(Configuration &Conf,const std::string &FName,
bool const &AsSectional = false,
unsigned const &Depth = 0);
-bool ReadConfigDir(Configuration &Conf,const std::string &Dir,
+APT_PUBLIC bool ReadConfigDir(Configuration &Conf,const std::string &Dir,
bool const &AsSectional = false,
unsigned const &Depth = 0);
diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h
index 5ab7b9f85..1609b8702 100644
--- a/apt-pkg/contrib/error.h
+++ b/apt-pkg/contrib/error.h
@@ -48,7 +48,7 @@
#include <stdarg.h>
#include <stddef.h>
-class GlobalError /*{{{*/
+class APT_PUBLIC GlobalError /*{{{*/
{
public: /*{{{*/
/** \brief a message can have one of following severity */
@@ -359,7 +359,7 @@ private: /*{{{*/
/*}}}*/
// The 'extra-ansi' syntax is used to help with collisions.
-GlobalError *_GetErrorObj();
+APT_PUBLIC GlobalError *_GetErrorObj();
static struct {
inline GlobalError* operator ->() { return _GetErrorObj(); }
} _error APT_UNUSED;
diff --git a/apt-pkg/contrib/extracttar.h b/apt-pkg/contrib/extracttar.h
index 8d4c17924..a3c862a72 100644
--- a/apt-pkg/contrib/extracttar.h
+++ b/apt-pkg/contrib/extracttar.h
@@ -21,7 +21,7 @@
class pkgDirStream;
-class ExtractTar
+class APT_PUBLIC ExtractTar
{
protected:
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index f80457cd3..dd16aa754 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -35,7 +35,7 @@
#define APT_HAS_GZIP 1
class FileFdPrivate;
-class FileFd
+class APT_PUBLIC FileFd
{
friend class FileFdPrivate;
friend class GzipFileFdPrivate;
@@ -174,29 +174,29 @@ class FileFd
APT_HIDDEN bool FileFdError(const char* Description,...) APT_PRINTF(2) APT_COLD;
};
-bool RunScripts(const char *Cnf);
-bool CopyFile(FileFd &From,FileFd &To);
-bool RemoveFile(char const * const Function, std::string const &FileName);
-bool RemoveFileAt(char const * const Function, int const dirfd, std::string const &FileName);
-int GetLock(std::string File,bool Errors = true);
-bool FileExists(std::string File);
-bool RealFileExists(std::string File);
-bool DirectoryExists(std::string const &Path);
-bool CreateDirectory(std::string const &Parent, std::string const &Path);
-time_t GetModificationTime(std::string const &Path);
-bool Rename(std::string From, std::string To);
+APT_PUBLIC bool RunScripts(const char *Cnf);
+APT_PUBLIC bool CopyFile(FileFd &From,FileFd &To);
+APT_PUBLIC bool RemoveFile(char const * const Function, std::string const &FileName);
+APT_PUBLIC bool RemoveFileAt(char const * const Function, int const dirfd, std::string const &FileName);
+APT_PUBLIC int GetLock(std::string File,bool Errors = true);
+APT_PUBLIC bool FileExists(std::string File);
+APT_PUBLIC bool RealFileExists(std::string File);
+APT_PUBLIC bool DirectoryExists(std::string const &Path);
+APT_PUBLIC bool CreateDirectory(std::string const &Parent, std::string const &Path);
+APT_PUBLIC time_t GetModificationTime(std::string const &Path);
+APT_PUBLIC bool Rename(std::string From, std::string To);
-std::string GetTempDir();
-std::string GetTempDir(std::string const &User);
-FileFd* GetTempFile(std::string const &Prefix = "",
+APT_PUBLIC std::string GetTempDir();
+APT_PUBLIC std::string GetTempDir(std::string const &User);
+APT_PUBLIC FileFd* GetTempFile(std::string const &Prefix = "",
bool ImmediateUnlink = true,
FileFd * const TmpFd = NULL);
// FIXME: GetTempFile should always return a buffered file
-FileFd* GetTempFile(std::string const &Prefix,
+APT_HIDDEN FileFd* GetTempFile(std::string const &Prefix,
bool ImmediateUnlink ,
FileFd * const TmpFd,
- bool Buffered) APT_HIDDEN;
+ bool Buffered);
/** \brief Ensure the existence of the given Path
*
@@ -204,24 +204,24 @@ FileFd* GetTempFile(std::string const &Prefix,
* /apt/ will be removed before CreateDirectory call.
* \param Path which should exist after (successful) call
*/
-bool CreateAPTDirectoryIfNeeded(std::string const &Parent, std::string const &Path);
+APT_PUBLIC bool CreateAPTDirectoryIfNeeded(std::string const &Parent, std::string const &Path);
-std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::string const &Ext,
+APT_PUBLIC std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::string const &Ext,
bool const &SortList, bool const &AllowNoExt=false);
-std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::vector<std::string> const &Ext,
+APT_PUBLIC std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::vector<std::string> const &Ext,
bool const &SortList);
-std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, bool SortList);
-std::string SafeGetCWD();
-void SetCloseExec(int Fd,bool Close);
-void SetNonBlock(int Fd,bool Block);
-bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0);
-pid_t ExecFork();
-pid_t ExecFork(std::set<int> keep_fds);
-void MergeKeepFdsFromConfiguration(std::set<int> &keep_fds);
-bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
+APT_PUBLIC std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, bool SortList);
+APT_PUBLIC std::string SafeGetCWD();
+APT_PUBLIC void SetCloseExec(int Fd,bool Close);
+APT_PUBLIC void SetNonBlock(int Fd,bool Block);
+APT_PUBLIC bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0);
+APT_PUBLIC pid_t ExecFork();
+APT_PUBLIC pid_t ExecFork(std::set<int> keep_fds);
+APT_PUBLIC void MergeKeepFdsFromConfiguration(std::set<int> &keep_fds);
+APT_PUBLIC bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
// check if the given file starts with a PGP cleartext signature
-bool StartsWithGPGClearTextSignature(std::string const &FileName);
+APT_PUBLIC bool StartsWithGPGClearTextSignature(std::string const &FileName);
/** change file attributes to requested known good values
*
@@ -233,7 +233,7 @@ bool StartsWithGPGClearTextSignature(std::string const &FileName);
* @param group is the (new) group owning the file, e.g. root
* @param mode is the access mode of the file, e.g. 0644
*/
-bool ChangeOwnerAndPermissionOfFile(char const * const requester, char const * const file, char const * const user, char const * const group, mode_t const mode);
+APT_PUBLIC bool ChangeOwnerAndPermissionOfFile(char const * const requester, char const * const file, char const * const user, char const * const group, mode_t const mode);
/**
* \brief Drop privileges
@@ -246,23 +246,23 @@ bool ChangeOwnerAndPermissionOfFile(char const * const requester, char const * c
*
* \return true on success, false on failure with _error set
*/
-bool DropPrivileges();
+APT_PUBLIC bool DropPrivileges();
// File string manipulators
-std::string flNotDir(std::string File);
-std::string flNotFile(std::string File);
-std::string flNoLink(std::string File);
-std::string flExtension(std::string File);
-std::string flCombine(std::string Dir,std::string File);
+APT_PUBLIC std::string flNotDir(std::string File);
+APT_PUBLIC std::string flNotFile(std::string File);
+APT_PUBLIC std::string flNoLink(std::string File);
+APT_PUBLIC std::string flExtension(std::string File);
+APT_PUBLIC std::string flCombine(std::string Dir,std::string File);
/** \brief Takes a file path and returns the absolute path
*/
-std::string flAbsPath(std::string File);
+APT_PUBLIC std::string flAbsPath(std::string File);
/** \brief removes superfluous /./ and // from path */
APT_HIDDEN std::string flNormalize(std::string file);
// simple c++ glob
-std::vector<std::string> Glob(std::string const &pattern, int flags=0);
+APT_PUBLIC std::vector<std::string> Glob(std::string const &pattern, int flags=0);
/** \brief Popen() implementation that execv() instead of using a shell
*
@@ -276,7 +276,7 @@ std::vector<std::string> Glob(std::string const &pattern, int flags=0);
* \param Sandbox True if this should run sandboxed
* \return true on success, false on failure with _error set
*/
-bool Popen(const char *Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode, bool CaptureStderr = true, bool Sandbox = false);
+APT_PUBLIC bool Popen(const char *Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode, bool CaptureStderr = true, bool Sandbox = false);
APT_HIDDEN bool OpenConfigurationFileFd(std::string const &File, FileFd &Fd);
diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h
index 4d48e2914..1cabed4e6 100644
--- a/apt-pkg/contrib/gpgv.h
+++ b/apt-pkg/contrib/gpgv.h
@@ -39,7 +39,7 @@ class FileFd;
* @param fd is used as a pipe for the standard output of gpgv
* @param key is the specific one to be used instead of using all
*/
-void ExecGPGV(std::string const &File, std::string const &FileSig,
+APT_PUBLIC void ExecGPGV(std::string const &File, std::string const &FileSig,
int const &statusfd, int fd[2], std::string const &Key = "") APT_NORETURN;
inline APT_NORETURN void ExecGPGV(std::string const &File, std::string const &FileSig,
int const &statusfd = -1) {
@@ -70,7 +70,7 @@ inline APT_NORETURN void ExecGPGV(std::string const &File, std::string const &Fi
* @param SignatureFile is the FileFd all signatures will be written to
* @return true if the splitting was successful, false otherwise
*/
-bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
+APT_PUBLIC bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
std::vector<std::string> * const ContentHeader, FileFd * const SignatureFile);
/** \brief open a file which might be clear-signed
@@ -84,6 +84,6 @@ bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
* @param[out] MessageFile is the FileFd in which the file will be opened
* @return true if opening was successful, otherwise false
*/
-bool OpenMaybeClearSignedFile(std::string const &ClearSignedFileName, FileFd &MessageFile);
+APT_PUBLIC bool OpenMaybeClearSignedFile(std::string const &ClearSignedFileName, FileFd &MessageFile);
#endif
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index e2a9927ef..422c1e023 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -24,7 +24,7 @@ class FileFd;
// helper class that contains hash function name
// and hash
-class HashString
+class APT_PUBLIC HashString
{
protected:
std::string Type;
@@ -61,7 +61,7 @@ class HashString
static APT_PURE const char** SupportedHashes();
};
-class HashStringList
+class APT_PUBLIC HashStringList
{
public:
/** find best hash if no specific one is requested
@@ -166,7 +166,7 @@ class HashStringList
};
class PrivateHashes;
-class Hashes
+class APT_PUBLIC Hashes
{
PrivateHashes * const d;
public:
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
deleted file mode 100644
index 61b047465..000000000
--- a/apt-pkg/contrib/hashsum_template.h
+++ /dev/null
@@ -1,100 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/
-/* ######################################################################
-
- HashSumValueTemplate - Generic Storage for a hash value
-
- ##################################################################### */
- /*}}}*/
-#ifndef APTPKG_HASHSUM_TEMPLATE_H
-#define APTPKG_HASHSUM_TEMPLATE_H
-
-#include <cstring>
-#include <string>
-#include <apt-pkg/string_view.h>
-
-#include <apt-pkg/strutl.h>
-
-
-class FileFd;
-
-template<int N>
-class HashSumValue
-{
- unsigned char Sum[N/8];
-
- public:
-
- // Accessors
- bool operator ==(const HashSumValue &rhs) const
- {
- return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0;
- }
- bool operator !=(const HashSumValue &rhs) const
- {
- return memcmp(Sum,rhs.Sum,sizeof(Sum)) != 0;
- }
-
- std::string Value() const
- {
- char Conv[16] =
- { '0','1','2','3','4','5','6','7','8','9','a','b',
- 'c','d','e','f'
- };
- char Result[((N/8)*2)+1];
- Result[(N/8)*2] = 0;
-
- // Convert each char into two letters
- int J = 0;
- int I = 0;
- for (; I != (N/8)*2; J++,I += 2)
- {
- Result[I] = Conv[Sum[J] >> 4];
- Result[I + 1] = Conv[Sum[J] & 0xF];
- }
- return std::string(Result);
- }
-
- inline void Value(unsigned char S[N/8])
- {
- for (int I = 0; I != sizeof(Sum); ++I)
- S[I] = Sum[I];
- }
-
- inline operator std::string() const
- {
- return Value();
- }
-
- bool Set(APT::StringView Str)
- {
- return Hex2Num(Str,Sum,sizeof(Sum));
- }
- inline void Set(unsigned char S[N/8])
- {
- for (int I = 0; I != sizeof(Sum); ++I)
- Sum[I] = S[I];
- }
-
- explicit HashSumValue(std::string const &Str)
- {
- memset(Sum,0,sizeof(Sum));
- Set(Str);
- }
- explicit HashSumValue(APT::StringView const &Str)
- {
- memset(Sum,0,sizeof(Sum));
- Set(Str);
- }
- APT_HIDDEN explicit HashSumValue(const char *Str)
- {
- memset(Sum,0,sizeof(Sum));
- Set(Str);
- }
- HashSumValue()
- {
- memset(Sum,0,sizeof(Sum));
- }
-};
-
-#endif
diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h
index b13f18187..444397900 100644
--- a/apt-pkg/contrib/netrc.h
+++ b/apt-pkg/contrib/netrc.h
@@ -22,5 +22,5 @@
class URI;
class FileFd;
-bool MaybeAddAuth(FileFd &NetRCFile, URI &Uri);
+APT_PUBLIC bool MaybeAddAuth(FileFd &NetRCFile, URI &Uri);
#endif
diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h
index 850d009fa..4d118ee99 100644
--- a/apt-pkg/contrib/progress.h
+++ b/apt-pkg/contrib/progress.h
@@ -26,7 +26,7 @@
class Configuration;
-class OpProgress
+class APT_PUBLIC OpProgress
{
unsigned long long Current;
unsigned long long Total;
@@ -62,7 +62,7 @@ class OpProgress
virtual ~OpProgress() {};
};
-class OpTextProgress : public OpProgress
+class APT_PUBLIC OpTextProgress : public OpProgress
{
protected:
diff --git a/apt-pkg/contrib/proxy.h b/apt-pkg/contrib/proxy.h
index 2cbcd07b4..f6d70ea8b 100644
--- a/apt-pkg/contrib/proxy.h
+++ b/apt-pkg/contrib/proxy.h
@@ -10,7 +10,7 @@
#define PKGLIB_PROXY_H
class URI;
-bool AutoDetectProxy(URI &URL);
+APT_PUBLIC bool AutoDetectProxy(URI &URL);
#endif
diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
index e22b7a1c6..e5d0f43a3 100644
--- a/apt-pkg/contrib/srvrec.h
+++ b/apt-pkg/contrib/srvrec.h
@@ -13,7 +13,9 @@
#include <vector>
#include <arpa/nameser.h>
-class SrvRec
+#include <apt-pkg/macros.h>
+
+class APT_PUBLIC SrvRec
{
public:
std::string target;
@@ -40,15 +42,15 @@ class SrvRec
/** \brief Get SRV records from host/port (builds the query string internally)
*/
-bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result);
+APT_PUBLIC bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result);
/** \brief Get SRV records for query string like: _http._tcp.example.com
*/
-bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result);
+APT_PUBLIC bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &Result);
/** \brief Pop a single SRV record from the vector of SrvRec taking
* priority and weight into account
*/
-SrvRec PopFromSrvRecs(std::vector<SrvRec> &Recs);
+APT_PUBLIC SrvRec PopFromSrvRecs(std::vector<SrvRec> &Recs);
#endif
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index 56487b60f..c25c6208a 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -29,35 +29,34 @@
namespace APT {
namespace String {
- std::string Strip(const std::string &s);
- bool Endswith(const std::string &s, const std::string &ending);
- bool Startswith(const std::string &s, const std::string &starting);
- std::string Join(std::vector<std::string> list, const std::string &sep);
+ APT_PUBLIC std::string Strip(const std::string &s);
+ APT_PUBLIC bool Endswith(const std::string &s, const std::string &ending);
+ APT_PUBLIC bool Startswith(const std::string &s, const std::string &starting);
+ APT_PUBLIC std::string Join(std::vector<std::string> list, const std::string &sep);
// Returns string display length honoring multi-byte characters
- size_t DisplayLength(StringView str);
-
+ APT_PUBLIC size_t DisplayLength(StringView str);
}
}
-bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest);
-char *_strstrip(char *String);
-char *_strrstrip(char *String); // right strip only
-char *_strtabexpand(char *String,size_t Len);
-bool ParseQuoteWord(const char *&String,std::string &Res);
-bool ParseCWord(const char *&String,std::string &Res);
-std::string QuoteString(const std::string &Str,const char *Bad);
-std::string DeQuoteString(const std::string &Str);
-std::string DeQuoteString(std::string::const_iterator const &begin, std::string::const_iterator const &end);
+APT_PUBLIC bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest);
+APT_PUBLIC char *_strstrip(char *String);
+APT_PUBLIC char *_strrstrip(char *String); // right strip only
+APT_PUBLIC char *_strtabexpand(char *String,size_t Len);
+APT_PUBLIC bool ParseQuoteWord(const char *&String,std::string &Res);
+APT_PUBLIC bool ParseCWord(const char *&String,std::string &Res);
+APT_PUBLIC std::string QuoteString(const std::string &Str,const char *Bad);
+APT_PUBLIC std::string DeQuoteString(const std::string &Str);
+APT_PUBLIC std::string DeQuoteString(std::string::const_iterator const &begin, std::string::const_iterator const &end);
// unescape (\0XX and \xXX) from a string
-std::string DeEscapeString(const std::string &input);
+APT_PUBLIC std::string DeEscapeString(const std::string &input);
-std::string SizeToStr(double Bytes);
-std::string TimeToStr(unsigned long Sec);
-std::string Base64Encode(const std::string &Str);
-std::string OutputInDepth(const unsigned long Depth, const char* Separator=" ");
-std::string URItoFileName(const std::string &URI);
+APT_PUBLIC std::string SizeToStr(double Bytes);
+APT_PUBLIC std::string TimeToStr(unsigned long Sec);
+APT_PUBLIC std::string Base64Encode(const std::string &Str);
+APT_PUBLIC std::string OutputInDepth(const unsigned long Depth, const char* Separator=" ");
+APT_PUBLIC std::string URItoFileName(const std::string &URI);
/** returns a datetime string as needed by HTTP/1.1 and Debian files.
*
* Note: The date will always be represented in a UTC timezone
@@ -67,7 +66,7 @@ std::string URItoFileName(const std::string &URI);
* of GMT as timezone instead. \b true means that the timezone should be denoted
* as "+0000" while \b false uses "GMT".
*/
-std::string TimeRFC1123(time_t Date, bool const NumericTimezone);
+APT_PUBLIC std::string TimeRFC1123(time_t Date, bool const NumericTimezone);
/** parses time as needed by HTTP/1.1 and Debian files.
*
* HTTP/1.1 prefers dates in RFC1123 format (but the other two obsolete date formats
@@ -83,22 +82,22 @@ std::string TimeRFC1123(time_t Date, bool const NumericTimezone);
* parsing is successful, undefined otherwise.
* @return \b true if parsing was successful, otherwise \b false.
*/
-bool RFC1123StrToTime(const std::string &str,time_t &time) APT_MUSTCHECK;
-bool FTPMDTMStrToTime(const char* const str,time_t &time) APT_MUSTCHECK;
-std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0);
-int StringToBool(const std::string &Text,int Default = -1);
-bool ReadMessages(int Fd, std::vector<std::string> &List);
-bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0);
-bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0);
-bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len);
-bool Base256ToNum(const char *Str,unsigned long long &Res,unsigned int Len);
-bool Hex2Num(const APT::StringView Str,unsigned char *Num,unsigned int Length);
+APT_PUBLIC bool RFC1123StrToTime(const std::string &str,time_t &time) APT_MUSTCHECK;
+APT_PUBLIC bool FTPMDTMStrToTime(const char* const str,time_t &time) APT_MUSTCHECK;
+APT_PUBLIC std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0);
+APT_PUBLIC int StringToBool(const std::string &Text,int Default = -1);
+APT_PUBLIC bool ReadMessages(int Fd, std::vector<std::string> &List);
+APT_PUBLIC bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0);
+APT_PUBLIC bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0);
+APT_PUBLIC bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len);
+APT_PUBLIC bool Base256ToNum(const char *Str,unsigned long long &Res,unsigned int Len);
+APT_PUBLIC bool Hex2Num(const APT::StringView Str,unsigned char *Num,unsigned int Length);
// input changing string split
-bool TokSplitString(char Tok,char *Input,char **List,
+APT_PUBLIC bool TokSplitString(char Tok,char *Input,char **List,
unsigned long ListMax);
// split a given string by a char
-std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) APT_PURE;
+APT_PUBLIC std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) APT_PURE;
/* \brief Return a vector of strings from string "input" where "sep"
* is used as the delimiter string.
@@ -114,14 +113,14 @@ std::vector<std::string> VectorizeString(std::string const &haystack, char const
* if used the string is only split on maxsplit places and the last
* item in the vector contains the remainder string.
*/
-std::vector<std::string> StringSplit(std::string const &input,
+APT_PUBLIC std::vector<std::string> StringSplit(std::string const &input,
std::string const &sep,
unsigned int maxsplit=std::numeric_limits<unsigned int>::max()) APT_PURE;
-void ioprintf(std::ostream &out,const char *format,...) APT_PRINTF(2);
-void strprintf(std::string &out,const char *format,...) APT_PRINTF(2);
-char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_PRINTF(3);
-bool CheckDomainList(const std::string &Host, const std::string &List);
+APT_PUBLIC void ioprintf(std::ostream &out,const char *format,...) APT_PRINTF(2);
+APT_PUBLIC void strprintf(std::string &out,const char *format,...) APT_PRINTF(2);
+APT_PUBLIC char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_PRINTF(3);
+APT_PUBLIC bool CheckDomainList(const std::string &Host, const std::string &List);
/* Do some compat mumbo jumbo */
#define tolower_ascii tolower_ascii_inline
@@ -144,7 +143,7 @@ static inline int isspace_ascii_inline(int const c)
return (c >= 9 && c <= 13) || c == ' ';
}
-std::string StripEpoch(const std::string &VerStr);
+APT_PUBLIC std::string StripEpoch(const std::string &VerStr);
#define APT_MKSTRCMP(name,func) \
inline APT_PURE int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));} \
@@ -159,20 +158,20 @@ inline APT_PURE int name(const std::string& A,const char *B) {return func(A.begi
inline APT_PURE int name(const std::string& A,const std::string& B) {return func(A.begin(),A.end(),B.begin(),B.end());} \
inline APT_PURE int name(const std::string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);}
-int APT_PURE stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
-int APT_PURE stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
+APT_PUBLIC int APT_PURE stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
+APT_PUBLIC int APT_PURE stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
/* We assume that GCC 3 indicates that libstdc++3 is in use too. In that
case the definition of string::const_iterator is not the same as
const char * and we need these extra functions */
#if __GNUC__ >= 3
-int APT_PURE stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd,
+APT_PUBLIC int APT_PURE stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd,
const char *B,const char *BEnd);
-int APT_PURE stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd,
+APT_PUBLIC int APT_PURE stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd,
std::string::const_iterator B,std::string::const_iterator BEnd);
-int APT_PURE stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd,
+APT_PUBLIC int APT_PURE stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd,
const char *B,const char *BEnd);
-int APT_PURE stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd,
+APT_PUBLIC int APT_PURE stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd,
std::string::const_iterator B,std::string::const_iterator BEnd);
inline APT_PURE int stringcmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));}
@@ -183,12 +182,12 @@ APT_MKSTRCMP2(stringcmp,stringcmp)
APT_MKSTRCMP2(stringcasecmp,stringcasecmp)
// Return the length of a NULL-terminated string array
-size_t APT_PURE strv_length(const char **str_array);
+APT_PUBLIC size_t APT_PURE strv_length(const char **str_array);
inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);}
-class URI
+class APT_PUBLIC URI
{
void CopyFrom(const std::string &From);
@@ -217,8 +216,8 @@ struct SubstVar
const char *Subst;
const std::string *Contents;
};
-std::string SubstVar(std::string Str,const struct SubstVar *Vars);
-std::string SubstVar(const std::string &Str,const std::string &Subst,const std::string &Contents);
+APT_PUBLIC std::string SubstVar(std::string Str,const struct SubstVar *Vars);
+APT_PUBLIC std::string SubstVar(const std::string &Str,const std::string &Subst,const std::string &Contents);
struct RxChoiceList
{
@@ -226,7 +225,7 @@ struct RxChoiceList
const char *Str;
bool Hit;
};
-unsigned long RegexChoice(RxChoiceList *Rxs,const char **ListBegin,
+APT_PUBLIC unsigned long RegexChoice(RxChoiceList *Rxs,const char **ListBegin,
const char **ListEnd);
#endif
diff --git a/apt-pkg/deb/debfile.h b/apt-pkg/deb/debfile.h
index 06b54a43f..48a75ae55 100644
--- a/apt-pkg/deb/debfile.h
+++ b/apt-pkg/deb/debfile.h
@@ -32,7 +32,7 @@
class FileFd;
-class debDebFile
+class APT_PUBLIC debDebFile
{
protected:
@@ -53,14 +53,14 @@ class debDebFile
explicit debDebFile(FileFd &File);
};
-class debDebFile::ControlExtract : public pkgDirStream
+class APT_PUBLIC debDebFile::ControlExtract : public pkgDirStream
{
public:
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
};
-class debDebFile::MemControlExtract : public pkgDirStream
+class APT_PUBLIC debDebFile::MemControlExtract : public pkgDirStream
{
bool IsControl;
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index 3ef9f6b0c..57b37385e 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -147,7 +147,7 @@ public:
std::string ArchiveInfo(pkgCache::VerIterator const &Ver) const override;
};
-class debDscFileIndex : public pkgDebianIndexRealFile
+class APT_PUBLIC debDscFileIndex : public pkgDebianIndexRealFile
{
void * const d;
@@ -174,7 +174,7 @@ public:
virtual const Type *GetType() const APT_OVERRIDE APT_PURE;
};
-class debStringPackageIndex : public pkgDebianIndexRealFile
+class APT_PUBLIC debStringPackageIndex : public pkgDebianIndexRealFile
{
void * const d;
protected:
diff --git a/apt-pkg/deb/debversion.h b/apt-pkg/deb/debversion.h
index db70c8797..5c328a985 100644
--- a/apt-pkg/deb/debversion.h
+++ b/apt-pkg/deb/debversion.h
@@ -15,7 +15,7 @@
#include <string>
-class debVersioningSystem : public pkgVersioningSystem
+class APT_PUBLIC debVersioningSystem : public pkgVersioningSystem
{
public:
@@ -36,6 +36,6 @@ class debVersioningSystem : public pkgVersioningSystem
debVersioningSystem();
};
-extern debVersioningSystem debVS;
+extern APT_PUBLIC debVersioningSystem debVS;
#endif
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 0e5b7ae01..17d9a9c3c 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -52,12 +52,12 @@
class OpProgress;
class pkgVersioningSystem;
-class pkgDepCache : protected pkgCache::Namespace
+class APT_PUBLIC pkgDepCache : protected pkgCache::Namespace
{
public:
/** \brief An arbitrary predicate on packages. */
- class InRootSetFunc
+ class APT_PUBLIC InRootSetFunc
{
public:
virtual bool InRootSet(const pkgCache::PkgIterator &/*pkg*/) {return false;};
@@ -156,7 +156,7 @@ class pkgDepCache : protected pkgCache::Namespace
* to a std::set of pointers to them and use those to store
* information about what happened in a group in the group.
*/
- class ActionGroup
+ class APT_PUBLIC ActionGroup
{
void * const d;
pkgDepCache &cache;
@@ -193,7 +193,7 @@ class pkgDepCache : protected pkgCache::Namespace
/** \brief Returns \b true for packages matching a regular
* expression in APT::NeverAutoRemove.
*/
- class DefaultRootSetFunc : public InRootSetFunc, public Configuration::MatchAgainstConfig
+ class APT_PUBLIC DefaultRootSetFunc : public InRootSetFunc, public Configuration::MatchAgainstConfig
{
public:
DefaultRootSetFunc() : Configuration::MatchAgainstConfig("APT::NeverAutoRemove") {};
@@ -202,7 +202,7 @@ class pkgDepCache : protected pkgCache::Namespace
bool InRootSet(const pkgCache::PkgIterator &pkg) APT_OVERRIDE { return pkg.end() == false && Match(pkg.Name()); };
};
- struct StateCache
+ struct APT_PUBLIC StateCache
{
// text versions of the two version fields
const char *CandVersion;
@@ -264,7 +264,7 @@ class pkgDepCache : protected pkgCache::Namespace
void UpdateVerState(PkgIterator const &Pkg);
// User Policy control
- class Policy
+ class APT_PUBLIC Policy
{
public:
Policy() {
diff --git a/apt-pkg/dirstream.h b/apt-pkg/dirstream.h
index 0f0e348d0..e5b226eab 100644
--- a/apt-pkg/dirstream.h
+++ b/apt-pkg/dirstream.h
@@ -26,7 +26,7 @@
#include <apt-pkg/macros.h>
-class pkgDirStream
+class APT_PUBLIC pkgDirStream
{
public:
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 3bcd695cd..434010dc4 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -49,7 +49,7 @@ namespace EDSP /*{{{*/
*
* \return true if request was composed successfully, otherwise false
*/
- bool WriteRequest(pkgDepCache &Cache, FileFd &output,
+ APT_PUBLIC bool WriteRequest(pkgDepCache &Cache, FileFd &output,
unsigned int const flags = 0,
OpProgress *Progress = NULL);
@@ -70,7 +70,7 @@ namespace EDSP /*{{{*/
*
* \return true if universe was composed successfully, otherwise false
*/
- bool WriteScenario(pkgDepCache &Cache, FileFd &output, OpProgress *Progress = NULL);
+ APT_PUBLIC bool WriteScenario(pkgDepCache &Cache, FileFd &output, OpProgress *Progress = NULL);
/** \brief creates a limited scenario representing the package universe
*
@@ -87,7 +87,7 @@ namespace EDSP /*{{{*/
*
* \return true if universe was composed successfully, otherwise false
*/
- bool WriteLimitedScenario(pkgDepCache &Cache, FileFd &output,
+ APT_PUBLIC bool WriteLimitedScenario(pkgDepCache &Cache, FileFd &output,
std::vector<bool> const &pkgset,
OpProgress *Progress = NULL);
@@ -105,7 +105,7 @@ namespace EDSP /*{{{*/
*
* \return true if a solution is found and applied correctly, otherwise false
*/
- bool ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
+ APT_PUBLIC bool ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
/** \brief search and read the request stanza for action later
*
@@ -123,7 +123,7 @@ namespace EDSP /*{{{*/
*
* \return true if the request could be found and worked on, otherwise false
*/
- bool ReadRequest(int const input, std::list<std::string> &install,
+ APT_PUBLIC bool ReadRequest(int const input, std::list<std::string> &install,
std::list<std::string> &remove, unsigned int &flags);
/** \brief takes the request lists and applies it on the cache
@@ -138,7 +138,7 @@ namespace EDSP /*{{{*/
*
* \return false if the request couldn't be applied, true otherwise
*/
- bool ApplyRequest(std::list<std::string> const &install,
+ APT_PUBLIC bool ApplyRequest(std::list<std::string> const &install,
std::list<std::string> const &remove,
pkgDepCache &Cache);
@@ -154,7 +154,7 @@ namespace EDSP /*{{{*/
*
* \return true if stanza could be written, otherwise false
*/
- bool WriteSolutionStanza(FileFd &output, char const * const Type, pkgCache::VerIterator const &Ver);
+ APT_PUBLIC bool WriteSolutionStanza(FileFd &output, char const * const Type, pkgCache::VerIterator const &Ver);
/** \brief sends a progress report
*
@@ -162,7 +162,7 @@ namespace EDSP /*{{{*/
* \param message the solver wants the user to see
* \param output the front-end listens for progress report
*/
- bool WriteProgress(unsigned short const percent, const char* const message, FileFd &output);
+ APT_PUBLIC bool WriteProgress(unsigned short const percent, const char* const message, FileFd &output);
/** \brief sends an error report
*
@@ -179,7 +179,7 @@ namespace EDSP /*{{{*/
* \param message is free form text to describe the error
* \param output the front-end listens for error messages
*/
- bool WriteError(char const * const uuid, std::string const &message, FileFd &output);
+ APT_PUBLIC bool WriteError(char const * const uuid, std::string const &message, FileFd &output);
/** \brief executes the given solver and returns the pipe ends
@@ -193,7 +193,7 @@ namespace EDSP /*{{{*/
*
* \return PID of the started solver or 0 if failure occurred
*/
- pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
+ APT_PUBLIC pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
/** \brief call an external resolver to handle the request
*
@@ -207,7 +207,7 @@ namespace EDSP /*{{{*/
* \return true if the solver has successfully solved the problem,
* otherwise false
*/
- bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
+ APT_PUBLIC bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
unsigned int const flags = 0,
OpProgress *Progress = NULL);
}
@@ -242,10 +242,10 @@ namespace EIPP /*{{{*/
REINSTALL,
REMOVE
};
- bool ReadRequest(int const input,
+ APT_PUBLIC bool ReadRequest(int const input,
std::list<std::pair<std::string,PKG_ACTION>> &actions,
unsigned int &flags);
- bool ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,
+ APT_PUBLIC bool ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,
pkgDepCache &Cache);
}
/*}}}*/
diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h
index 2cceeae03..41be15498 100644
--- a/apt-pkg/indexcopy.h
+++ b/apt-pkg/indexcopy.h
@@ -23,7 +23,7 @@ class pkgCdromStatus;
class FileFd;
class metaIndex;
-class IndexCopy /*{{{*/
+class APT_PUBLIC IndexCopy /*{{{*/
{
/** \brief dpointer placeholder (for later in case we need it) */
void * const d;
@@ -51,7 +51,7 @@ class IndexCopy /*{{{*/
virtual ~IndexCopy();
};
/*}}}*/
-class PackageCopy : public IndexCopy /*{{{*/
+class APT_PUBLIC PackageCopy : public IndexCopy /*{{{*/
{
void * const d;
protected:
@@ -66,7 +66,7 @@ class PackageCopy : public IndexCopy /*{{{*/
virtual ~PackageCopy();
};
/*}}}*/
-class SourceCopy : public IndexCopy /*{{{*/
+class APT_PUBLIC SourceCopy : public IndexCopy /*{{{*/
{
void * const d;
protected:
@@ -81,7 +81,7 @@ class SourceCopy : public IndexCopy /*{{{*/
virtual ~SourceCopy();
};
/*}}}*/
-class TranslationsCopy /*{{{*/
+class APT_PUBLIC TranslationsCopy /*{{{*/
{
void * const d;
protected:
@@ -95,7 +95,7 @@ class TranslationsCopy /*{{{*/
virtual ~TranslationsCopy();
};
/*}}}*/
-class SigVerify /*{{{*/
+class APT_PUBLIC SigVerify /*{{{*/
{
/** \brief dpointer placeholder (for later in case we need it) */
void * const d;
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index dc44532fd..d0b045a9d 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -34,7 +34,7 @@ class pkgCacheGenerator;
class pkgCacheListParser;
class OpProgress;
-class IndexTarget /*{{{*/
+class APT_PUBLIC IndexTarget /*{{{*/
/** \brief Information about an index file. */
{
public:
@@ -98,7 +98,7 @@ class IndexTarget /*{{{*/
};
/*}}}*/
-class pkgIndexFile
+class APT_PUBLIC pkgIndexFile
{
void * const d;
protected:
@@ -106,7 +106,7 @@ class pkgIndexFile
public:
- class Type
+ class APT_PUBLIC Type
{
public:
@@ -150,7 +150,7 @@ class pkgIndexFile
virtual ~pkgIndexFile();
};
-class pkgDebianIndexFile : public pkgIndexFile
+class APT_PUBLIC pkgDebianIndexFile : public pkgIndexFile
{
protected:
virtual std::string IndexFileName() const = 0;
@@ -169,7 +169,7 @@ public:
virtual ~pkgDebianIndexFile();
};
-class pkgDebianIndexTargetFile : public pkgDebianIndexFile
+class APT_PUBLIC pkgDebianIndexTargetFile : public pkgDebianIndexFile
{
void * const d;
protected:
@@ -192,7 +192,7 @@ public:
virtual ~pkgDebianIndexTargetFile();
};
-class pkgDebianIndexRealFile : public pkgDebianIndexFile
+class APT_PUBLIC pkgDebianIndexRealFile : public pkgDebianIndexFile
{
void * const d;
protected:
diff --git a/apt-pkg/init.h b/apt-pkg/init.h
index 9b26965b3..431e8a548 100644
--- a/apt-pkg/init.h
+++ b/apt-pkg/init.h
@@ -12,14 +12,15 @@
#ifndef PKGLIB_INIT_H
#define PKGLIB_INIT_H
+#include <apt-pkg/macros.h>
class pkgSystem;
class Configuration;
-extern const char *pkgVersion;
-extern const char *pkgLibVersion;
+APT_PUBLIC extern const char *pkgVersion;
+APT_PUBLIC extern const char *pkgLibVersion;
-bool pkgInitConfig(Configuration &Cnf);
-bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);
+APT_PUBLIC bool pkgInitConfig(Configuration &Cnf);
+APT_PUBLIC bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);
#endif
diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h
index bcc0b615a..94b66ed9b 100644
--- a/apt-pkg/install-progress.h
+++ b/apt-pkg/install-progress.h
@@ -12,9 +12,9 @@ namespace APT {
namespace Progress {
class PackageManager;
- PackageManager* PackageManagerProgressFactory();
+ APT_PUBLIC PackageManager* PackageManagerProgressFactory();
- class PackageManager
+ class APT_PUBLIC PackageManager
{
private:
/** \brief dpointer placeholder */
@@ -59,7 +59,7 @@ namespace Progress {
std::string /*ConfMessage*/) {}
};
- class PackageManagerProgressFd : public PackageManager
+ class APT_PUBLIC PackageManagerProgressFd : public PackageManager
{
void * const d;
protected:
@@ -90,7 +90,7 @@ namespace Progress {
};
- class PackageManagerProgressDeb822Fd : public PackageManager
+ class APT_PUBLIC PackageManagerProgressDeb822Fd : public PackageManager
{
void * const d;
protected:
@@ -120,7 +120,7 @@ namespace Progress {
std::string ConfMessage) APT_OVERRIDE;
};
- class PackageManagerFancy : public PackageManager
+ class APT_PUBLIC PackageManagerFancy : public PackageManager
{
void * const d;
private:
@@ -156,7 +156,7 @@ namespace Progress {
static std::string GetTextProgressStr(float percent, int OutputSize);
};
- class PackageManagerText : public PackageManager
+ class APT_PUBLIC PackageManagerText : public PackageManager
{
void * const d;
public:
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index 1c1cada0c..b8db21705 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -17,7 +17,7 @@ class OpProgress;
class metaIndexPrivate;
-class metaIndex
+class APT_PUBLIC metaIndex
{
public:
struct checkSum
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h
index bb21e1d7d..559bf9829 100644
--- a/apt-pkg/orderlist.h
+++ b/apt-pkg/orderlist.h
@@ -21,7 +21,7 @@
#include <string>
class pkgDepCache;
-class pkgOrderList : protected pkgCache::Namespace
+class APT_PUBLIC pkgOrderList : protected pkgCache::Namespace
{
void * const d;
protected:
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index d95a9f663..e70c204b5 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -44,7 +44,7 @@ namespace APT {
}
}
-class pkgPackageManager : protected pkgCache::Namespace
+class APT_PUBLIC pkgPackageManager : protected pkgCache::Namespace
{
public:
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 54b4319fb..288bcce09 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -121,7 +121,7 @@ typedef uint8_t map_flags_t;
typedef uint8_t map_number_t;
class pkgVersioningSystem;
-class pkgCache /*{{{*/
+class APT_PUBLIC pkgCache /*{{{*/
{
public:
// Cache element predeclarations
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 283866f88..d02c49f03 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -14,7 +14,6 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/hashsum_template.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/metaindex.h>
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index 25cc07f2f..09c0b5fb4 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -23,7 +23,7 @@
#include <string>
#include <vector>
-class pkgRecords /*{{{*/
+class APT_PUBLIC pkgRecords /*{{{*/
{
public:
class Parser;
@@ -45,7 +45,7 @@ class pkgRecords /*{{{*/
virtual ~pkgRecords();
};
/*}}}*/
-class pkgRecords::Parser /*{{{*/
+class APT_PUBLIC pkgRecords::Parser /*{{{*/
{
protected:
diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h
index 1ccdcd1fb..dca5747c1 100644
--- a/apt-pkg/pkgsystem.h
+++ b/apt-pkg/pkgsystem.h
@@ -48,7 +48,7 @@ class Configuration;
class pkgIndexFile;
class pkgSystemPrivate;
-class pkgSystem
+class APT_PUBLIC pkgSystem
{
public:
@@ -133,6 +133,6 @@ class pkgSystem
};
// The environment we are operating in.
-extern pkgSystem *_system;
+APT_PUBLIC extern pkgSystem *_system;
#endif
diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h
index 2fd2f8197..7f30d40ed 100644
--- a/apt-pkg/policy.h
+++ b/apt-pkg/policy.h
@@ -40,7 +40,7 @@
#include <vector>
-class pkgPolicy : public pkgDepCache::Policy
+class APT_PUBLIC pkgPolicy : public pkgDepCache::Policy
{
protected:
@@ -86,7 +86,7 @@ class pkgPolicy : public pkgDepCache::Policy
void * const d;
};
-bool ReadPinFile(pkgPolicy &Plcy, std::string File = "");
-bool ReadPinDir(pkgPolicy &Plcy, std::string Dir = "");
+APT_PUBLIC bool ReadPinFile(pkgPolicy &Plcy, std::string File = "");
+APT_PUBLIC bool ReadPinDir(pkgPolicy &Plcy, std::string Dir = "");
#endif
diff --git a/apt-pkg/prettyprinters.h b/apt-pkg/prettyprinters.h
index 40f9d6628..80b7729af 100644
--- a/apt-pkg/prettyprinters.h
+++ b/apt-pkg/prettyprinters.h
@@ -31,7 +31,7 @@ struct PrettyDep
};
}
-std::ostream& operator<<(std::ostream& os, const APT::PrettyPkg& pp);
-std::ostream& operator<<(std::ostream& os, const APT::PrettyDep& pd);
+APT_PUBLIC std::ostream& operator<<(std::ostream& os, const APT::PrettyPkg& pp);
+APT_PUBLIC std::ostream& operator<<(std::ostream& os, const APT::PrettyDep& pd);
#endif
diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h
index 91dc03dcf..454180371 100644
--- a/apt-pkg/sourcelist.h
+++ b/apt-pkg/sourcelist.h
@@ -39,7 +39,7 @@ class pkgIndexFile;
class metaIndex;
class CommandLine;
-class pkgSourceList
+class APT_PUBLIC pkgSourceList
{
void * const d;
std::vector<pkgIndexFile*> VolatileFiles;
diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
index 8c4b00906..b9014a555 100644
--- a/apt-pkg/srcrecords.h
+++ b/apt-pkg/srcrecords.h
@@ -21,7 +21,7 @@
class pkgSourceList;
class pkgIndexFile;
-class pkgSrcRecords
+class APT_PUBLIC pkgSrcRecords
{
public:
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 8a5884157..f6bdd12c9 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -41,7 +41,7 @@ class pkgTagFilePrivate;
* Beware: This class does \b NOT support (#-)comments in in- or output!
* If the input contains comments they have to be stripped first like pkgTagFile
* does with SUPPORT_COMMENTS flag set. */
-class pkgTagSection
+class APT_PUBLIC pkgTagSection
{
const char *Section;
unsigned int AlphaIndexes[128];
@@ -170,7 +170,7 @@ class pkgTagSection
* via #pkgTagSection. The default mode tries to be as fast as possible and
* assumes perfectly valid (machine generated) files like Packages. Support
* for comments e.g. needs to be enabled explicitly. */
-class pkgTagFile
+class APT_PUBLIC pkgTagFile
{
pkgTagFilePrivate * const d;
@@ -198,7 +198,7 @@ public:
virtual ~pkgTagFile();
};
-extern const char **TFRewritePackageOrder;
-extern const char **TFRewriteSourceOrder;
+APT_PUBLIC extern const char **TFRewritePackageOrder;
+APT_PUBLIC extern const char **TFRewriteSourceOrder;
#endif
diff --git a/apt-pkg/update.h b/apt-pkg/update.h
index 559516f1b..dce5cbc0f 100644
--- a/apt-pkg/update.h
+++ b/apt-pkg/update.h
@@ -14,8 +14,8 @@ class pkgAcquireStatus;
class pkgSourceList;
class pkgAcquire;
-bool ListUpdate(pkgAcquireStatus &progress, pkgSourceList &List, int PulseInterval=0);
-bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval = 0,
+APT_PUBLIC bool ListUpdate(pkgAcquireStatus &progress, pkgSourceList &List, int PulseInterval=0);
+APT_PUBLIC bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval = 0,
bool const RunUpdateScripts = true, bool const ListCleanup = true);
diff --git a/apt-pkg/upgrade.h b/apt-pkg/upgrade.h
index c3d0852b2..8e8960197 100644
--- a/apt-pkg/upgrade.h
+++ b/apt-pkg/upgrade.h
@@ -24,9 +24,9 @@ namespace APT {
FORBID_INSTALL_NEW_PACKAGES = 2,
ALLOW_EVERYTHING = 0
};
- bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
+ APT_PUBLIC bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
}
}
-bool pkgMinimizeUpgrade(pkgDepCache &Cache);
+APT_PUBLIC bool pkgMinimizeUpgrade(pkgDepCache &Cache);
#endif
diff --git a/apt-pkg/version.h b/apt-pkg/version.h
index 936c678fd..eaf667cce 100644
--- a/apt-pkg/version.h
+++ b/apt-pkg/version.h
@@ -23,7 +23,7 @@
#include <string>
-class pkgVersioningSystem
+class APT_PUBLIC pkgVersioningSystem
{
public:
// Global list of VS's
diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h
index 31ebedb86..0f84f8dfa 100644
--- a/apt-pkg/versionmatch.h
+++ b/apt-pkg/versionmatch.h
@@ -39,7 +39,7 @@
#include <string>
-class pkgVersionMatch
+class APT_PUBLIC pkgVersionMatch
{
// Version Matching
std::string VerStr;