summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2012-06-14 13:11:11 +0200
committerEnrico Zini <enrico@enricozini.org>2012-06-14 13:58:13 +0200
commitd456f52d160a5eb97488dd4720cd5e646349845d (patch)
treed093a1f8d3da8044fb53890a70ed164716668d6a
parentab8493853546ae902114bf1ba95638c287b50905 (diff)
downloadlibept-d456f52d160a5eb97488dd4720cd5e646349845d.tar.gz
Expose the underlying libapt
-rw-r--r--ept/apt/apt.cc7
-rw-r--r--ept/apt/apt.h8
2 files changed, 15 insertions, 0 deletions
diff --git a/ept/apt/apt.cc b/ept/apt/apt.cc
index 76c34f0..2d625fb 100644
--- a/ept/apt/apt.cc
+++ b/ept/apt/apt.cc
@@ -633,6 +633,13 @@ std::string Apt::rawRecord(const Version& ver) const
return std::string();
}
+
+const pkgCache* Apt::aptPkgCache() const
+{
+ return impl->m_cache;
+}
+
+
void Apt::checkCacheUpdates()
{
if (impl->m_open_timestamp < timestamp())
diff --git a/ept/apt/apt.h b/ept/apt/apt.h
index 0cfff60..6e6ce74 100644
--- a/ept/apt/apt.h
+++ b/ept/apt/apt.h
@@ -29,6 +29,8 @@
#include <iterator>
+class pkgCache;
+
namespace ept {
namespace apt {
@@ -198,6 +200,7 @@ public:
Apt();
~Apt();
+
iterator begin() const;
iterator end() const;
@@ -257,6 +260,11 @@ public:
/// Get the raw package record for the given Version
std::string rawRecord(const Version& ver) const;
+ /// Returns the pointer to the internal libapt pkgCache object used.
+ const pkgCache* aptPkgCache() const;
+
+
+
/// Timestamp of when the apt index was last modified
time_t timestamp();