While it is a huge undertaking to enable it for our public libraries as
basically everything we exported so far could be seen as public
interface our private library is new and under our full control, so we
can do whatever we like with it. The benefits are not that big in return
of course, but it reduces the size a bit, so thats great nontheless.
Git-Dch: ignore
17 files changed:
#if APT_GCC_VERSION >= 0x0400
#define APT_SENTINEL __attribute__((sentinel))
#if APT_GCC_VERSION >= 0x0400
#define APT_SENTINEL __attribute__((sentinel))
+ #define APT_PUBLIC __attribute__ ((visibility ("default")))
+ #define APT_HIDDEN __attribute__ ((visibility ("hidden")))
#else
#define APT_SENTINEL
#else
#define APT_SENTINEL
+ #define APT_PUBLIC
+ #define APT_HIDDEN
#endif
// cold functions are unlikely() to be called
#endif
// cold functions are unlikely() to be called
#define ACQPROGRESS_H
#include <apt-pkg/acquire.h>
#define ACQPROGRESS_H
#include <apt-pkg/acquire.h>
+#include <apt-pkg/macros.h>
-class AcqTextStatus : public pkgAcquireStatus
+class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus
{
unsigned int &ScreenWidth;
char BlankLine[1024];
unsigned long ID;
unsigned long Quiet;
{
unsigned int &ScreenWidth;
char BlankLine[1024];
unsigned long ID;
unsigned long Quiet;
virtual bool MediaChange(std::string Media,std::string Drive);
virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
virtual void Fetch(pkgAcquire::ItemDesc &Itm);
virtual bool MediaChange(std::string Media,std::string Drive);
virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
virtual void Fetch(pkgAcquire::ItemDesc &Itm);
virtual void Fail(pkgAcquire::ItemDesc &Itm);
virtual void Start();
virtual void Stop();
virtual void Fail(pkgAcquire::ItemDesc &Itm);
virtual void Start();
virtual void Stop();
bool Pulse(pkgAcquire *Owner);
AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet);
bool Pulse(pkgAcquire *Owner);
AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet);
MAJOR=0.0
MINOR=0
SLIBS=$(PTHREADLIB) -lapt-pkg
MAJOR=0.0
MINOR=0
SLIBS=$(PTHREADLIB) -lapt-pkg
+CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
PRIVATES=list install download output cachefile cacheset update upgrade cmndline moo search show main utils sources
SOURCE += $(foreach private, $(PRIVATES), private-$(private).cc)
PRIVATES=list install download output cachefile cacheset update upgrade cmndline moo search show main utils sources
SOURCE += $(foreach private, $(PRIVATES), private-$(private).cc)
#include <apt-pkg/progress.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/macros.h>
// class CacheFile - Cover class for some dependency cache functions /*{{{*/
// ---------------------------------------------------------------------
/* */
// class CacheFile - Cover class for some dependency cache functions /*{{{*/
// ---------------------------------------------------------------------
/* */
-class CacheFile : public pkgCacheFile
+class APT_PUBLIC CacheFile : public pkgCacheFile
{
static pkgCache *SortCache;
{
static pkgCache *SortCache;
- static int NameComp(const void *a,const void *b) APT_PURE;
-
+ APT_HIDDEN static int NameComp(const void *a,const void *b) APT_PURE;
+
public:
pkgCache::Package **List;
public:
pkgCache::Package **List;
#define APT_PRIVATE_CMNDLINE_H
#include <apt-pkg/cmndline.h>
#define APT_PRIVATE_CMNDLINE_H
#include <apt-pkg/cmndline.h>
+#include <apt-pkg/macros.h>
-std::vector<CommandLine::Args> getCommandArgs(char const * const Program, char const * const Cmd);
+APT_PUBLIC std::vector<CommandLine::Args> getCommandArgs(char const * const Program, char const * const Cmd);
#ifndef APT_PRIVATE_DOWNLOAD_H
#define APT_PRIVATE_DOWNLOAD_H
#ifndef APT_PRIVATE_DOWNLOAD_H
#define APT_PRIVATE_DOWNLOAD_H
+#include <apt-pkg/macros.h>
+
-bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser);
-bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure);
+APT_PUBLIC bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser);
+APT_PUBLIC bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure);
#include <apt-pkg/cacheset.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/algorithms.h>
+#include <apt-pkg/macros.h>
+
+#include <apt-private/private-output.h>
#include <stddef.h>
#include <iosfwd>
#include <stddef.h>
#include <iosfwd>
#include <string>
#include <utility>
#include <string>
#include <utility>
-#include "private-output.h"
#define RAMFS_MAGIC 0x858458f6
#define RAMFS_MAGIC 0x858458f6
-bool DoInstall(CommandLine &Cmd);
+APT_PUBLIC bool DoInstall(CommandLine &Cmd);
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
std::map<unsigned short, APT::VersionSet> &verset);
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache);
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
std::map<unsigned short, APT::VersionSet> &verset);
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache);
-bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
+APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
#ifndef APT_PRIVATE_LIST_H
#define APT_PRIVATE_LIST_H
#ifndef APT_PRIVATE_LIST_H
#define APT_PRIVATE_LIST_H
+#include <apt-pkg/macros.h>
+
-bool List(CommandLine &Cmd);
+APT_PUBLIC bool List(CommandLine &Cmd);
#ifndef APT_PRIVATE_MAIN_H
#define APT_PRIVATE_MAIN_H
#ifndef APT_PRIVATE_MAIN_H
#define APT_PRIVATE_MAIN_H
+#include <apt-pkg/macros.h>
+
-void CheckSimulateMode(CommandLine &CmdL);
+APT_PUBLIC void CheckSimulateMode(CommandLine &CmdL);
-bool DoMoo(CommandLine &CmdL);
+APT_PUBLIC bool DoMoo(CommandLine &CmdL);
bool DoMoo1(CommandLine &CmdL);
bool DoMoo2(CommandLine &CmdL);
bool DoMoo3(CommandLine &CmdL);
bool DoMoo1(CommandLine &CmdL);
bool DoMoo2(CommandLine &CmdL);
bool DoMoo3(CommandLine &CmdL);
#define APT_PRIVATE_OUTPUT_H
#include <apt-pkg/pkgcache.h>
#define APT_PRIVATE_OUTPUT_H
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/macros.h>
#include <fstream>
#include <string>
#include <fstream>
#include <string>
-extern std::ostream c0out;
-extern std::ostream c1out;
-extern std::ostream c2out;
-extern std::ofstream devnull;
-extern unsigned int ScreenWidth;
+APT_PUBLIC extern std::ostream c0out;
+APT_PUBLIC extern std::ostream c1out;
+APT_PUBLIC extern std::ostream c2out;
+APT_PUBLIC extern std::ofstream devnull;
+APT_PUBLIC extern unsigned int ScreenWidth;
-bool InitOutput();
-void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
+APT_PUBLIC bool InitOutput();
+
+void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
pkgCache::VerIterator V, std::ostream &out,
bool include_summary=true);
// helper to describe global state
pkgCache::VerIterator V, std::ostream &out,
bool include_summary=true);
// helper to describe global state
-bool ShowList(std::ostream &out, std::string Title, std::string List,
+APT_PUBLIC void ShowBroken(std::ostream &out,CacheFile &Cache,bool Now);
+
+APT_PUBLIC bool ShowList(std::ostream &out, std::string Title, std::string List,
std::string VersionsList);
std::string VersionsList);
-void ShowBroken(std::ostream &out,CacheFile &Cache,bool Now);
void ShowNew(std::ostream &out,CacheFile &Cache);
void ShowDel(std::ostream &out,CacheFile &Cache);
void ShowKept(std::ostream &out,CacheFile &Cache);
void ShowNew(std::ostream &out,CacheFile &Cache);
void ShowDel(std::ostream &out,CacheFile &Cache);
void ShowKept(std::ostream &out,CacheFile &Cache);
#ifndef APT_PRIVATE_SEARCH_H
#define APT_PRIVATE_SEARCH_H
#ifndef APT_PRIVATE_SEARCH_H
#define APT_PRIVATE_SEARCH_H
+#include <apt-pkg/macros.h>
+
-bool FullTextSearch(CommandLine &CmdL);
+APT_PUBLIC bool FullTextSearch(CommandLine &CmdL);
#ifndef APT_PRIVATE_SHOW_H
#define APT_PRIVATE_SHOW_H
#ifndef APT_PRIVATE_SHOW_H
#define APT_PRIVATE_SHOW_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
namespace APT {
namespace Cmd {
class CommandLine;
namespace APT {
namespace Cmd {
- bool ShowPackage(CommandLine &CmdL);
+ APT_PUBLIC bool ShowPackage(CommandLine &CmdL);
#ifndef APT_PRIVATE_SOURCES_H
#define APT_PRIVATE_SOURCES_H
#ifndef APT_PRIVATE_SOURCES_H
#define APT_PRIVATE_SOURCES_H
+#include <apt-pkg/macros.h>
+
-bool EditSources(CommandLine &CmdL);
+APT_PUBLIC bool EditSources(CommandLine &CmdL);
#ifndef APT_PRIVATE_UPDATE_H
#define APT_PRIVATE_UPDATE_H
#ifndef APT_PRIVATE_UPDATE_H
#define APT_PRIVATE_UPDATE_H
+#include <apt-pkg/macros.h>
+
-bool DoUpdate(CommandLine &CmdL);
+APT_PUBLIC bool DoUpdate(CommandLine &CmdL);
#ifndef APTPRIVATE_PRIVATE_UPGRADE_H
#define APTPRIVATE_PRIVATE_UPGRADE_H
#ifndef APTPRIVATE_PRIVATE_UPGRADE_H
#define APTPRIVATE_PRIVATE_UPGRADE_H
+#include <apt-pkg/macros.h>
+
-bool DoDistUpgrade(CommandLine &CmdL);
-bool DoUpgrade(CommandLine &CmdL);
+APT_PUBLIC bool DoDistUpgrade(CommandLine &CmdL);
+APT_PUBLIC bool DoUpgrade(CommandLine &CmdL);
bool DoUpgradeNoNewPackages(CommandLine &CmdL);
bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL);
bool DoUpgradeNoNewPackages(CommandLine &CmdL);
bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL);
#ifndef APT_PRIVATE_UTILS_H
#define APT_PRIVATE_UTILS_H
#ifndef APT_PRIVATE_UTILS_H
#define APT_PRIVATE_UTILS_H
+#include <apt-pkg/macros.h>
-void DisplayFileInPager(std::string filename);
-void EditFileInSensibleEditor(std::string filename);
+#include <string>
+
+APT_PUBLIC void DisplayFileInPager(std::string filename);
+APT_PUBLIC void EditFileInSensibleEditor(std::string filename);