#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
+ #define APT_PUBLIC
+ #define APT_HIDDEN
#endif
// cold functions are unlikely() to be called
#define ACQPROGRESS_H
#include <apt-pkg/acquire.h>
+#include <apt-pkg/macros.h>
#include <string>
-class AcqTextStatus : public pkgAcquireStatus
+class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus
{
unsigned int &ScreenWidth;
char BlankLine[1024];
unsigned long ID;
unsigned long Quiet;
-
+
public:
-
+
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();
-
+
bool Pulse(pkgAcquire *Owner);
AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet);
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)
#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 : public pkgCacheFile
+class APT_PUBLIC CacheFile : public pkgCacheFile
{
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;
#define APT_PRIVATE_CMNDLINE_H
#include <apt-pkg/cmndline.h>
+#include <apt-pkg/macros.h>
#include <vector>
-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);
#endif
#ifndef APT_PRIVATE_DOWNLOAD_H
#define APT_PRIVATE_DOWNLOAD_H
+#include <apt-pkg/macros.h>
+
class pkgAcquire;
-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);
#endif
#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 <string>
#include <utility>
-#include "private-output.h"
#include <apti18n.h>
#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 InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
+APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
bool Safety = true);
#ifndef APT_PRIVATE_LIST_H
#define APT_PRIVATE_LIST_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
-bool List(CommandLine &Cmd);
+APT_PUBLIC bool List(CommandLine &Cmd);
#endif
#ifndef APT_PRIVATE_MAIN_H
#define APT_PRIVATE_MAIN_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
-void CheckSimulateMode(CommandLine &CmdL);
+APT_PUBLIC void CheckSimulateMode(CommandLine &CmdL);
#endif
class CommandLine;
-bool DoMoo(CommandLine &CmdL);
+APT_PUBLIC bool DoMoo(CommandLine &CmdL);
bool DoMoo1(CommandLine &CmdL);
bool DoMoo2(CommandLine &CmdL);
bool DoMoo3(CommandLine &CmdL);
#define APT_PRIVATE_OUTPUT_H
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/macros.h>
#include <fstream>
#include <string>
class pkgRecords;
-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
-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);
-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);
#ifndef APT_PRIVATE_SEARCH_H
#define APT_PRIVATE_SEARCH_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
-bool FullTextSearch(CommandLine &CmdL);
+APT_PUBLIC bool FullTextSearch(CommandLine &CmdL);
#endif
#ifndef APT_PRIVATE_SHOW_H
#define APT_PRIVATE_SHOW_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
namespace APT {
namespace Cmd {
- bool ShowPackage(CommandLine &CmdL);
+ APT_PUBLIC bool ShowPackage(CommandLine &CmdL);
}
}
#endif
#ifndef APT_PRIVATE_SOURCES_H
#define APT_PRIVATE_SOURCES_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
-bool EditSources(CommandLine &CmdL);
+APT_PUBLIC bool EditSources(CommandLine &CmdL);
#endif
#ifndef APT_PRIVATE_UPDATE_H
#define APT_PRIVATE_UPDATE_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
-bool DoUpdate(CommandLine &CmdL);
+APT_PUBLIC bool DoUpdate(CommandLine &CmdL);
#endif
#ifndef APTPRIVATE_PRIVATE_UPGRADE_H
#define APTPRIVATE_PRIVATE_UPGRADE_H
+#include <apt-pkg/macros.h>
+
class CommandLine;
-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);
#ifndef APT_PRIVATE_UTILS_H
#define APT_PRIVATE_UTILS_H
-#include<string>
+#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);
#endif