]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/statechanges.h
Merge commit 'e2073b0276226b625897ef475f225bf8f508719e' as 'triehash'
[apt.git] / apt-pkg / statechanges.h
index fa60c586491b603fda60a89f553ba4eb96494e43..1eaf21a3addec5b560121d3398a83c9223e73661 100644 (file)
@@ -14,14 +14,20 @@ class APT_PUBLIC StateChanges
 {
 public:
    // getter/setter for the different states
-   APT::VersionVector& Hold();
-   void Hold(pkgCache::VerIterator const &Ver);
-   APT::VersionVector& Unhold();
-   void Unhold(pkgCache::VerIterator const &Ver);
+#define APT_GETTERSETTER(Name) \
+   APT::VersionVector& Name(); \
+   void Name(pkgCache::VerIterator const &Ver)
+   APT_GETTERSETTER(Hold);
+   APT_GETTERSETTER(Unhold);
+   APT_GETTERSETTER(Install);
+   APT_GETTERSETTER(Remove);
+   APT_GETTERSETTER(Purge);
    APT::VersionVector& Error();
+#undef APT_GETTERSETTER
 
-   // forgets all unsaved changes
-   void Discard();
+   // operate on all containers at once
+   void clear();
+   bool empty() const;
 
    /** commit the staged changes to the database(s).
     *